Setting CentOS 5.5 up to cache the disk more heavily for wri
-
- This is my homepage
- Posts: 157
- https://www.youtube.com/channel/UC40BgXanDqOYoVCYFDSTfHA
- Joined: Mon Jul 07, 2008 1:47 pm
Re: Setting CentOS 5.5 up to cache the disk more heavily for
If you're seeing problems due to occasional large spikes in disk access and you still have free memory available, try telling Linux to cache more of those writes in memory before it forces them to be flushed to disk and stalls applications.
A high dirty_ratio will allow more memory to be used for the write cache, and a low dirty_background_ratio will ensure that it gets written to disk regularly in the background, so that it doesn't stack up:
Note that if you are seeing constant decently high amounts of disk writes, these settings probably won't help, and may even hurt. The same is true if you have a read-heavy application; with lots of reads, it's good to keep the write cache small.
A high dirty_ratio will allow more memory to be used for the write cache, and a low dirty_background_ratio will ensure that it gets written to disk regularly in the background, so that it doesn't stack up:
Code: Select all
echo 80 > /proc/sys/vm/dirty_ratio
echo 5 > /proc/sys/vm/dirty_background_ratio
Re: Setting CentOS 5.5 up to cache the disk more heavily for
Do I just enter those into the terminal?
Re: Setting CentOS 5.5 up to cache the disk more heavily for
Yes, that's correct.
Also, if you don't have much RAM free, they may not make a very big difference for you.
Also, if you don't have much RAM free, they may not make a very big difference for you.
Re: Setting CentOS 5.5 up to cache the disk more heavily for
Hmmm...I'll prolly just keep it as is and upgrade my VPS next month.
Re: Setting CentOS 5.5 up to cache the disk more heavily for
You can upgrade it whenever, because its pro-rated. So whatever you already paid goes into the upgraded servers cost. NFo Ftw.j0rd0n420 wrote:Hmmm...I'll prolly just keep it as is and upgrade my VPS next month.
Re: Setting CentOS 5.5 up to cache the disk more heavily for
I didn't have the funds to do that till the beginning of the month though.