Modifying Samba to skip file system reads for IOZONE READ and REREAD

Jeremy Allison jra at samba.org
Fri Oct 28 23:33:52 GMT 2005


On Fri, Oct 28, 2005 at 06:30:33PM -0500, Iozone wrote:
> 
> Jeremy,
> 
>        Iozone measures a filesystem's performance by writing and
>    reading files. Mr. Sharpe, provided a hack in Samba that
>    detects when Iozone is running. (keying off of the file names
>    that Iozone uses)  This hack intercepts the user's reading
>    of a file, detects that it is Iozone running, and then
>    allocates buffers and fills them in with what it knows
>    Iozone wants. Thus, the user's reads NEVER made it
>    to the filesystem at all, and the results reported by
>    Iozone will not reflect the filesystem, but a deliberate
>    HACK, specifically targeted towards circumventing
>    accurate measurement by Iozone. Thus, telling the user
>    lies. These lies will NOT reflect any other application
>    running and will only mislead the consumer into believing
>    that the system is fast, when in reality it may suck big-time !
> 
>        Richard's code is NOT cool. It is a deliberate attempt
>    to tell the users of Samba LIES. IT IS NOT COOL !
> 
>        I have immediately modified Iozone so that Richard's
>    hack will not work, and in fact, will now only serve to
>    demonstrate that Samba is broken, and returning the
>    WRONG data from a file that was just written.
>        Iozone will change the contents of its data files with every
>    new version. Any attempt to try this sort of *&&%&% again
>    will result in Iozone telling the user that Samba is broken
>    and should not be used for storing data.
> 
>    Richard: Your hack is NOT in the interest of honesty
>                  or beneficial to the public. It is just plain evil.

Ok - thanks for the update. I wanted to reassure you that this
code (to change Samba specifically for IOZONE) is *NOT* in any
version of Samba released from samba.org, and will *NEVER* be in
any version of Samba released from samba.org. We just don't cheat
in that way.

Vendor specific versions of Samba may be modified in ways unfamiliar
to us (the Samba Team) though so we can't say anything about code
not released by us. Vendors obeying the GPL have to give you the
code though (and vendors who don't obey the GPL are in license
violation and we follow up *very* agressively about that sort of
thing) so it should be easy to spot such things.

Hopefully Richard's code did not make it into any vendors
production version of Samba. There are valid reasons to do
such experiments (ensure no data is written to disk)
when you're trying to track down a bottleneck on a system and
you want to isolate the disk i/o from the network i/o to see
what performance changes this gives (ie. if you're still slow
when you're not even writing to the disk you know your network
subsystem has a severe problem :-) but no valid reasons to
add code like that into a production system.

Thanks,

	Jeremy Allison,
	Samba Team.


More information about the samba-technical mailing list