On Wed, 22 Nov 2006, Nancy Lin wrote:
I'm curious, has anyone published any figures on what the performance gains
are?
I just did some very simple, basic tests to convince myself that I was on
the right track.
It's very hard to measure relative performance, since you have to control
for the effects of the buffer cache. The impact of the buffer cache is so
great that it swamps everything else for both traditional UNIX and mbx
format.
With the complete mailbox data in the buffer cache, here is what the same
mailbox did for select-only, select and fetch 1:* full, and select and
thread in each format:
unix select 0.156u 0.107s 0:00.60 41.6% 0+0k 0+4io 0pf+0w
mbx select 0.060u 0.076s 0:00.49 26.5% 0+0k 0+0io 0pf+0w
mix select 0.071u 0.043s 0:00.43 25.5% 0+0k 0+0io 0pf+0w
unix fetch 6.536u 1.928s 0:09.48 89.1% 0+0k 0+0io 0pf+0w
mbx fetch 5.128u 2.252s 0:08.30 88.7% 0+0k 0+0io 0pf+0w
mix fetch 5.145u 2.081s 0:08.29 87.0% 0+0k 0+2io 0pf+0w
unix thread 1.194u 0.866s 0:02.54 80.7% 0+0k 0+0io 0pf+0w
mbx thread 1.054u 0.884s 0:02.46 78.4% 0+0k 0+8io 0pf+0w
mix thread 0.296u 0.203s 0:00.85 57.6% 0+0k 0+0io 0pf+0w
In all cases with the data in the buffer cache, mix was the clear
real-time winner. However, where mix really shines is when the mailbox
data isn't in the buffer cache.
In traditional UNIX format, the entire file is read in sequential 64K
chunks and every byte of the file is inspected.
In mbx, there is a 2K disk read followed by nmsgs 64-byte disk reads and
only those bytes are inspected. In pathological cases this can actually
be worse than traditional UNIX (although this can be resolved by using
buffered I/O), but generally it is better than traditional UNIX.
In mix, only the metadata, index, and status files need to be read, and
this is all done through stdio buffered I/O. Message data is never read
until fetching is done. This is better than either traditional UNIX or
mbx for all but the smallest mailboxes.
Since only a relatively small amount of data is read, mix doesn't
experience the extreme performance boosts from getting in the buffer cache
that traditional UNIX and mbx do. The same traditional UNIX mailbox that
takes .6 second from the buffer cache took over a minute when it wasn't in
the buffer cache.
The corrolary is that mix doesn't experience the extreme performance hit
from not being in the buffer cache. Most users won't notice the "second
open is faster" effect in mix that they do with traditional UNIX and mbx.
-- Mark --
http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
_______________________________________________
Imap-uw mailing list
[email protected]
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw