Projects tigase _server server-core Issues #569
Shrink statistics history if there isn't sufficient memory (#569)
wojciech.kapcia@tigase.net opened 9 years ago
Due Date
2016-03-20

Shrink size of retained statistics history if the remaining memory is below (preferably configurable) threshold

Andrzej Wójcik (Tigase) commented 9 years ago

I implemented this feature and it reduces number of entries of StatisticsList. I decided to skip shrinking of other statistics as they are rather small in size (single entry there is int, long of float).

By default statistics history cache will be reduced if memory is used in more than 95% - this can be changed by stats-high-memory-level property of stats component which is @int@.

Reduction will take place when next entry is added to cache when there is more memory used than specified. Half of existing entries will be removed. If during next addition of item same thing will occur then half of left entries will be removed. I set minimal number of entries in this cache to 5, so there should be at least 5 last entries.

wojciech.kapcia@tigase.net commented 9 years ago

Tested and confirm it works as expected;

Daniel, can you add information about new feature and config option to the 7.2.0 documentation in master branch?

stats/stats-high-memory-level[I]=95
issue 1 of 1
Type
New Feature
Priority
Normal
Assignee
RedmineID
3529
Version
tigase-server-8.0.0
Spent time
24h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#569
Please wait...
Page is in error, reload to recover