Ad Widget

Collapse

Historic rows per item

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Marc Franquesa
    Junior Member
    • Sep 2014
    • 3

    #1

    Historic rows per item

    Hi

    I supose that there are many posts about tunning both zabbix and mysql I followed many of them and also checked other Mysql tunning posts and articles on other sites. But this is currently a Zabbix question

    After some tunning on MySQL and reduced the number of items and their polling frequecy as well as the history to keep the DB not so huge, I'm still facing something that I dont't understand.

    My current setup is using 5 minutes polling interval (60secs in few items and more time in others) with a history of 7 days. I setup houskeeper to cleanup any item older than 7 days from history. Currently my setup reports is monitoring about 860 items, and reports 7.5 new values per second (Although my server is a little one this is far away of the 3000 nvps I seen on some examples).

    Well with 856 items =~ 860 items monitored each 5 minutes (average) this leaves me about a 860 items x 7 days x 24 x hours x 60 minutes / 5 minutes poll = 1733760 historic values

    Or if I use the new values per second (~7.5) this gives me 7.5 values x 60 secs x 60 minutes x 24 hours x 7 days = 4536000 for the historic values

    Currently my history_unit table is about 28 Millions of Rows, which is far away much more than any of the estimated number of values.

    I already tried to cleanup old values manually deleteing rows with clock before 7 days and even orphaned itmes, but the table indeed contains 28Millions of Rows.

    Why is zabbix using too many rows?
  • ingus.vilnis
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Mar 2014
    • 908

    #2
    Hello and welcome!

    At a quick glance it is really strange that you are having 28M rows in history_uint table and I have no clear clues why is it so but I could give you some pointers. (Sorry if you already checked them)
    • How long is your Zabbix server running? If you did upgrade from 2.0 to 2.2 then the housekeeer cold be disabled after upgrade thus saving all the historical values.
    • Check whether everything is correct and enabled in Administration -> General -> Housekeeping (in top right dropdown)
    • Check and try to increase MaxHousekeeperDelete= parameter in zabbix_server.conf file.


    Best Regards,
    Ingus
    Last edited by ingus.vilnis; 09-09-2014, 16:04.

    Comment

    • Marc Franquesa
      Junior Member
      • Sep 2014
      • 3

      #3
      Hi, thanks for quick response.

      Yes, I've check for myself some of the 'usual suspects'.

      I upgraded from 2 to 2.2, and houskeeper is enabled and running and I increased the MaxDelete setting.

      Also to kickoff houskeeper from the equation I manually (SQL DELETE FROM) rows form the history table:

      to remove old records:
      DELETE FROM histroy_uint WHERE clock < (1 week ago timestamp)

      to remove possibly orphan records_
      DELETE FROM histroy_uint WHERE item_id NOT IN (SELECT item) ....

      Even after this the history_uint table holds about 28M rows

      Comment

      Working...