AW: [HACKERS] [hackers]development suggestion needed (filepath as symlink)

From: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
To: "'Bruce Momjian'" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "'pgsql-hackers(at)postgreSQL(dot)org '" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: AW: [HACKERS] [hackers]development suggestion needed (filepath as symlink)
Date: 2000-01-19 10:46:19
Message-ID: 219F68D65015D011A8E000006F8590C603FDC210@sdexcsrv1.f000.d0188.sd.spardat.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> > > Yes, that's about the sum of it. Why not the links? I think
> > > that it's an elegant way of designing the whole thing.
> >
> > The only problem with symlinks is, that it does not solve the
> > "too many files in one directory to give optimal performance"
> > problem for those that have tons of tables.
> >
> > Andreas
>
> Is that really a problem on modern operating systems?

Yes, in this regard most OS's (not only Unix) are quite old in their design.
(A . file, that has a sorted list of files and stats)
The problem starts to get severe at about 3000 - 10000 files,
depending on the average filename length.
Change one file --> write whole dirfile.
Depending on the system simple file create or fstat
drops to 3 files per second or worse.

Once the files are in cache, the performance is usually
good again.

But imho 300 ms for a temp file create is way too much.

Maybe we could only put the temp files in a different directory.
They are where performance matters.
If a normal table create takes a few seconds that is not a real problem.

> We could actually
> hash the file names into directory buckets and access them
> that way, and have one directory that old symlinks to the hashed files.

You can't have the one directory. It makes no difference whether
that dir has 5000 symlinks or 5000 files performance wise.

Andreas

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Mount 2000-01-19 11:30:25 RE: [HACKERS] Status on 7.0
Previous Message Stephen Birch 2000-01-19 10:23:34 Daily regression testing via vmware - useful?