I learn a trick from Con Kolivas to purge cache...hopefully I recall
it correctly:
# tail /dev/zero
wait for few seconds...watch out to not make it OOMand most likely
some (if not at all) page cache will be purged out.
Are you sure? Does page cache get involved at all while reading
On Wed, Dec 16, 2009 at 8:32 PM, Nagaprabhanjan Bellari
nagp@gmail.comwrote:
I learn a trick from Con Kolivas to purge cache...hopefully I recall
it correctly:
# tail /dev/zero
wait for few seconds...watch out to not make it OOMand most likely
some (if not at all) page cache will
On Wed, Dec 16, 2009 at 10:10 PM, Nagaprabhanjan Bellari
nagp@gmail.com wrote:
I ask this because /dev/zero is a character device, so wondering where will
page cache come in.
tomahawkls -l /dev/zero
crw-rw-rw- 1 root root 1, 5 Nov 13 02:45 /dev/zero
By reading /dev/zero continously,
My question is why the cache is growing even after O_SYNC flag? Even
fsync does not help. But deleting file freeing the cache.
Try O_DIRECT if you want to bypass the page cache.
-Joel
--
To unsubscribe from this list: send an email with
unsubscribe kernelnewbies to ecar...@nl.linux.org
One can also write do a `echo 1 /proc/sys/vm/drop_cache` to purge the page
cache.
-nagp
On Sat, Dec 12, 2009 at 12:50 PM, Joel Fernandes agnel.j...@gmail.comwrote:
My question is why the cache is growing even after O_SYNC flag? Even
fsync does not help. But deleting file freeing the cache.
Dear list members,
I have a question about Linux page cache. I create a 10MB file using
following application code:
int fd=open(foo.txt, O_CREAT|O_RDWR|O_SYNC);
char* content=(char *)malloc(1024*1024*10);
write(fd, content, 1024*1024*10);
free(content); close(fd);
Immediately before and after
Hi!
On 19:29 Fri 04 Dec , Lal wrote:
Dear list members,
I have a question about Linux page cache. I create a 10MB file using
following application code:
int fd=open(foo.txt, O_CREAT|O_RDWR|O_SYNC);
char* content=(char *)malloc(1024*1024*10);
write(fd, content, 1024*1024*10);