Re: Bottlenecks with large number of relation segment files

From: Florian Weimer <fweimer(at)redhat(dot)com>
To: KONDO Mitsumasa <kondo(dot)mitsumasa(at)lab(dot)ntt(dot)co(dot)jp>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Bottlenecks with large number of relation segment files
Date: 2013-08-06 11:19:55
Message-ID: 5200DBDB.4010906@redhat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On 08/06/2013 12:28 PM, KONDO Mitsumasa wrote:
> (2013/08/05 20:38), Florian Weimer wrote:
>> On 08/05/2013 10:42 AM, John R Pierce wrote:
>>> On 8/5/2013 1:01 AM, KONDO Mitsumasa wrote:
>>>> When we open file, ext3 or ext4 file system seems to sequential search
>>>> inode for opening file in file directory.
>>>
>>> no, ext3/4 uses H-tree structures to search directories over 1 block
>>> long quite efficiently.
>>
>> And the Linux dentry cache is rather aggressive, so most of the time,
>> only the
>> in-memory hash table will be consulted. (The dentry cache only gets
>> flushed on
>> severe memory pressure.)

> Are you really? When I put large number of files in same directory and
> open, it is very very slow. But open directory is not.

The first file name resolution is slow, but subsequent resolutions
typically happen from the dentry cache. (The cache is not populated
when the directory is opened.)

--
Florian Weimer / Red Hat Product Security Team

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message KONDO Mitsumasa 2013-08-06 11:42:13 Re: Bottlenecks with large number of relation segment files
Previous Message ascot.moss@gmail.com 2013-08-06 11:16:51 Re: psql: FATAL: the database system is starting up

Browse pgsql-hackers by date

  From Date Subject
Next Message KONDO Mitsumasa 2013-08-06 11:42:13 Re: Bottlenecks with large number of relation segment files
Previous Message KONDO Mitsumasa 2013-08-06 11:10:14 Re: [HACKERS] Bottlenecks with large number of relation segment files