2 x quad-core system is slower that 2 x dual core on FreeBSD

Peter Jeremy peterjeremy at optushome.com.au
Wed Nov 21 10:43:15 PST 2007

On Wed, Nov 21, 2007 at 02:13:19PM +0300, Alexey Popov wrote:
>As mentioned in the description of your patch there is probably a 
>scalability problem with stat() syscall on FreeBSD.

I wrote a quick tool to lstat() path elements on an otherwise idle
dual-core system (1.6GHz Turion64x2, FreeBSD6.3/amd64).
One instance:  ~62k lstat/sec.  99% sys
Two instances, same path: ~43k lstat/sec/instance.  97%sys
Two instances, different path, same fs: ~50k lstat/sec/instance.  97%sys
Two instances, different fs: ~53k lstat/sec/instance.  98%sys

The slowdowns, especially the same path instance, are worse than I would
have hoped.

>makes that 2000+ lstat's without problem. There's still stat(), open(), 
>gettimeofday(), close() syscalls for each include file in PHP that i can 
>not switch off.

Note that gettimeofday() is known to be much slower (and more
accurate) on FreeBSD than on Linux.  Robert Watson (if I recall
correctly) has done some work on building a framework to allow a
choice between slow-and-accurate and fast-and-less-precise timestamps.
I don't have the reference to hand but a check of the archives should
turn it up.

Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20071121/b9827a43/attachment.pgp

More information about the freebsd-stable mailing list