[Stgt-devel] No LUN option in target.c
Albert Pauw
albert.pauw
Mon Nov 26 13:46:59 CET 2007
Thanks Tomasz,
I didn't use the device mounted, but you are right in clearing the
caches. As told in the stuff I found on the internet regarding
drop_caches a sync is necessary first.
Would it be an idea to create a test script using e.g disktest (on
diskdevice), iozone (on filesystem) clearing the caches properly.
That way we can compare our own results better with others?
Albert
P.S. To be complete, the info on drop_caches I found on the internet:
Kernels 2.6.16 and newer provide a mechanism to have the kernel drop the
page cache and/or inode and dentry caches on command, which can help
free up a lot of memory. Now you can throw away that script that
allocated a ton of memory just to get rid of the cache...
To use /proc/sys/vm/drop_caches, just echo a number to it.
To free pagecache:
# echo 1 > /proc/sys/vm/drop_caches
To free dentries and inodes:
# echo 2 > /proc/sys/vm/drop_caches
To free pagecache, dentries and inodes:
echo 3 > /proc/sys/vm/drop_caches
As this is a non-destructive operation and dirty objects are not
freeable, the user should run "sync" first!
> It is appropriate, when used appropriately.
>
> If a block device is used (mounted, swap, md/dm etc.) it is also cached.
>
>
> One should always clear the cache if wants to measure performance (on
> the target, on the initiator, or both, depending on where the block
> device is used; to be 100% sure, clear the cache on both target and
> initiator before each test):
>
> echo 3 > /proc/sys/vm/drop_caches
>
>
More information about the stgt
mailing list