# sysctl.conf not applying dirty_writeback_centisecs

## hippo

Hi 

I've been taking suggestions from powertop, one of which was this:

Suggestion: increase the VM dirty writeback time from 5.00 to 15 seconds with:

  echo 1500 > /proc/sys/vm/dirty_writeback_centisecs

This wakes the disk up less frequently for background VM activity

I changed the value in sysctl.conf but it hasn't changed after reboot..

colin@hippo:~  $ grep dirty_writeback_centisecs /etc/sysctl.conf

vm.dirty_writeback_centisecs = 1500

colin@hippo:~  $ cat /proc/sys/vm/dirty_writeback_centisecs

500

Does anyone know why this might be or have a solution?

Thanks

Colin

----------

## hippo

My workaround is to add this line to /etc/local.d/baselayout1.start

echo 1500 > /proc/sys/vm/dirty_writeback_centisecs

I'd still like to know what is wrong with my previous approach if anyone knows...

Cheers

Colin

** HAVING PROBLEM WITH POST REPLY NOW SO EDITING THIS POST INSTEAD **

After reading this thread 

http://forum.eeeuser.com/index.php?/topic/30219-persistent-dirty-writeback-centisecs-1500/

I tried reverting my workaround and instead doing this: (note laptop-mode not laptop-tools as in thread)

cd /etc/pm/power.d

touch laptop-mode

chmod a+x laptop-mode

This worked. I'm running a desktop box so I don't need or want laptop-mode. 

It seems laptop-mode is indeed "a badly implemented pm-util script"

Cheers

ColinLast edited by hippo on Tue Mar 06, 2012 9:31 pm; edited 1 time in total

----------

## depontius

Does rc-update show the sysctl service running?  On my system it's at the "boot" runlevel.  If the sysctl service isn't run, sysctl.conf doesn't get applied.

----------

## hippo

Sorry depontius - I should have replied earlier.

Yes - rc-update shows sysctl in boot

----------

## Ant P.

I'm having a weird problem like this too. I have this file:

```
# cat /etc/sysctl.d/router.conf

net.ipv4.ip_forward=1

net.ipv4.conf.eth0.forwarding=1

net.ipv4.conf.wlan0.forwarding=1
```

At boot, with /etc/init.d/sysctl showing as "started", none of these are actually set. When I run sysctl -p /etc/sysctl.d/router.conf, it only shows it applying the last two lines.

There's definitely something weird going on with sysctl lately (1, 2), in the meantime you could try my init.d workaround and see if that helps.

----------

## toralf

Well, I set those values in the local step after all other scripts to ensure that all system settings steps are already done :

```
tfoerste@n22 ~ $ sudo cat /etc/local.d/power.start 

#!/bin/sh

#

#

#       power saving

#

F=/sys/devices/system/cpu/cpufreq/ondemand/ignore_nice_load

if [[ ! -f $F ]]; then

        echo "module acpi_cpufreq not loaded ?!"

        modprobe acpi_cpufreq

fi

echo 1 > $F || echo "$F doesn't exist !"

/usr/sbin/ethtool -s eth0 wol d

/usr/sbin/hciconfig hci0 down

/sbin/iwconfig wlan0 power on

echo 3000 > /proc/sys/vm/dirty_writeback_centisecs
```

----------

