View Single Post
brontide's Avatar
Posts: 868 | Thanked: 474 times | Joined on Oct 2007 @ Capital District, NY, USA
#19
Originally Posted by jamesc760 View Post
I think the vm swappiness needs to be adjusted out of the box. The default value is '1' and it means the IT will hardly use the swap. I've set mine to '30' and it feels a bit snappier. One question I have is 'how do you make the settings stick inbetween reboots?, as I can't seem to find /etc/sysctl.conf file?
Ok, here is what I have done. This is the "Right Way"(tm) to make sysctl settings stick between reboots.

As root...

Create a file /etc/init.d/sysctl

Code:
#! /bin/sh

case "$1" in
start)
	sysctl -p > /dev/null
        ;;

*)      echo "Usage: $0 {start}"
        exit 1
        ;;
esac
chmod 755 sysctl

ln -s /etc/init.d/sysctl /etc/rc2.d/S99sysctl

and place your sysctl settings in /etc/sysctl.conf as you would on a normal system like so.

Code:
# tweak tcp                                                                                                                                                              
net.ipv4.tcp_window_scaling = 1                                                                                                                                          
net.ipv4.tcp_sack = 1                                                                                                                                                    
net.ipv4.tcp_keepalive_time = 1800                                                                                                                                       
net.ipv4.tcp_fin_timeout = 10                                                                                                                                            
net.ipv4.tcp_timestamps = 0                                                                                                                                              
net.ipv4.tcp_dsack = 1                                                                                                                                                   
net.ipv4.tcp_max_syn_backlog = 96                                                                                                                                        
net.ipv4.tcp_ecn = 1                                                                                                                                                     
net.core.rmem_max = 2097152                                                                                                                                              
net.core.wmem_max = 2097152                                                                                                                                              
net.ipv4.tcp_rmem = 16384 65536 2097152                                                                                                                                  
net.ipv4.tcp_wmem = 16384 32768 2097152                                                                                                                                  
                                                                                                                                                                         
# Make the system a little more swap happy                                                                                                                               
vm.swappiness = 50                                                                                                                                                       
vm.vfs_cache_pressure = 200                                                                                                                                              
                                                                                                                                                                         
# Lower the amount of free ram before the kernel kicks it up a notch                                                                                                     
vm.min_free_kbytes = 512                                                                                                                                                 
                                                                                                                                                                         
# swap early                                                                                                                                                             
vm.dirty_background_ratio = 5                                                                                                                                            
vm.dirty_ratio = 20                                                                                                                                                      
# This is flash, we don't face the same latency penalty as a HD so don't prefetch pages                                                                                  
# from swap                                                                                                                                                              
vm.page-cluster = 2
You can see above that I'm playing with a few more settings than before. I can now say positively that canola no longer skips and I'm pretty sure it's because of the vm.dirty* settings. Still nothing as dramatic as the previous mozilla prefs change. I think there will be some benefit for people that like lots of apps open, but many will see no improvement.

With the about:config, did you just type that into your browser and then start adding the new command lines? How did you add the 32MB swap file?
Reboot the device and then go into Control Panel -> Memory -> Virtual. I have increased my swap to 64MB and after a few hours of use it has usually swapped out 32+MB to swap and seems more responsive.

I'm still finding tidbits in the mozilla prefs that might be useful. At some point soon I'm going to have to blow away my configs to get a feeling for the defaults again.
 

The Following 8 Users Say Thank You to brontide For This Useful Post: