[ZBXNEXT-4782] Improve out of memory statistics Created: 2018 Oct 01  Updated: 2024 Apr 10  Resolved: 2018 Oct 10

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Proxy (P), Server (S)
Affects Version/s: 4.0.0rc2
Fix Version/s: 3.0.23rc1, 3.4.15rc1, 4.0.1rc1, 4.2.0alpha1, 4.2 (plan)

Type: Change Request Priority: Trivial
Reporter: Vladislavs Sokurenko Assignee: Vladislavs Sokurenko
Resolution: Fixed Votes: 0
Labels: usability
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Team: Team A
Team: Team A
Sprint: Sprint 44
Story Points: 0.25

 Description   

There is useful function zbx_mem_dump_stats which dumps various memory statistics, for example:

  9941:20181001:110548.601 === memory statistics for configuration cache ===
  9941:20181001:110548.602 free chunks of size >= 256 bytes:        1
  9941:20181001:110548.603 min chunk size:    8114960 bytes
  9941:20181001:110548.604 max chunk size:    8114960 bytes
  9941:20181001:110548.605 memory of total size 8388232 bytes fragmented into 1796 chunks
  9941:20181001:110548.605 of those,    8114960 bytes are in        1 free chunks
  9941:20181001:110548.606 of those,     244552 bytes are in     1795 used chunks
  9941:20181001:110548.606 ================================

However when out of memory error occurs it is not called.

Only this is available:

1397:20180920:030749.965 __mem_malloc: skipped 586 asked 248031720 skip_min 256 skip_max 222534240
1397:20180920:030749.966 file:vmware.c,line:87 zbx_mem_realloc(): out of memory (requested 248031720 bytes)
1397:20180920:030749.966 file:vmware.c,line:87 zbx_mem_realloc(): please increase VMwareCacheSize configuration parameter

Adding more statistics could help diagnosing out of memory errors in case there is fragmentation or something unusual.



 Comments   
Comment by Vladislavs Sokurenko [ 2018 Oct 04 ]

Implemented in:

  • 3.0.23rc1 r85554
  • 3.4.15rc1 r85555
  • 4.0.1rc1 r85556
  • 4.2.0alpha1 (trunk) r85557

improved out of memory error message by adding statistics and backtrace; improved something impossible has just happened error message by adding backtrace

Comment by richlv [ 2018 Oct 23 ]

This is a really welcome improvement, thank you.

The release notes say "improve out of memory error message by adding statistics and backtrace; improve something impossible has just happened error message by adding backtrace", but nothing about it in this issue. Was it added here?

vso yes, it was not planned though.

Generated at Fri Apr 19 15:56:33 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.