The discussion of memory and form-feed space
? On July 2, 2019 night, found that memory utilization monitoring data center is as high as 91%, the resulting from the following query to memory and form-feed space related problems, the discussion of processing,
? One, first need to explain what is the memory, what is in page space, what is the function of them, what circumstances need to make what kind of deal,
? Memory: all of the running program in the computer is running in the memory, CPU cannot interact directly with the hard disk, so the memory is the bridge of the CPU and disk, memory determines the stable operation of the computer operation,
? In page space: can be simple to understand for the expansion of the memory space, it is the fastest will be the hard disk read the part of virtual memory, CPU can't hit the data in the memory would seek to page in the space,
? For two relations, we can go to understand this: there is a basketball court, assuming that the basketball court can only hold two teams, a total of 10 people playing the game, we left the stadium as memory always accomodation 10 people, put on its two sides team as two cpus in reading data, now there's a third person to join in the game, so, when the third person will need to wait outside in the field, when he's waiting area can be understood as in page space, only the location of the stadium to spare out (such as xiao Ming tired, substitute in others), the outside to get in, so in page space actually can also be seen as a buffer,
? Second, memory is the higher the better or the lower the better?
? Such as monitoring alarm today found that memory utilization rate has reached 91%, so need treatment? We have to to consider from the following several direction,
? The first point, first of all be clear, high memory usage is not necessarily bad, considering from the Angle of ideal, the higher the memory usage, shows that utilization ratio, the better, the resources to achieve a reasonable distribution of the situation based on memory, of course, continue to the available cases, such as a running stability calculation procedure, do not do, for a fixed amount of calculation, then its memory usage, of course, the higher the better, so as to achieve resource utilization is the largest, but note that in the actual production environment, in the airport, for example, is, of course, the lower the better, after all, the actual production environment, to keep enough memory, as far as possible, to ensure the performance of the system can't be affected, because of my lack of memory
? The second point, memory is 91% need to immediately notify the system administrator for processing? My view is to combine in go to see the page space, combination and then make a decision, a simple example: assuming that memory utilization rate has reached 99%, and change the page space utilization rate has reached 30%, then the estimation is about to happen, the system risk problem is great, so, I think, in general memory utilization rate reached 90%, even 80%, we need to focus on, and then check in page space, if a SWAP utilization rate within 10%, can continue to pay close attention to, don't make a fuss, if is around 30%, corresponding measures must be taken to notify to the corresponding administrator for processing,
?
? Three, high memory usage how to deal with the
? 1, the corresponding process involved in the relevant application start-stop (not kill process)
? 2, expanded memory, or change of virtual memory capacity
? 3, restart the server
? 4, kill process
? Note: the reason put "kill process" in the end, because I do not recommend using this method to release the memory, because it is easy to cause wrong operation, for example, if you kill process killed the init process, so congratulations you hang up your machine, so I don't offer the fourth kind of method to release the memory,
The above content is purely personal opinion, don't like do not spray, of course, I prefer the reader pointed out the problems, discuss together, walking together in the ocean of knowledge,