This ocurred to me as well. Always best to aim to be a good neighbour Yes, good neighbours. I propose then that swapset will have a set of override settings it will apply only when compcache is active. The trick will be managing to convince them to apply after swappolube's /etc/event.d/tuning gets executed. Hopefully upstart has dependencies in there somewhere. Yes, it has. Just use start on stopped tuning This will start your script after 'tuning' script has stopped its activity. We may use stopped here, as it terminates after setting its values. Otherwise just use start on started tuning and wait a few seconds. There is also something like "signal" or "emit" afairc. I'm thinking a set of defaults as given in this thread, with another set of overrides in /etc/default/swapset, i.e. Code: # Size of cache in KB #COMPCACHE_SIZE = "65536" # Swap priorities #PRIORITY_COMPCACHE = "15" #PRIORITY_EXTERNAL = "10" #PRIORITY_INTERNAL = "0" # Timeout for device node to be ready in seconds #COMPCACHE_TIMEOUT = "10" # VM tuning for compcache DEFAULT_COMPCACHE_TUNING = "true" #vm_dirty_ratio = "3" #vm_dirty_background_ratio = "3" #vm_dirty_writeback_centisecs = "100" #vm_dirty_expire_centisecs = "100" #vm_min_free_kbytes = "32" #vm_swappiness = "95" #vm_vfs_cache_pressure = "200" #vm_page-cluster = "0" #int_nr_requests = "4000" #ext_nr_requests = "4000" The next item I wanted to add to swapset before my hiatus was a semaphore to signal the device booted OK to prevent reboot loops. Something simple, like an empty file when it starts that it then removes at the end. If it finds the file on boot, don't apply the settings and report to the user. Should hopefully make things safer. Nice idea, like power kernel does maybe. Anyway, I'll get on this once I get a few minutes and:Add boot semaphore Fix timeout bug reported by peterleinchen Fix bug reported by alfred, which IIRC, was due to having a SD card active without a swap partition on it (wish this forum saved sent PMs! - Incidentally, please email me bugs for exactly this reason) this forum saves sent PMs, just enable it under your preferences Pull in override params from config file /etc/default/swapset Override swappolube settings when compcache is active That everything? More or less yes. I found another bug, I think: if [ $compcache_succeeded ] always is true, use if [ -e /dev/ramzswap0 -a -z "$(grep ramzswap0 < /proc/swaps)" ] instead
# Size of cache in KB #COMPCACHE_SIZE = "65536" # Swap priorities #PRIORITY_COMPCACHE = "15" #PRIORITY_EXTERNAL = "10" #PRIORITY_INTERNAL = "0" # Timeout for device node to be ready in seconds #COMPCACHE_TIMEOUT = "10" # VM tuning for compcache DEFAULT_COMPCACHE_TUNING = "true" #vm_dirty_ratio = "3" #vm_dirty_background_ratio = "3" #vm_dirty_writeback_centisecs = "100" #vm_dirty_expire_centisecs = "100" #vm_min_free_kbytes = "32" #vm_swappiness = "95" #vm_vfs_cache_pressure = "200" #vm_page-cluster = "0" #int_nr_requests = "4000" #ext_nr_requests = "4000"