Alright, so I investigated this question a little bit more:
Test: 102,400,000 Megabytes to IDE disk, with Pentium 166 or something like
that.
So the timings with mmap:
Write:     ~28 sec
Reading: ~20 sec

With read/write, the speed-up stronlgly depends on how many bytes you write to
the disk at once:

Write, 4 bytes (int):    ~190 sec
Read, 4 bytes      :    ~  90 sec

Write, 1024 bytes:     ~20-22 sec (this tends to be faster than mmap)
Read, 1024 bytes:     ~20 sec
I experimented with a few write-lengths here, but it varies a lot because this
is a server, so there is not much use of  giving lots of timings here. They
were usually 20-30 secs. And it's also hard to make sure that the data from the
prev read/write are not in the swap/cache. And i don't have more time to
experiment with this. It was interesting, but now let's speed-up the X:-).
It still might be a good idea to use mmap. You can't really guarantee in many
cases that you can read long blocks at the same time, and with mmap, you just
have to use it as a memory copy virtually.
Ferenc


**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to