Community discussions

MikroTik App
 
abaxas
just joined
Topic Author
Posts: 9
Joined: Thu Jul 28, 2022 3:56 pm

Graphing - Store to disk / disk wear.

Sat Jul 30, 2022 7:44 pm

Hi all,

Model : hEX (mmips)

Just a quickie. I've set up 'graphing' to see data flows and set the "store every" to 5 minutes and "store to disk" is set ON.

Should I be worried about wear on the flash memory? Maybe I should tone down the settings?
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11982
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Graphing - Store to disk / disk wear.

Sun Jul 31, 2022 4:16 am

 
User avatar
Buckeye
Forum Veteran
Forum Veteran
Posts: 887
Joined: Tue Sep 11, 2018 2:03 am
Location: Ohio, USA

Re: Graphing - Store to disk / disk wear.

Sun Jul 31, 2022 5:04 am

Unfortunately, in that 17 year old post, @normis just complained about the topic and said it had been previously explained, without any reference to where it is explained, and summarized it as follows.
oh not again the infamous `flash wearing out` topic. it was already explained that this number represents the TOTAL writes per flash, not per sector. even with higher rates, you will be able to live a few years with the flash.
But what type of flash was being used at the time, and its durability compared to what is being produced now I don't know. I also don't know how good the wear leveling in the onboard flash is in the hEX.

I did change mine to
/tool graphing
set store-every=24hours

And it still averaged over 66 sectors written per hour (over the previous 140 hours (5 days 20 hours)
[demo@MikroTik] > /system/routerboard/print 
       routerboard: yes
        board-name: hEX S
             model: RB760iGS
     serial-number: **redacted**
     firmware-type: mt7621L
  factory-firmware: 6.46.4
  current-firmware: 6.47.10
  upgrade-firmware: 7.4
[demo@MikroTik] > /tool graphing/print
   store-every: 24hours
  page-refresh: 300
[demo@MikroTik] > /system resource print
                   uptime: 5d20h29m42s
                  version: 7.4 (stable)
               build-time: Jul/19/2022 11:25:54
         factory-software: 6.46.4
              free-memory: 202.3MiB
             total-memory: 256.0MiB
                      cpu: MIPS 1004Kc V2.15
                cpu-count: 4
            cpu-frequency: 880MHz
                 cpu-load: 1%
           free-hdd-space: 4240.0KiB
          total-hdd-space: 16.0MiB
  write-sect-since-reboot: 9284
         write-sect-total: 399536
               bad-blocks: 0%
        architecture-name: mmips
               board-name: hEX S
                 platform: MikroTik
[demo@MikroTik] > 
One thing I don't know is if when a "normal" shutdown or reboot is done whether the ram it flushed or not. If the power is just disconnected, it would seem you would lose any data since the last write was done, but my question is if you do a reboot, will you still lose up to a day's worth of samples?

This by @mrz seems to indicate that no extra flush is done on requested reboot.
24h setting means that it will store data every 24hours if your router reboots before that nothing will be stored.
What exactly is not working with 5min?
Does anyone know if a requested reboot (or upgrade or shutdown) flushes the data to disk before shutting off and losing RAM in v7?

I also don't know if there is any hook to link a script to before shutdown is done, or if there is a command to force a write to disk "now" or not.
Last edited by Buckeye on Sun Jul 31, 2022 12:30 pm, edited 1 time in total.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10195
Joined: Mon Jun 08, 2015 12:09 pm

Re: Graphing - Store to disk / disk wear.

Sun Jul 31, 2022 11:48 am

Hi all,

Model : hEX (mmips)

Just a quickie. I've set up 'graphing' to see data flows and set the "store every" to 5 minutes and "store to disk" is set ON.

Should I be worried about wear on the flash memory? Maybe I should tone down the settings?
I have had a RB2011 setup with graphing of a lot of interfaces for some time and indeed it had accumulated flash errors.
(aside from having flash sectors written counts so high that lots of users on the forum would completely freak out)
 
User avatar
mkx
Forum Guru
Forum Guru
Posts: 11439
Joined: Thu Mar 03, 2016 10:23 pm

Re: Graphing - Store to disk / disk wear.

Sun Jul 31, 2022 10:21 pm

24h setting means that it will store data every 24hours if your router reboots before that nothing will be stored.
What exactly is not working with 5min?
Does anyone know if a requested reboot (or upgrade or shutdown) flushes the data to disk before shutting off and losing RAM in v7?
My own experience agrees with quoted text by @mrz ... I don't experience too many blackouts (most devices are on UPSes) but I still get a hole in data now and then. Recently holes became more frequent due to upgrades of ROS v7. But the same happens in v6, requested reboot creates a hole in stats data.
 
jaxed8
Member Candidate
Member Candidate
Posts: 195
Joined: Tue Jul 27, 2021 8:25 pm

Re: Graphing - Store to disk / disk wear.

Mon Aug 01, 2022 6:32 am

I think it's better to just use Prometheus and Grafana for that (fancier).
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 3291
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Graphing - Store to disk / disk wear.

Mon Aug 01, 2022 8:36 am

Or any external tools Syslog/SNMP

See my signature
 
mducharme
Trainer
Trainer
Posts: 1777
Joined: Tue Jul 19, 2016 6:45 pm
Location: Vancouver, BC, Canada

Re: Graphing - Store to disk / disk wear.

Mon Aug 01, 2022 9:03 am

I am using 24 hours as a setting, and I'm not seeing holes in my data from reboots.

Who is online

Users browsing this forum: Bing [Bot], BioMax and 23 guests