Results 1 to 3 of 3
Hi,
To clear the cache memory, we use the following commands :
Flush file system buffers by executing,
# sync : what does sync command Do ? Why should we ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-22-2012 #1Linux Newbie
- Join Date
- May 2012
- Posts
- 106
What is dentries and Inodes ?
Hi,
To clear the cache memory, we use the following commands :
Flush file system buffers by executing,
# sync : what does sync command Do ? Why should we use it before using the # echo 1 > /proc/sys/vm/drop_caches ?
To free page cache:
# echo 1 > /proc/sys/vm/drop_caches
To free dentries and inodes:
# echo 2 > /proc/sys/vm/drop_caches
To free page cache, dentries and inodes:
echo 3 > /proc/sys/vm/drop_caches
What is dentries and Inodes ?
Can any body explain this Please....?
Regards,
Aparna.
- 12-22-2012 #2
try here ...
- 12-26-2012 #3
Jonathan183 link should give lot of info. Here is some short info about them.
sync flushes the buffer into disk.It forces completion of pending disk writes.# sync : what does sync command Do ?
create 10000 files like
Now doCode:mkdir test && for i in {1..10000};do date > test/$i ;done
Note the sys time.Run the time cat test/* again.Check sys time,is that reduced ? that because of page cache.Code:time cat test/*
Now drop page cache
Now run time cat test/* again.See its increased.Code:# echo 1 > /proc/sys/vm/drop_caches
Do the similar thing run
Note the sys time,run it again ,you should seeCode:time ls -l test
time decreasing.
Now drop the caches of dentries and inodes:
Run check ls time again.Code:# echo 2 > /proc/sys/vm/drop_caches
cache in general is used for performance optimization.i.e no need to go and fetch the data from hard-disk.It will place the frequently accessed data into physical memory
itself.
HTHFirst they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-----
FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org


1Likes
Reply With Quote
