From: | Ivan Voras <ivoras(at)freebsd(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-performance(at)postgresql(dot)org |
Subject: | Re: [HACKERS] MIT benchmarks pgsql multicore (up to 48)performance |
Date: | 2010-10-07 12:19:08 |
Message-ID: | AANLkTim9OcDweLHqqVxWVvbd06p+Vgx7oFHsOzJnqhPc@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-performance |
On 7 October 2010 03:25, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Ivan Voras <ivoras(at)freebsd(dot)org> writes:
>> On 10/04/10 20:49, Josh Berkus wrote:
>>>> The other major bottleneck they ran into was a kernel one: reading from
>>>> the heap file requires a couple lseek operations, and Linux acquires a
>>>> mutex on the inode to do that.
>
>> Hmmm... lseek? As in "lseek() then read() or write()" idiom? It AFAIK
>> cannot be fixed since you're modifying the global "strean position"
>> variable and something has got to lock that.
>
> Um, there is no "global stream position" associated with an inode.
> A file position is associated with an open-file descriptor.
You're right of course, I was pattern matching late last night on the
"lseek()" and "locking problems" keywords and ignored "inode".
> If Josh quoted the problem correctly, the issue is that the kernel is
> locking a file's inode (which may be referenced by quite a lot of file
> descriptors) in order to change the state of one file descriptor.
> It sure sounds like a possible source of contention to me.
Though it does depend on the details of how pg uses it. Forked
processes share their parents' file descriptors.
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2010-10-07 12:21:32 | Re: Issues with Quorum Commit |
Previous Message | Vincenzo Romano | 2010-10-07 12:10:11 | Re: On Scalability |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2010-10-07 12:33:07 | Re: [HACKERS] MIT benchmarks pgsql multicore (up to 48)performance |
Previous Message | Vincenzo Romano | 2010-10-07 12:10:11 | Re: On Scalability |