Ad Widget

Collapse

Performance of "sec" vs "#num" in trigger functions

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jcf028
    Junior Member
    • May 2022
    • 8

    #1

    Performance of "sec" vs "#num" in trigger functions

    Hi,

    When using trigger functions such as min, max and avg, what unit for time has better performance (sec or #num)?

    For instance, assuming I collect 'vm.memory.size[pused]' every minute, which of these two operations would put less load on the database/run faster?

    1 - avg(//vm.memory.size[pused],15m) > 85

    2 - avg(//vm.memory.size[pused],#15) > 85

    I would assume the second option puts less load on the server because it just gets the last 15 values and no time comparison needs to be done, but I'm not sure. Anyway, I was just curious to see what puts less load on the Zabbix server specially when doing this for 1000+ servers.

    Thank you
    Last edited by jcf028; 12-07-2022, 20:50.
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1782

    #2
    This is interesting question, subscribing if someone has actual facts!

    Ok the editor decided to remove most of my text so I lost long text... rewriting in fewer words

    It is important to know that Zabbix server value cache (in memory) is used for trigger calculations (instead of slow database access) whenever possible, so value cache usage should be monitored and server configuration (ValueCache) adjusted when running out of value cache.

    And, as you hinted, it is important to also keep the timespans in triggers as short as possible to prevent unnecessary calculations whenever new values are received and the triggers are calculated.

    Markku
    Last edited by Markku; 12-07-2022, 20:15.

    Comment

    Working...