0

What would be the optimal scheduler settings for a RaspberryPi2 running as a DHCP/DNS only server (dnsmasq). How to minize wear on the SD card?

1 Answer 1

2

the scheduler has no influence on the amount of IO usage your SD card sees. So, that doesn't matter at all – you should just stay with the default.

What does matter is whether you write logs to SD card. But that's easy to solve: simply mount a USB SSD or similar, and have your daemons write their logs and have their state information on that instead of on the SD card. Generally a good idea to move the whole /var/log hierarchy away from the SD card, seeing how often we see symptoms of people's SD cards dying here, which in turn causes more logging, which in turn causes more writing.

4
  • I guess writing logs(and dhcp cache ) to some memory device would be sufficient. Ehat would be the best way to do that?
    – theking2
    Feb 14 at 22:28
  • as said, mount your USB drive and mount the whole of /var there? Feb 14 at 22:29
  • but what usb drive? just any inserted USB storage device?
    – theking2
    Feb 15 at 22:06
  • you'd pick something you expect to live longer than an SD card. That can be a good usb thumb drive, that can be an external SSD. You'd format it with a sensible file system – ext4, or XFS, for example – add it to your /etc/fstab via its UUID (so it gets mounted as /var on reboot, no matter where and how it's plugged in), shut down, then you'd take your SD card and your USB stick to your PC, move over the old contents of /var from the SD card to the USB drive, and insert both into your RPi, and boot that. Feb 15 at 22:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .