1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Is writting alot of data to /tmp/ bad?

Discussion in 'Tomato Firmware' started by devlin016, Sep 27, 2013.

  1. devlin016

    devlin016 Networkin' Nut Member

    is writing alot of data to the /tmp/ directory bad for the devices life? I have all my logs writting to the /tmp/ directory in my setup
  2. rs232

    rs232 Network Guru Member

    as far as I know /tmp is mapped into ram, so the more you write there the less ram you have available to the router. It should be ok up to a certain size, just keep an eye on the Overview/Free Memory

    root@tomato:/tmp# mount
    rootfs on / type rootfs (rw)
    /dev/root on / type squashfs (ro)
    proc on /proc type proc (rw)
    tmpfs on /tmp type tmpfs (rw)
    devfs on /dev type tmpfs (rw,noatime)
    sysfs on /sys type sysfs (rw)
    devpts on /dev/pts type devpts (rw)

    p.s. if you write the logs there they will not survive a reboot

    Ref: http://en.wikipedia.org/wiki/Tmpfs
  3. devlin016

    devlin016 Networkin' Nut Member

    I only have the logs there for debugging purposes and I have a swap partition enabled on a usb stick. so i should be all good to go right?
  4. rs232

    rs232 Network Guru Member

    I'd say so, check how much storage you could use (based on free ram) and do set a maximum log file size if you have an option anywhere
  5. devlin016

    devlin016 Networkin' Nut Member

    I dont have a log size file limit option anywhere. but say the ram on the router got filled wouldnt it just use the swap partition I gave it 200mb. My router reboots every morning at 6am so I should be good with this setup right? MY router is hosting alot of services and apps.
    Last edited: Sep 27, 2013
  6. rs232

    rs232 Network Guru Member

    I would just try, if it crashes change something, but yes swap should prevent this scenario

Share This Page