public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: Postal 56% waits for flock_lock_file_wait
@ 2006-10-01 16:53 Ananiev, Leonid I
  2006-10-01 17:18 ` Trond Myklebust
  0 siblings, 1 reply; 13+ messages in thread
From: Ananiev, Leonid I @ 2006-10-01 16:53 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: Linux Kernel Mailing List

> The kernel would appear to be doing exactly what is expected of it.

Each of 16 user threads calls to open() one of 1000 files each 20 sec.
3000 calls per minute in sum.
The open() sleeps.
I'm not sure that users expected just of sleeping.

Leonid

-----Original Message-----
From: Trond Myklebust [mailto:trond.myklebust@fys.uio.no] 
Sent: Sunday, October 01, 2006 8:05 AM
To: Ananiev, Leonid I
Cc: Linux Kernel Mailing List
Subject: RE: Postal 56% waits for flock_lock_file_wait

On Sat, 2006-09-30 at 21:26 +0400, Ananiev, Leonid I wrote:
> > On which filesystem were the above results obtained if it was not
> ext2?
> The default ext3 fs was used.
> 
> > All the above results are telling you is that your test involves
> several
> > processes contending for the same lock, and so all of them barring
the
> > one process that actually holds the lock are idle.
> 
> Yes. It is  flock_lock_file_wait.

That is the function which causes the sleep, yes. So what is your gripe?
The kernel would appear to be doing exactly what is expected of it.

Trond

^ permalink raw reply	[flat|nested] 13+ messages in thread
* RE: Postal 56% waits for flock_lock_file_wait
@ 2006-09-30 17:26 Ananiev, Leonid I
  2006-10-01  4:05 ` Trond Myklebust
  0 siblings, 1 reply; 13+ messages in thread
From: Ananiev, Leonid I @ 2006-09-30 17:26 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: Linux Kernel Mailing List

> On which filesystem were the above results obtained if it was not
ext2?
The default ext3 fs was used.

> All the above results are telling you is that your test involves
several
> processes contending for the same lock, and so all of them barring the
> one process that actually holds the lock are idle.

Yes. It is  flock_lock_file_wait.

Leonid
-----Original Message-----
From: Trond Myklebust [mailto:trond.myklebust@fys.uio.no] 
Sent: Saturday, September 30, 2006 7:06 PM
To: Ananiev, Leonid I
Cc: Linux Kernel Mailing List
Subject: Re: Postal 56% waits for flock_lock_file_wait

On Sat, 2006-09-30 at 09:25 +0400, Ananiev, Leonid I wrote:
> A benchmark
>              'postal -p 16 localhost list_of_1000_users'
> 56% of run time waits for flock_lock_file_wait;
> Vmstat reports that 66% cpu is idle and  vmstat bi+bo=3600 (far from
> max).
> Postfix server with FD_SETSIZE=2048 was used.
> Similar results got for sendmail. 
> Wchan is counted by
>             while :; do
>                         ps -o user,wchan=WIDE-WCHAN-COLUMN,comm;
> sleep 1;
>            done | awk '/ postfix /{a[$2]++}END{for (i in a) print
> a[i]"\t"i}'
> If ext2 fs is used the Postal throughput is twice more and bi+bo by
50%
> less while  flock_lock_file_wait 60% still.

On which filesystem were the above results obtained if it was not ext2?

> Is flock_lock_file_wait considered as a performance limiting waiting
for
> similar applications in smp?

All the above results are telling you is that your test involves several
processes contending for the same lock, and so all of them barring the
one process that actually holds the lock are idle.

As for the throughput issue, that really depends on the filesystem you
are measuring. For remote filesystems like NFS, locks can _really_ slow
down performance because they are often required to flush all dirty data
to disk prior to releasing the lock (so that it becomes visible to
processes on other clients that might subsequently obtain the lock).

Cheers,
  Trond

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Postal 56% waits for flock_lock_file_wait
@ 2006-09-30  5:25 Ananiev, Leonid I
  2006-09-30 15:05 ` Trond Myklebust
  0 siblings, 1 reply; 13+ messages in thread
From: Ananiev, Leonid I @ 2006-09-30  5:25 UTC (permalink / raw)
  To: Linux Kernel Mailing List

A benchmark
             'postal -p 16 localhost list_of_1000_users'
56% of run time waits for flock_lock_file_wait;
Vmstat reports that 66% cpu is idle and  vmstat bi+bo=3600 (far from
max).
Postfix server with FD_SETSIZE=2048 was used.
Similar results got for sendmail. 
Wchan is counted by
            while :; do
                        ps -o user,wchan=WIDE-WCHAN-COLUMN,comm;
sleep 1;
           done | awk '/ postfix /{a[$2]++}END{for (i in a) print
a[i]"\t"i}'
If ext2 fs is used the Postal throughput is twice more and bi+bo by 50%
less while  flock_lock_file_wait 60% still.

Is flock_lock_file_wait considered as a performance limiting waiting for
similar applications in smp?

Leonid

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Postal 56% waits for flock_lock_file_wait
@ 2006-09-29 15:36 Ananiev, Leonid I
  0 siblings, 0 replies; 13+ messages in thread
From: Ananiev, Leonid I @ 2006-09-29 15:36 UTC (permalink / raw)
  To: Linux Kernel Mailing List

A benchmark
             'postal -p 16 localhost list_of_1000_users'
56% of run time waits for flock_lock_file_wait;
Vmstat reports that 66% cpu is idle and  vmstat bi+bo=3600 (far from
max).
Postfix server with FD_SETSIZE=2048 was used.
Similar results got for sendmail. 
Wchan is counted by
            while :; do
                        ps -o user,wchan=WIDE-WCHAN-COLUMN,comm;
sleep 1;
           done | awk '/ postfix /{a[$2]++}END{for (i in a) print
a[i]"\t"i}'
If ext2 fs is used the Postal throughput is twice more and bi+bo by 50%
less while  flock_lock_file_wait 60% still.

Is flock_lock_file_wait considered as a performance limiting waiting for
similar applications in smp?

Leonid

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2006-10-02 21:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-01 16:53 Postal 56% waits for flock_lock_file_wait Ananiev, Leonid I
2006-10-01 17:18 ` Trond Myklebust
2006-10-02 16:57   ` Tim Chen
2006-10-02 17:11     ` Trond Myklebust
2006-10-02 17:51       ` Alan Cox
2006-10-02 17:40         ` Dave Jones
2006-10-02 22:00           ` Alan Cox
2006-10-02 21:40             ` Dave Jones
  -- strict thread matches above, loose matches on Subject: below --
2006-09-30 17:26 Ananiev, Leonid I
2006-10-01  4:05 ` Trond Myklebust
2006-09-30  5:25 Ananiev, Leonid I
2006-09-30 15:05 ` Trond Myklebust
2006-09-29 15:36 Ananiev, Leonid I

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox