The free command output of my server is currently like below:
# free -m total used free shared buffers cached Mem: 995 780 205 0 49 599 -/+ buffers/cache: 140 854 Swap: 0 0 0
We know that the dd application generally employs the page cache to accelerate the file access.
After issuing the command:
dd if=/dev/zero of=2.txt bs=1M count=10
The following output shows that the page cache has increased by 10M or so.
# free -m total used free shared buffers cached Mem: 995 790 215 0 49 599 -/+ buffers/cache: 140 854 Swap: 0 0
The preceding output is normal.
Then I ran
synccommand that will sync the content in page cache to hard disk along again with a
free -mcommand.
Nothing changed as follows. Is it related to the write back mechanism? which stipulates the page cache won't be reclaimed despite the sync command's execution, unless this part of page cache is being changed.
Or the page cache won't be recycled at all until the kernel parameter /proc/sys/vm/drop_caches gets modified?
# free -m total used free shared buffers cached Mem: 995 790 205 0 49 599 -/+ buffers/cache: 140 854 Swap: 0 0 0
If so, how much is the maximum size the cache in 'free -m' can reach? Is there any kernel parameters controlling it? Thanks.