Linked Questions
31 questions linked to/from How do you empty the buffers and cache on a Linux system?
3 votes
3 answers
2k views
When is there a need to flush caches in Linux ?
I came across this . And then remembered seeing this something back. Could anybody elaborate is there any need for a user to ever flush the caches or it's only need is when you want to benchmark ...
0 votes
2 answers
4k views
How to disable the Linux page cache
The Linux kernel implements the page cache to accelerate I/O operations. It would be helpful to be able to turn off and on the page cache for research and testing. How can the Linux page cache be ...
3 votes
3 answers
3k views
Does sync command remove the dirty cache in the memory?
I am aware that sync command flushes the dirty cache into disk. I have run free command first, then sync, and then free again. The result of latter free command shows more free memory available than ...
3 votes
2 answers
2k views
Pipe Viewer - Progress monitor performance consequence
I am writing a batch script to sort through gigs and gigs of data. All of the data is text but the script will take a long long time to execute. I would like to give some visual indication that the ...
2 votes
3 answers
2k views
mmap and slow DMA transfers
I have a process that reads data from a hardware device using DMA transfers at a speed of ~4 * 50MB/s and at the same time the data is processed, compressed and written to a 4TB memory mapped file. ...
1 vote
1 answer
3k views
Is it safe to clear the buffers and cache on a linux server
After reading this link: How do you empty the buffers and cache on a Linux system?, I know that there are some commands that can help us to empty the buffers and cache of the OS. But I'm not sure if ...
2 votes
1 answer
4k views
How to analyze top command results: CPU & RAM consumption
I am working on ARM-based processor (OS version: Linux 3.4.35) and I need to analyze the processor's performance while some processes are running, by typing top command, I can see some statistics but ...
-4 votes
1 answer
1k views
How does echoing an echo not just echo in a cronjob?
I'm reading this article on clearing buffer/cache from my new Linux VMs since they're taking a full 1/3rd of my RAM, so I ran this: sync; echo 1 > /proc/sys/vm/drop_caches This immediately fixed ...
0 votes
1 answer
2k views
Buffer memory increased
My buffer memory in server got increased after taking backups from multiple servers using rsync. This disk got almost full, removed the backups. As far as I understand buffers shoot up if we perform a ...
0 votes
1 answer
2k views
Linux Cache cannot be cleared completely, it fills the entire RAM after some days
I use a laptop for work and therefore I only do a suspend to RAM rather than shutdown everyday. so I do not have to start each application again every day. after some days of "run time" I ...
1 vote
1 answer
1k views
Reading stale file data with debugfs cat
I'm trying to read the contents of a file using the file's inode. This works fine: echo "First line" > data.txt sync sudo debugfs -R "cat <$(stat -c %i data.txt)>" /dev/...
4 votes
4 answers
554 views
How can I optimize this Unix command?
The following command takes about 10 minutes to output the result find . -name "muc*_*_20160920_*.unl*" | xargs zcat | awk -F "|" '{if($14=="20160920100643" && $22=="567094398953") print $...
1 vote
2 answers
1k views
Clean RAM after some days of PC usage
I have 8GB RAM, and use my PC (Debian 10, KDE plasma 5.14.5) "normally" but with many programs running in parallel: Firefox (≈ 250 Tabs) Chromium (10 Tabs) Thunderbird 10x Okular 2x Pycharm ...
2 votes
0 answers
1k views
How do I figure out what is consuming memory?
I develop a system (x86_64 based) that runs Linux (Ubuntu 14.04.3) and has several pieces of custom built hardware connected. I have written drivers and control software for the custom hardware. ...
1 vote
1 answer
395 views
How does the diff command handle caching?
I became curious when I was diffing two large (>326MB) files, and noticed that the second run took much less time than the first. This was frustrating, since I was trying to time the second run, to ...