Not a member yet? Why not Sign up today
Create an account  

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
XanMod and vm.vfs_cache_pressure values

#1
I'm just testing last XanMod kernel with sysctl.conf vm.vfs_cache_pressure=50 to see how it works under heavy cache load from video editing, and also under online gaming with the help of my friends on three different computers. 8)

Code:
cat /proc/sys/vm/vfs_cache_pressure
50

Advice: 4.4.0-xanmod1 sets vm.vfs_cache_pressure=75 -- January 14, 2016.
Advice: 4.5.0-xanmod2 sets vm.vfs_cache_pressure=50 -- March 23, 2016.
"(...) the grandest occasion the past or present has seen, or the future can hope to see." -- Cervantes.
Reply

#2
Thanks for the valuable collaborations tropic!

Some articles I researched to complement:
https://www.kernel.org/doc/Documentation/sysctl/vm.txt
http://www.gluster.org/community/documen...nel_Tuning
https://bbs.archlinux.org/viewtopic.php?id=184655
Reply

#3
Thank you, Xan, glad to help! After near two hours of online gaming in three computers, vm.vfs_cache_pressure=50 works like a charm with 4.3.3-xanmod8#2! 8)
Thank you also for the research, I'll have a look. Tongue
"(...) the grandest occasion the past or present has seen, or the future can hope to see." -- Cervantes.
Reply

#4
Now testing downloading, uncompressing and managing large files > 2Gb. Done, OK.
Now testing 720p movies and video converting using FF MultiConverter.  Done, OK.
All fine for me with vm.vfs_cache_pressure=50, hope for somebody else too!  8)

*vm.vfs_cache_pressure values tested: 10,20,30,40,50,60,70,80,90,120,150,200.
"(...) the grandest occasion the past or present has seen, or the future can hope to see." -- Cervantes.
Reply

#5
Increased performance and responsiveness are observed when vm.dirty_ratio=50 and vm.vfs_cache_pressure=50 are both set in sysctl.conf file. A must have tweak!  :Smile

Code:
cat /proc/sys/vm/dirty_ratio
50

*vm.dirty_ratio=40,50,60,70,80 tested with vm.vfs_cache_pressure=50.
"(...) the grandest occasion the past or present has seen, or the future can hope to see." -- Cervantes.
Reply

#6
Since You're working on laptop it is like You're having UPS. On machines that could loose power and that have valuable data that is sort of gambling... We're back to my writing that there are no general solutios just local (better to say personal and bound to this moment) ones...
"Everything has been thought of before, but the problem is to think of it again.“Goethe
Reply

#7
(08-01-2016, 12:27 PM)zika link Wrote: Since You're working on laptop it is like You're having UPS. On machines that could loose power and that have valuable data that is sort of gambling... We're back to my writing that there are no general solutios just local (better to say personal and bound to this moment) ones...

If that issue would be a serious problem for the users, Linux mainline kernel will come out of the box with vm.dirty_ratio=0 set by default to avoid system issues. So I have tested vm.dirty_ratio=0 and vm.dirty_ratio_background=0 and the experience was quite bad (transferring rate from SD decreased from 6.9 Mb/s to 4.1 Mb/s, and movies also get laggy and freezing). I set also vm.dirty_writeback_centisecs=100 instead of default value just to flush writeback each second, for safety reasons. 8)

Code:
cat /proc/sys/vm/dirty_writeback_centisecs
100

https://wiki.mikejung.biz/Ubuntu_Performance_Tuning
"(...) the grandest occasion the past or present has seen, or the future can hope to see." -- Cervantes.
Reply

#8
Great tips here , gotta check those in the future.
Reply

#9
(08-01-2016, 08:48 PM)altman link Wrote: Great tips here , gotta check those in the future.

Thank you, Altman, nice to see you again and nice to read again you nice words of support! Smile
"(...) the grandest occasion the past or present has seen, or the future can hope to see." -- Cervantes.
Reply

#10
(08-01-2016, 08:52 PM)tropic link Wrote: [quote author=altman link=topic=13.msg158#msg158 date=1452286082]
Great tips here , gotta check those in the future.

Thank you, Altman, nice to see you again and nice to read again you nice words of support! Smile
[/quote]

Lol , no problem mate , thanx again .
Reply

#11
Important advice:

All the unofficial tweaks proposed here enhance in some way the XanMod kernel, opening new lines for useful future discussions and new development ideas. Xan updates himself the kernel when something makes it more fast, stable and secure. By now, every last XanMod kernel is just enough by itself to make your computer a champion in any benchmark you can test, with no tweaking needed. Smile
"(...) the grandest occasion the past or present has seen, or the future can hope to see." -- Cervantes.
Reply

#12
(08-01-2016, 05:03 AM)tropic link Wrote: Increased performance and responsiveness are observed when vm.dirty_ratio=50 and vm.vfs_cache_pressure=50 are both set in sysctl.conf file. A must have tweak!  :Smile

Code:
cat /proc/sys/vm/dirty_ratio
50

*vm.dirty_ratio=40,50,60,70,80 tested with vm.vfs_cache_pressure=50.

Not the same results at all on my side , but it s an older Xan kernel :
Code:
cat /proc/sys/vm/dirty_writeback_centisecs
500

Code:
uname -a
Linux altima 4.3.0-xanmod4 #1 SMP Tue Dec 8 13:30:20 UTC 2015 x86_64 GNU/Linux
Reply

#13
Altman, to test these settings, you should edit sysctl.conf:
Code:
sudo gedit /etc/sysctl.conf
Then you should add these lines at the end of the file:
Quote:vm.dirty_ratio=50
vm.vfs_cache_pressure=50
vm.dirty_writeback_centisecs=100
Just reboot. To ensure that sysctl.conf is loaded properly, just type:
Code:
cat /proc/sys/vm/vfs_cache_pressure
50
cat /proc/sys/vm/dirty_ratio
50
cat /proc/sys/vm/dirty_writeback_centisecs
100
To reload sysctl without reboot just type: sudo sysctl -p

Please, remember that these settings are for testing purposes only. Smile

*
Very important advice: if you are an user of TLP for power management, then:
Code:
sudo gedit /etc/default/tlp
Now you should change the next lines as below:
Quote:MAX_LOST_WORK_SECS_ON_AC=1
MAX_LOST_WORK_SECS_ON_BAT=1
Edit1: The value of '1' means the same that [i]vm.dirty_writeback_centisecs=100.
Edit2: Also this value of '1' means that automatically vm.dirty_expire_centisecs=100.
Important advice: TLP config file always overrides the sysctl.conf file.
Tongue
"(...) the grandest occasion the past or present has seen, or the future can hope to see." -- Cervantes.
Reply

#14
Thanx Tropic , will check it out. Nice tips.

Love the part that you don t need to reboot in order to have these commands to be in the system.
Reply

#15
Xan, I have seen that you set the cache_pressure to 75. Smile  Testing vm.dirty_ratio=50, 55, 60, 65, 70, 75, 80, 85, 90 with vm.vfs_cache_pressure=75. 8)
*with vm.dirty_writeback_centisecs=100
"(...) the grandest occasion the past or present has seen, or the future can hope to see." -- Cervantes.
Reply

#16
(16-01-2016, 02:26 AM)tropic link Wrote: Xan, I have seen that you set the cache_pressure to 75. Smile  Testing vm.dirty_ratio=50, 55, 60, 65, 70, 75, 80, 85, 90 with vm.vfs_cache_pressure=75. 8)
*with vm.dirty_writeback_centisecs=100

Lots of experiments here Tropic ! Good work & tips for other members.
Reply

#17
Quote:Lots of experiments here Tropic ! Good work & tips for other members.
Thank you Altman, you always have good words for all. Smile
"(...) the grandest occasion the past or present has seen, or the future can hope to see." -- Cervantes.
Reply

#18
lol , I try .
Reply

#19
(16-01-2016, 02:26 AM)tropic link Wrote: Testing vm.dirty_ratio=50, 55, 60, 65, 70, 75, 80, 85, 90 with vm.vfs_cache_pressure=75.

After brief transferring tests from SD card, best values for me were 70, 75 and 80.
*with vm.dirty_writeback_centisecs=100.
Please, remember that these values are for testing purposes only. Smile

https://lonesysadmin.net/2013/12/22/bett...rty_ratio/
"(...) the grandest occasion the past or present has seen, or the future can hope to see." -- Cervantes.
Reply

#20
Just so you guys are aware, dirty_writeback_centisecs is no longer used.. it's even in the comment in kernel/sysctl_binary.c Wink

Code:
/* VM_DIRTY_WB_CS "dirty_writeback_centisecs" no longer used */
Reply


[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Forum Jump:


Users browsing this thread:
1 Guest(s)