rstats saves to NVRAM every 24 hours, when will it fail?

Discussion in 'Tomato Firmware' started by lanmtl, Dec 2, 2009.

  1. lanmtl

    lanmtl Addicted to LI Member

    Yet another question...
    I have set rstats to save the history to the NVRAM every 24 hours. I understand NVRAM only has a set number of write cycles, so I was wondering: how long before it fails? I appreciate it depends on a lot of things but I'd like to get a rough idea. Has anyone bricked their router by too many NVRAM writes?
  2. mraneri

    mraneri Network Guru Member

    Probably would be hard to tell if a router was bricked because of flash writes... It's definitely possible, but would be hard to identify the cause.

    Most flash devices can handle 100k writes. Some 1 million writes... So, theoretically, this shouldn't be a problem... But I prefer to backup to an FTP site. That way no risk at all...

    - Mike
  3. jan.n

    jan.n LI Guru Member

    I don't know what type of flash our devices actually use, but properly implemented wear-level algorithms should prevent early death of the flash chips, if you leave enough free space in JFFS, that is.

    But on the other hand I don't even know IF they implemented wear-level algorithms...
  4. mstombs

    mstombs Network Guru Member

    I'm sure a big jffs partition does wear levelling as the flash blocks used will rotate around the available space, there's also ram caching going on because files are not always written if you don't shutdown properly before re-booting.

    The nvram is different, the same 64kB erase blocks will be erased and written to every time there is an "nvram commit", and must be a weak point. OpenWRT no longer uses nvram vars for this reason. You should be OK for manually initiated writes on config change, but there are also auto writes on WAN reconnection (for ddns etc). Auto writes once per day shouldn't be a big issue, but logging writes every second would be expected to wear out the flash in a couple of weeks.
  5. rhester72

    rhester72 Network Guru Member

    Well, in fairness, OpenWRT moved away from NVRAM because they support quite a number of devices that have no NVRAM ;)

  6. lanmtl

    lanmtl Addicted to LI Member

    I'd love to do that, could you copy paste the scripts you use please?
    I found some on google but it didn't work and corrupted all my bandwidth usage data
  7. Toastman

    Toastman Super Moderator Staff Member Member

    I can't offer any analysis of statistics but one of the sites I took over from a client has been logging bandwidth stats every 30 minutes, it is running tomato 1.19 so I guess it's probably approaching 1.5 - 2 years old. It's a GL.
  8. karogyoker

    karogyoker Addicted to LI Member

    bumping for request this kind of script! :hubba:
  9. mraneri

    mraneri Network Guru Member

  10. mraneri

    mraneri Network Guru Member

    You do have to follow all the instructions carefully or you will lose what stats you currently have stored in the router.
  11. lanmtl

    lanmtl Addicted to LI Member

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice