Re: [ANNOUNCE] Ramback: faster than a speeding bullet
From: Daniel Phillips
Date: Fri Mar 14 2008 - 01:42:51 EST
On Thursday 13 March 2008 22:22, David Newall wrote:
> I'd like to seem some science. I'd like to know how much faster it
> really is, and for that proper testing needs to be done. Since Daniel's
> scheme uses the same amount of RAM as disk, an appropriate test would be
> to pin (at least) that amount of RAM to buffer cache, and then to fill
> the cache with the contents of the disk (i.e. cat /dev/disk >
> /dev/null.) This sets the stage for tests, which tests should not
> include the sync operation. I'd like to see actual numbers against such
> a setup versus Daniel's scheme. Since buffer cache is shared by all
> disks, obviously the test must not access any other drive.
There is a correctable flaw in your experiment: loading the disk into
buffer cache does not make the cached data available to the page
cache. Maybe it should (good summer project there for somebody) but
for now you need to tar the filesystem to dev/null or similar. Note
that, because of poor cross-directory readahead, traversing a disk
like that will not be as fast as reading it linearly. On the other
hand, you will not have to read any free space into cache, which
ramback does because it does not know what is free space (or care,
really...)
Anyway, your investigative attitude is worth gold :-)
> One thing I will admit: RAM disks are fast. What I don't know is how
> much work there is to access blocks that are already in the buffer
> cache. In principle I suppose it should be a little slower, but not
> much. I'd like to know, though. I'd do the test myself if I had a
> machine with enough RAM, but I don't. Daniel (apparently) does...
You are probably OK. I used a 150 MB ramdisk, of which I used only
100 MB. That is why I used a 2.2 kernel for my tests.
Daniel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/