Memory Consumption Logging and Status
24 August 2022 02:04 PM
|
|
With the release of MarkLogic Server versions 8.0-8 and 9.0-4, detailing memory use broken out by major areas is periodically recorded to the error log. These diagnostic messages can be useful for quickly identifying memory resource consumption at a glance and aid in determining where to investigate memory-related issues. Error Log Message and Description of DetailsAt one hour intervals, an Info level log message will be written to the server error log in the following format:
The error log entry contains memory-related figures for non-zero statistics: raw figures are in megabytes; percentages are relative to the amount of physical memory reported by the operating system. Except for Memory : percentage of physical memory consumed by the MarkLogic Server processphys : size of physical memory in the machinesize : total process memory for the MarkLogic process; basically huge+anon+swap+file on Linux. This includes memory-mapped files, even if they are not currently in physical memory.swap : swap consumed by the MarkLogic Server processrss : Resident Set Size reported by the operating systemanon : anonymous mapped memory used by the MarkLogic Serverfile : total amount of RAM for memory-mapped data files used the MarkLogic Server---the MarkLogic Server executable itself, for example, is memory-mapped by the operating system, but is not included in this figureforest : forest-related memory allocated by the MarkLogic Server processcache : user-configured cache memory (list cache, expanded tree cache, etc.) consumed by the MarkLogic Server processregistry : memory consumed by registered querieshuge : huge page memory reserved by the operating systemjoin : memory consumed by joins for active running queries within the MarkLogic Server processunclosed : unclosed memory, signifying memory consumed by unclosed or obsolete stands still held by the MarkLogic Server processIn addition to reporting once an hour, the Info level error log entry is written whenever the amount of main memory used by MarkLogic Server changes by more than five percent from one check to the next. MarkLogic Server will check the raw metering data obtained from the operating system once per minute. If metering is disabled, the check will not occur and no log entries will be made. With the release of MarkLogic Server versions 8.0-8 and 9.0-5, this same information will be available in the output from the function <host-status xmlns="http://marklogic.com/xdmp/status/host"> . . . <memory-process-size>246162</memory-process-size> <memory-process-rss>27412</memory-process-rss> <memory-process-anon>54208</memory-process-anon> <memory-process-rss-hwm>73706</memory-process-rss-hwm> <memory-process-swap-size>0</memory-process-swap-size> <memory-system-pagein-rate>0</memory-system-pagein-rate> <memory-system-pageout-rate>14.6835</memory-system-pageout-rate> <memory-system-swapin-rate>0</memory-system-swapin-rate> <memory-system-swapout-rate>0</memory-system-swapout-rate> <memory-size>147456</memory-size> <memory-file-size>279</memory-file-size> <memory-forest-size>1791</memory-forest-size> <memory-unclosed-size>0</memory-unclosed-size> <memory-cache-size>40960</memory-cache-size> <memory-registry-size>1</memory-registry-size> . . . </host-status>
The messages are reported if the total memory used by the mentioned areas is greater than 90% of physical memory ( Both Data Encryption Scenario: An encrypted file cannot be memory-mapped and is instead decrypted and read into anon memory. Since the file that is decrypted in memory is not file-backed it cannot be paged out. Therefore, even though encrypted files do not require more memory than unencrypted files, they become memory-resident and require physical memory to be allocated when they are read. If the hosts are encountering these warnings, memory use should be monitored closely. Remedial action to support memory requirements might include:
Other action might include:
SummaryThis enhancement to MarkLogic Server allows for easy periodic monitoring of memory consumption over time, and records it in a summary fashion in the same place as other data pertaining to the operation of a running node in a cluster. Since all these figures have at their source raw Meters data, more in-depth investigation should start with the Meters history. However, having this information available at a glance can aid in identifying whether memory-related resources need to be explored when investigating performance, scale, or other like issues during testing or operation. Additional ReadingKnowledgebase: RAMblings - Opinions on Scaling Memory in MarkLogic Server | |
|