Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Setting dirty_ratio at boot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1556
Location: Germany

PostPosted: Wed Jun 21, 2017 10:06 am    Post subject: Setting dirty_ratio at boot Reply with quote

Hi, I tried to modify the default dirty_ratio to 50 at boot, but curiously it is not applied and always still 40. I only found these 2 places for sysctl.conf and the app-laptop/laptop-mode-tools, where it could get set, but who else could set that option?
Code:
# grep -i "^[^#].*dirty.*ratio.*" -R /etc 2>/dev/null

/etc/sysctl.d/my_sysctl.conf:vm.dirty_background_ratio = 10
/etc/sysctl.d/my_sysctl.conf:vm.dirty_ratio = 50

/etc/laptop-mode/laptop-mode.conf:LM_DIRTY_RATIO=60
/etc/laptop-mode/laptop-mode.conf:OLM_DIRTY_RATIO=50
/etc/laptop-mode/laptop-mode.conf:LM_DIRTY_BACKGROUND_RATIO=1
/etc/laptop-mode/laptop-mode.conf:NOLM_DIRTY_BACKGROUND_RATIO=10

# sysctl -a | grep dirty.*ratio
vm.dirty_background_ratio = 10
vm.dirty_ratio = 40


# service sysctl status
 * status: started

# service laptop_mode status
 * status: started

# service sysctl restart
 * WARNING: you are stopping a boot service
 * Configuring kernel parameters ...                 [ ok ]

# sysctl -a | grep dirty.*ratio
vm.dirty_background_ratio = 10
vm.dirty_ratio = 50

# service laptop_mode restart
 * WARNING: you are stopping a boot service
 * Stopping laptop_mode ...
Failed to re-set power saving mode for wireless card                                                                                 [ ok ]
 * Starting laptop_mode ...
Failed to re-set power saving mode for wireless card     

# sysctl -a | grep dirty.*ratio
vm.dirty_background_ratio = 10
vm.dirty_ratio = 40

_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G|amd64:HP EliteBook 8560w,i7-2620M,16G|Acer Z5610 (Core2QuadQ8200),8G|amd64-prefix:OpenSuse|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Lila-Theme
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5762

PostPosted: Wed Jun 21, 2017 5:16 pm    Post subject: Reply with quote

Does running `sysctl --system` manually pick up those settings?
Back to top
View user's profile Send private message
Massimo B.
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1556
Location: Germany

PostPosted: Mon Jul 03, 2017 5:50 am    Post subject: Reply with quote

Yes, it does. After a fresh system start-up:
Code:
# sysctl -a | grep dirty.*ratio
vm.dirty_background_ratio = 10
vm.dirty_ratio = 40

# sysctl --system
* Applying /etc/sysctl.d/my_sysctl.conf ...
vm.dirty_background_ratio = 10
vm.dirty_expire_centisecs = 6000
vm.dirty_ratio = 50
vm.dirty_writeback_centisecs = 1000
* Applying /etc/sysctl.conf ...
net.ipv4.ip_forward = 0

# sysctl -a | grep dirty.*ratio
vm.dirty_background_ratio = 10
vm.dirty_ratio = 50

_________________
ppc:PowerBook5,8 15"(1440)-G4/1.67,2G|amd64:HP EliteBook 8560w,i7-2620M,16G|Acer Z5610 (Core2QuadQ8200),8G|amd64-prefix:OpenSuse|HP EliteDesk 800G1 i7-4790|HP Compaq Pro 6300 i7-3770
Lila-Theme
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum