Some FreeBSD performance Issues

Tim Kientzle kientzle at freebsd.org
Thu Nov 8 23:37:55 PST 2007


Dan Nelson wrote:
> In the last episode (Nov 08), Randall Hyde said:
> 
>>It appears that character-at-a-time file I/O is *exceptionally* slow.
>>...  reasonable, though not stellar, performance under
>>Windows and Linux. However, with the port to FreeBSD I'm seeing a
>>three-orders-of-magnitude performance loss. ...
> 
> What timings does 
> "dd if=/usr/include/sys/socket.h of=/dev/null ibs=1 obs=64k" report? 
> It takes about .4 sec on my non-idle dual pIII-900 system.  Try
> truss'ing your program as it runs; maybe the program is doing some
> extra syscalls you aren't aware of?

You should also carefully do an strace or similar on
Windows and Linux as well.  You may find that you're
doing a system call per byte on FreeBSD but not on
those other systems.

Tim Kientzle


More information about the freebsd-hackers mailing list