Benchmark for mmap n KConfigBackEnd, was Bug #72586
Dr. Juergen Pfennig
info at j-pfennig.de
Fri Jan 16 22:38:16 GMT 2004
On Thursday 15 January 2004 21:56, Oswald Buddenhagen wrote:
> somebody wants to do some measurements? i'd like to know, starting from
> which file size mmap is indeed an improvement (don't forget to include
> the malloc/free for the non-mmap case). possibly it's not worth the
> whole trouble at all, given that config files don't tend to be "large".
I did some benchmarks and unfortunatately they show no effect of using
mmap or not (even as an ex-particle physicist I don't see a peek - I should
probably show it to my ancient professor who saw the peeks he wanted in
almost every data set).
*** So it is safe to remove mmap() from KConfigBackEnd ***
Is mmap() good for anything? Yes it is, if you do random walks through a file
or if you skip portions while reading. Comment out the hash-code calculation
routine in the benchmark and you see a dramatic effect with mmap.
*** Warning: if you remove mmap() from KConfigBackEnd please make sure the qt
does not have itself a problem with visible but unaccessible files ***
As attachments I added the benchmark program and an Oo doc containing the
results. I used /opt/kde3/share as test folder and I did exclude files larger
than 16k from being read. The data read is about 350 MByte so I got some disk
activity. But I hope that the benchmark was fair.
Yours Jürgen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mmapbench.cpp
Type: text/x-c++src
Size: 2582 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040116/8752c2eb/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: results.sxc
Type: application/vnd.sun.xml.calc
Size: 5634 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040116/8752c2eb/attachment.sxc>
More information about the kde-core-devel
mailing list