Server memory analysis method and device and computer readable storage medium

A memory analysis and server technology, used in computing, multi-programming devices, instruments, etc., can solve problems such as server congestion, reduce performance loss, reduce program load, and avoid data competition.

Pending Publication Date: 2022-05-17
NETEASE (HANGZHOU) NETWORK CO LTD
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] Embodiments of the present invention provide a server memory analysis method, device, and computer-readable storage medium to at least solve the technical problem of server process blockage in the prior art when statistical processes occupy the server's memory

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Server memory analysis method and device and computer readable storage medium
  • Server memory analysis method and device and computer readable storage medium
  • Server memory analysis method and device and computer readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0034] In the prior art, the usual method of server memory analysis is to firstly intercept the malloc and free of the server program, then use libuwind to collect stack call information, and send it to another consumer process for analysis through a pipeline. For example, code similar to the following:

[0035]

[0036] Among them, each time a process applies for memory, if the OPEN_BACKTRACE switch is turned on, the handle_malloc function will be executed. Among them, the handle_malloc function will get the current call stack and the size of the stack as the key (value) of the statistical data, and record the size of the memory data requested on the stack. In addition, the existing technology also needs to record ptr (Pointerrecord, pointer record) The corresponding relationship with the requested space size, when the server releases the memory, subtract the destructed value as needed.

[0037] However, in the existing server memory analysis method, because the pipeline ...

Embodiment 2

[0088] According to another aspect of the embodiments of the present invention, there is also provided an analysis device for server memory, wherein, Figure 5 is a schematic diagram of a server memory analysis device according to an embodiment of the present invention. Such as Figure 5 As shown, the device includes: a determination module 501 , an acquisition module 503 and an analysis module 505 .

[0089] Wherein, the determination module 501 is configured to respond to the server memory analysis instruction and determine the target shared memory corresponding to the process to be analyzed, wherein the process to be analyzed is selected from multiple processes running in the server, and each process in the multiple processes is respectively Corresponding to at least one shared memory set in the server; the obtaining module 503 is used to obtain the memory usage information pre-stored in the target shared memory; the analysis module 505 is used to analyze the memory usage ...

Embodiment 3

[0103] According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, wherein the computer program is configured to execute the server in the above-mentioned embodiment 1 when running Methods for analyzing memory.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention discloses a server memory analysis method and device and a computer readable storage medium. The method comprises the steps that a server memory analysis instruction is responded, a target shared memory corresponding to a to-be-analyzed process is determined, the to-be-analyzed process is selected from multiple processes running in a server, and each process in the multiple processes corresponds to at least one shared memory arranged in the server; obtaining memory occupation information pre-stored in the target shared memory; the memory usage information is analyzed, an analysis result is obtained, and the analysis result represents the shared memory usage state of the to-be-analyzed process in the server. According to the method and the device, the technical problem that the server process is blocked when the condition of occupying the memory of the server by the process is counted in the prior art is solved.

Description

technical field [0001] The present invention relates to the field of data storage, in particular to a server memory analysis method, device and computer-readable storage medium. Background technique [0002] Optimizing the memory of the game server is an important part of game optimization. By reducing the use of process memory in the game server, the load capacity of single-process users can be increased, thereby bringing higher profits, and the size of the machine memory can also be reduced, thereby reducing The operating costs of the game. Among them, the memory optimization of the game server first needs to obtain the server memory occupation distribution, and then adaptively optimize the corresponding code according to the obtained server memory occupation distribution. [0003] In the prior art, the usual method of server memory analysis is to first hook (intercept) the malloc (memory allocation, dynamic memory allocation) and free (release memory) of the program, and...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/30G06F9/54
CPCG06F11/3037G06F11/302G06F11/3051G06F9/544
Inventor 曾欢
Owner NETEASE (HANGZHOU) NETWORK CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products