performance problem with Samba built with pread/pwrite on HP-UX 1
don_mccall at hp.com
Wed Feb 26 15:17:18 GMT 2003
One of my teammates here at HP uncovered this, and I thought it deserved
proactive mention on the list:
It covers non-HP builds of Samba, so HP CIFS Server (HP's version of Samba
bundled with all 11.0 and above OS'es) customers are not directly affected
but those of you on the list who might build Samba yourselves on 11.11 could
Customers building their own Samba server can find that on 11.11 the
performance is slower than on 11.0 when testing with smbtorture, and
possibly slower in production. The HP produced Samba version did not have
this performance drop, because the HP version did not use pread/pwrite
calls. Also note that the problem only affects systems running on top of
JFS file systems.
Version 2.2.2 Samba can be built to use system calls pread/pwrite, instead
of using a combination of lseek (to move the pointer in the file), and
read/write. The pread/pwrite calls are fairly new to the HP-UX world,
introduced first in 11.11, and in a patch PHKL_20349 in 11.0. The Samba
build process will check if these calls are provided by the OS, and if they
are use enable their use prior to the compilation step. So under 11.11 the
use of these calls would be enabled by default.
The reason for HP not using pread/pwrite is historic, 11.0 did not have
pread/pwrite on release, and to keep the source trees the same, the 11.11
version was also build in the same way.
The newly released JFS patch is PHKL_28512 for 11.11 to address a problem
with pwrite calls and should be considered for installation on any Samba
system using the public domain builds of Samba, that have pread/pwrite
One caveat though - this problem was only found under testing using
smbtorture - so we have don't have a handle how big an issue this could be
in a production environment. But to give you an idea of the difference in
tests we found using pwrite would be over 20 times slower than the
lseek/write combinations. We also created a test program that made
extensive use of pread/pwrite calls. After applying the patch this test
program which would return in less than one second, previously the same
executable would take over 4 minutes to run.
Just to reiterate this patch does not affect the performance of HP CIFS
Server, and is not necessary for systems running this version of Samba on
11.11. 11.0 systems are not affected by this issue, with OR without
Hope this info may be useful to someone out there!
More information about the samba-technical