Hi,
what happens if a write cache (trend/text/history) is full?
When it fills up (e.g. due to performance issues related to the database), I noticed that it finally gets back healthy very quickly - as if all non cache related data isn't accepted any more until all cached data is processed.
Edit:
What I found out so far for release 2.0.6 (on precondition I didn't get it wrong):
Haven't found anything yet that could lead to rejecting new data if free cache size is below a threshold and it is freed again.
Edit:
I think I got it.
If history cache is full the current value processing is paused and some kind of defragmentation kicks in that fills gaps in the cache with data from the end of the cache.
If the defragmentation didn't free space the same procedure will be retried a second later.
what happens if a write cache (trend/text/history) is full?
When it fills up (e.g. due to performance issues related to the database), I noticed that it finally gets back healthy very quickly - as if all non cache related data isn't accepted any more until all cached data is processed.
Edit:
What I found out so far for release 2.0.6 (on precondition I didn't get it wrong):
- Never sleep longer than 5 seconds between history syncs (CONFIG_HISTSYNCER_FREQUENCY=5).
- After initial history sync immediately sync again if more than 1000 or less than 200 items have been synced (ZBX_SYNC_MAX=1000).
Otherweise sleep 1000 / 'synced items' seconds until next history sync. - After every non-initial history sync, if less than 1000 but more than 500 items have been synced then wait as long as the last time .
If three times in a row more than 1000 items have been synced sleep a second shorter till next history sync.
If three times in a row less than 500 items have been synced then sleep a second longer.
Haven't found anything yet that could lead to rejecting new data if free cache size is below a threshold and it is freed again.
Edit:
I think I got it.
If history cache is full the current value processing is paused and some kind of defragmentation kicks in that fills gaps in the cache with data from the end of the cache.
If the defragmentation didn't free space the same procedure will be retried a second later.