CN112948208A - Memory monitoring and recycling method, system, equipment and storage medium - Google Patents

Memory monitoring and recycling method, system, equipment and storage medium Download PDF

Info

Publication number
CN112948208A
CN112948208A CN202110208352.6A CN202110208352A CN112948208A CN 112948208 A CN112948208 A CN 112948208A CN 202110208352 A CN202110208352 A CN 202110208352A CN 112948208 A CN112948208 A CN 112948208A
Authority
CN
China
Prior art keywords
memory
garbage collection
preset threshold
physical memory
memory usage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110208352.6A
Other languages
Chinese (zh)
Other versions
CN112948208B (en
Inventor
黄俊杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seerof Information Technology Shanghai Co ltd
Original Assignee
Seerof Information Technology Shanghai Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seerof Information Technology Shanghai Co ltd filed Critical Seerof Information Technology Shanghai Co ltd
Priority to CN202110208352.6A priority Critical patent/CN112948208B/en
Publication of CN112948208A publication Critical patent/CN112948208A/en
Application granted granted Critical
Publication of CN112948208B publication Critical patent/CN112948208B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3037Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)
  • Memory System (AREA)

Abstract

The application provides a memory monitoring and recycling method, a system, equipment and a storage medium, wherein the method comprises the steps of judging the current memory pressure level of the system according to the preset or the relevant threshold value corresponding to each memory pressure level acquired from a cloud terminal by acquiring the residual available physical memory usage of the system and the total physical memory usage of an application program, and judging whether memory garbage recycling is carried out currently; and under the condition of memory garbage collection, generating a memory garbage collection instruction, wherein the memory garbage collection instruction comprises garbage collection strategies under each memory pressure level. The method and the device have the advantages that real-time, accurate and flexible memory monitoring is implemented, corresponding memory recovery strategies are implemented, and the problems of real-time monitoring and memory recovery of application programs on the embedded platform are solved.

Description

Memory monitoring and recycling method, system, equipment and storage medium
Technical Field
The present application relates to the field of computer control technologies, and in particular, to a method, a system, a device, and a storage medium for monitoring and recovering a memory.
Background
In a Linux platform, a memory state of a process is monitored by means of a top, vmstat, procrank and other command line tools, so that normal operation of a system is guaranteed, and the problems of process death, background exit and the like are avoided. The monitoring of the memory state of the process mainly includes obtaining memory information, including but not limited to a Virtual Set Size (VSS), an actually used physical memory (RSS), an actually used physical memory (PSS), and a physical memory (USS) occupied by the process alone. The VSS comprises a memory occupied by a shared library, the RSS comprises a memory occupied by the shared library, the PSS comprises a memory occupied by a proportion distribution shared library, and the USS does not contain the memory occupied by the shared library.
However, in the Linux system, the total physical memory occupation of the multi-process application cannot be accurately calculated by using the conventional command line tools, and the command line tools do not always reside in the process. In addition, the process acquires the physical memory occupation data by calling an external shell command, and the efficiency is low.
At present, no effective solution is provided for the problem that the memory cannot be monitored in real time in the related technology.
Disclosure of Invention
The embodiment of the application provides a memory monitoring and recycling method, system, device and storage medium, so as to at least solve the problem that the memory cannot be monitored in real time in the related technology.
In a first aspect, an embodiment of the present application provides a memory monitoring and recycling method, including:
acquiring the residual available physical memory usage of the system and the total physical memory usage of the application program;
judging whether to recycle the memory garbage or not under the condition that the residual available physical memory usage of the system does not reach a first preset threshold value and the total physical memory usage of the application program does not reach a second preset threshold value;
and under the condition of performing the memory garbage collection, generating a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy or a second garbage collection strategy.
In some embodiments, the determining whether to perform memory garbage collection when the remaining available physical memory usage of the system does not reach a first preset threshold and the total physical memory usage of the application program does not reach a second preset threshold includes:
judging whether to recycle the memory garbage or not under the condition that the residual available physical memory usage of the system reaches a third preset threshold;
and under the condition of performing the memory garbage collection, generating a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy.
In some embodiments, the determining whether to perform memory garbage collection when the remaining available physical memory usage of the system does not reach a first preset threshold and the total physical memory usage of the application program does not reach a second preset threshold includes:
judging whether to recycle the memory garbage under the condition that the residual available physical memory usage of the system does not reach a third preset threshold value and the total physical memory usage of the application program reaches a fourth preset threshold value;
and under the condition of performing the memory garbage collection, generating a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy.
In some embodiments, the determining whether to perform memory garbage collection when the remaining available physical memory usage of the system does not reach a first preset threshold and the total physical memory usage of the application program does not reach a second preset threshold includes:
judging whether to recycle the memory garbage or not under the condition that the residual available physical memory usage of the system does not reach a third preset threshold value and the total physical memory usage of the application program does not reach a fourth preset threshold value;
and under the condition of performing the memory garbage collection, generating a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a second garbage collection strategy.
In some embodiments, when the total physical memory usage of the application program does not reach the second preset threshold, the method further includes:
judging whether to carry out system cache cleaning;
and generating a system cache cleaning instruction under the condition of cleaning the system cache.
In some embodiments, the determining whether to perform memory garbage collection when the remaining available physical memory usage of the system does not reach a first preset threshold and the total physical memory usage of the application program does not reach a second preset threshold includes:
judging whether to recycle the memory garbage or not under the condition that the residual available physical memory usage of the system reaches a fifth preset threshold;
and under the condition of memory garbage collection, generating a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a third garbage collection strategy.
In some embodiments, when the remaining available physical memory usage of the system reaches a fifth preset threshold, the determining whether to perform memory garbage collection includes:
under the condition that the total physical memory usage of the application program reaches a sixth preset threshold, judging whether to recycle the memory garbage or not;
and under the condition of memory garbage collection, generating a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a third garbage collection strategy.
In a second aspect, an embodiment of the present application provides a memory monitoring and recycling method, including:
uploading the residual available physical memory usage of the system and the total physical memory usage of the application program;
obtaining a memory judgment strategy;
judging whether the residual available physical memory usage of the system reaches a first preset threshold value or not according to the memory judgment strategy;
under the condition that the residual available physical memory usage of the system does not reach the first preset threshold, judging whether the total physical memory usage of the application program reaches a second preset threshold or not according to a memory judgment strategy;
under the condition that the total physical memory usage of the application program does not reach the second preset threshold, acquiring a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy or a second garbage collection strategy;
and executing the first garbage collection strategy or the second garbage collection strategy under the condition of obtaining the memory garbage collection instruction.
In some embodiments, the obtaining the memory garbage collection instruction when the total physical memory usage of the application program does not reach a second preset threshold includes:
under the condition that the total physical memory usage of the application program does not reach a second preset threshold, judging whether the remaining available physical memory usage of the system reaches a third preset threshold or not according to the memory judgment strategy;
under the condition that the remaining available physical memory usage of the system reaches the third preset threshold, acquiring a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy;
and executing the first garbage collection strategy under the condition of acquiring the memory garbage collection instruction.
In some embodiments, the obtaining the memory garbage collection instruction when the total physical memory usage of the application program does not reach a second preset threshold includes:
under the condition that the total physical memory usage of the application program does not reach a second preset threshold, judging whether the remaining available physical memory usage of the system reaches a third preset threshold or not according to the memory judgment strategy;
under the condition that the residual available physical memory usage of the system does not reach the third preset threshold, judging whether the total physical memory usage of the application program reaches a fourth preset threshold or not according to the memory judgment strategy;
under the condition that the total physical memory usage of the application program reaches the fourth preset threshold, acquiring a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy;
and executing the first garbage collection strategy under the condition of acquiring the memory garbage collection instruction.
In some embodiments, the obtaining the memory garbage collection instruction when the total physical memory usage of the application program does not reach a second preset threshold includes:
under the condition that the total physical memory usage of the application program does not reach a second preset threshold, judging whether the remaining available physical memory usage of the system reaches a third preset threshold or not according to the memory judgment strategy;
under the condition that the residual available physical memory usage of the system does not reach the third preset threshold, judging whether the total physical memory usage of the application program reaches a fourth preset threshold or not according to the memory judgment strategy;
under the condition that the total physical memory usage of the application program does not reach the fourth preset threshold, acquiring a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a second garbage collection strategy;
and executing the second garbage collection strategy under the condition of acquiring the memory garbage collection instruction.
In some embodiments, in the case that the total physical memory usage of the application program does not reach the second preset threshold, the method further includes:
acquiring a system cache cleaning instruction;
and executing the system cache cleaning instruction under the condition of acquiring the system cache cleaning instruction.
In some embodiments, the obtaining the memory garbage collection instruction when the total physical memory usage of the application program does not reach a second preset threshold includes:
under the condition that the total physical memory usage of the application program does not reach the second preset threshold, judging whether the remaining available physical memory usage of the system reaches a fifth preset threshold or not according to a memory judgment strategy;
under the condition that the remaining available physical memory usage of the system reaches the fifth preset threshold, acquiring a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a third garbage collection strategy;
and executing the third garbage collection strategy under the condition of obtaining the memory garbage collection instruction.
In some embodiments, when the remaining available physical memory usage of the system reaches a fifth preset threshold, the determining whether to perform memory garbage collection includes:
under the condition that the residual available physical memory usage of the system does not reach the fifth preset threshold, judging whether the total physical memory usage of the application program reaches a sixth preset threshold or not according to a memory judgment strategy;
under the condition that the total physical memory usage of the application program reaches the sixth preset threshold, acquiring a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a third garbage collection strategy;
and executing the third garbage collection strategy under the condition of obtaining the memory garbage collection instruction.
In some embodiments, before the remaining available physical memory usage of the uploading system and the total physical memory usage of the application program, the method further includes:
acquiring state information of an application program;
installing a memory monitoring timer in case the application program is started;
and awakening the memory monitoring timer.
In some of these embodiments, the method further comprises:
and awakening the memory monitoring timer again after the memory garbage collection is carried out or the garbage collection is not carried out.
In some of these embodiments, after installing the memory watchdog timer, the method further comprises:
setting a wake-up time sequence;
and waking up the memory monitoring timer at regular time according to the wake-up time sequence.
In a third aspect, an embodiment of the present application provides a memory monitoring and recycling system, including:
the local execution end is used for acquiring the remaining available physical memory usage of the system and the total physical memory usage of the application program;
the cloud end is used for receiving the residual available physical memory usage of the system and the total physical memory usage of the application program transmitted by the local execution end and generating a memory judgment strategy;
the local execution end is also used for receiving a memory judgment strategy transmitted by a cloud end, and judging whether the residual available physical memory usage of the system reaches a first preset threshold value or not and whether the total physical memory usage of the application program reaches a second preset threshold value or not;
the cloud is further used for judging whether memory garbage collection is carried out or not under the condition that the remaining available physical memory usage of the system does not reach the first preset threshold and the total physical memory usage of the application program does not reach the second preset threshold; under the condition of memory garbage collection, generating a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy or a second garbage collection strategy;
the local execution end is further configured to receive the memory garbage collection instruction transmitted by the cloud end, and execute the first garbage collection policy or the second garbage collection policy.
In some embodiments, when the total physical memory usage of the application program does not reach the second preset threshold, the local execution end is further configured to determine whether the remaining available physical memory usage of the system reaches a third preset threshold; under the condition that the residual available physical memory usage of the system reaches the third preset threshold, the cloud is further used for judging whether memory garbage collection is carried out or not; under the condition of memory garbage collection, the cloud end generates a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy;
the local execution end is further configured to receive the memory garbage collection instruction transmitted by the cloud end, and execute the first garbage collection policy.
In some embodiments, when the total physical memory usage of the application program does not reach the second preset threshold, the local execution end is further configured to determine whether the remaining available physical memory usage of the system reaches a third preset threshold; under the condition that the remaining available physical memory usage of the system does not reach the third preset threshold, the local execution end is further configured to determine whether the total physical memory usage of the application program reaches a fourth preset threshold; under the condition that the total physical memory usage of the application program reaches the fourth preset threshold, the cloud is further used for judging whether memory garbage collection is carried out or not; under the condition of memory garbage collection, the cloud end generates a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy;
the local execution end is further configured to receive the memory garbage collection instruction transmitted by the cloud end, and execute the first garbage collection policy.
In some embodiments, when the total physical memory usage of the application program does not reach the second preset threshold, the local execution end is further configured to determine whether the remaining available physical memory usage of the system reaches a third preset threshold; under the condition that the remaining available physical memory usage of the system does not reach the third preset threshold, the local execution end is further configured to determine whether the total physical memory usage of the application program reaches a fourth preset threshold; under the condition that the total physical memory usage of the application program does not reach the fourth preset threshold, the cloud is further used for judging whether memory garbage collection is carried out or not; under the condition of memory garbage collection, the cloud end generates a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a second garbage collection strategy;
the local execution end is further configured to receive the memory garbage collection instruction transmitted by the cloud end, and execute the second garbage collection policy.
In some embodiments, the local execution end is further configured to upload a system cache;
the cloud end is also used for receiving the system cache transmitted by the local execution end and judging whether system cache cleaning is carried out or not; generating a system cache cleaning instruction under the condition of system cache cleaning;
the local execution end is further used for receiving the system cache cleaning instruction transmitted by the cloud end and executing the system cache cleaning instruction.
In a fourth aspect, an embodiment of the present application provides a computer device, including:
at least one processor;
and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to perform the memory monitoring and reclaiming method as described above.
In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the method for monitoring and recovering memory as described above is implemented.
Compared with the related art, the memory monitoring and recycling method, the system, the device and the storage medium provided by the embodiment of the application have the advantages that the remaining available physical memory usage of the system and the total physical memory usage of the application program are obtained; judging whether the residual available physical memory usage of the system reaches a first preset threshold value; under the condition that the residual available physical memory usage of the system does not reach a first preset threshold, judging whether the total physical memory usage of the application program reaches a second preset threshold; under the condition that the total physical memory usage of the application program does not reach a second preset threshold value, judging whether to recycle the memory garbage or not; under the condition of memory garbage collection, generating a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy or a second garbage collection strategy, implementing real-time, accurate and flexible memory monitoring, and solving the problem that the memory cannot be monitored in real time.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a flow chart (one) of a memory monitoring and reclaiming method according to an embodiment of the present application;
FIG. 2 is a flow chart of a memory monitoring and reclaiming method according to an embodiment of the present application (II);
FIG. 3 is a flow chart of a memory monitoring and reclaiming method according to an embodiment of the present application (III);
FIG. 4 is a flow chart of a memory monitoring and reclaiming method according to an embodiment of the present application (IV);
FIG. 5 is a flow chart of a memory monitoring and reclaiming method according to an embodiment of the present application (V);
FIG. 6 is a flow chart of a memory monitoring and reclaiming method according to an embodiment of the present application (VI);
fig. 7 is a flow chart (seven) of a memory monitoring and reclaiming method according to an embodiment of the present application;
fig. 8 is a flowchart (eight) of a memory monitoring and reclaiming method according to an embodiment of the present application;
FIG. 9 is a flow chart (nine) of a memory monitoring and reclaiming method according to an embodiment of the present application;
FIG. 10 is a flow chart (ten) of a memory monitoring and reclaiming method according to an embodiment of the present application;
FIG. 11 is a flow chart (eleven) of a memory monitoring and reclaiming method according to an embodiment of the present application;
FIG. 12 is a flow chart of a memory monitoring and reclaiming method according to an embodiment of the present application (twelve);
FIG. 13 is a flow chart of a memory monitoring and reclaiming method according to an embodiment of the present application (thirteen);
fig. 14 is a flowchart (fourteen) of a memory monitoring and reclaiming method according to an embodiment of the present application;
FIG. 15 is a flow chart diagram (fifteen) of a memory monitoring and reclaiming method according to an embodiment of the present application;
FIG. 16 is a flow chart diagram (sixteen) of a memory monitoring and reclaiming method according to an embodiment of the present application;
FIG. 17 is a flow chart of a memory monitoring and reclaiming method according to an embodiment of the present application (seventeen);
FIG. 18 is a block diagram of a memory monitoring and reclamation system according to an embodiment of the present application;
fig. 19 is a block diagram of a specific application implementation of the memory monitoring and recycling system according to an embodiment of the present application;
fig. 20 is a flowchart of an embodiment of a specific application of the memory monitoring and recycling method according to the embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application.
It is obvious that the drawings in the following description are only examples or embodiments of the present application, and that it is also possible for a person skilled in the art to apply the present application to other similar contexts on the basis of these drawings without inventive effort. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of ordinary skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to the listed steps or elements, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as referred to herein means two or more. "and/or" describes an association relationship of associated objects, meaning that three relationships may exist, for example, "A and/or B" may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
Fig. 1 is a flowchart (i) of a memory monitoring and reclaiming method according to an embodiment of the present application. As shown in fig. 1, a method for monitoring and recycling a memory includes:
step S102, obtaining the residual available physical memory usage of the system and the total physical memory usage of the application program;
step S104, judging whether to recycle the memory garbage or not under the condition that the residual available physical memory usage of the system does not reach a first preset threshold value and the total physical memory usage of the application program does not reach a second preset threshold value;
step S106, generating a memory garbage collection instruction under the condition of performing memory garbage collection, where the memory garbage collection instruction includes a first garbage collection policy or a second garbage collection policy.
In this embodiment, the cloud is used as the execution subject to execute the above steps.
In step S102, the cloud acquires the remaining available physical memory usage of the system and the total physical memory usage of the application program from the local execution end.
In step S102, the remaining available physical memory usage of the system and the total physical memory usage of the application program may be obtained at regular time, or the remaining available physical memory usage of the system and the total physical memory usage of the application program may be obtained in real time. Generally, in order to reduce the load and the data transmission amount, the remaining available physical memory usage of the system and the total physical memory usage of the application program are usually obtained regularly.
In step S104, the remaining available physical memory usage of the system not reaching the first preset threshold indicates that the remaining available physical memory usage of the system is insufficient, that is, the remaining available physical memory usage of the system is less than the sufficient threshold of the remaining available physical memory usage of the system.
Specifically, the fact that the remaining available physical memory usage of the system does not reach the first preset threshold means that the remaining available physical memory usage of the system is smaller than the first preset threshold.
In step S104, the fact that the total physical memory usage of the application program does not reach the second preset threshold means that the total physical memory usage of the application program is higher, that is, the total physical memory usage of the application program is greater than the low threshold of the total physical memory usage of the application program.
Specifically, the fact that the total physical memory usage of the application program does not reach the second preset threshold means that the total physical memory usage of the application program is greater than the second preset threshold.
In step S106, the first garbage collection policy is a heavy garbage collection policy, that is, the remaining available physical memory of the system reaches a first preset threshold, and the total physical memory usage of the application reaches a second preset threshold. The second garbage collection strategy is a light garbage collection strategy, namely the remaining available physical memory of the system reaches a first preset threshold value or the total physical memory usage of the application program reaches a second preset threshold value.
After step S104, if the memory garbage collection is not performed, the process returns to step S102.
After step S106, when the memory garbage collection is performed, the process returns to step S102.
Compared with the prior art in which a process calls an external command line tool to perform memory monitoring and memory recovery, the cloud terminal of the embodiment performs real-time memory monitoring and generates a corresponding memory recovery strategy, thereby improving the memory processing efficiency.
Fig. 2 is a flowchart of a memory monitoring and reclaiming method according to an embodiment of the present application (ii). As shown in fig. 2, when the remaining available physical memory usage of the system does not reach the first preset threshold and the total physical memory usage of the application program does not reach the second preset threshold, the determining whether to perform memory garbage collection includes:
step S202, under the condition that the residual available physical memory usage of the system reaches a third preset threshold, judging whether to recycle the memory garbage;
step S204, generating a memory garbage collection instruction under the condition of performing memory garbage collection, where the memory garbage collection instruction includes a first garbage collection policy.
In this embodiment, the cloud is used as the execution subject to execute the above steps.
In step S202, the fact that the remaining available physical memory usage of the system reaches the third preset threshold means that the remaining available physical memory usage of the system is extremely low, that is, the remaining available physical memory usage of the system is less than the warning threshold of the remaining available physical memory usage of the system.
Specifically, that the remaining available physical memory usage of the system reaches the third preset threshold means that the remaining available physical memory usage of the system is less than or equal to the third preset threshold.
After step S202, if the memory garbage collection is not performed, the process returns to step S102.
After step S204, when the memory garbage collection is performed, the process returns to step S102.
In this embodiment, when the remaining available memory usage of the system is less than or equal to the warning threshold of the remaining available memory usage of the system, it indicates that the smooth operation of the system is affected due to excessive processes in the system or excessive background applications, and therefore, a heavy garbage collection policy needs to be executed.
In this embodiment, the remaining available memory usage of the system is further determined, so as to implement a more accurate and effective memory recovery policy (i.e., a garbage recovery policy).
Fig. 3 is a flowchart (iii) of a memory monitoring and reclaiming method according to an embodiment of the present application. As shown in fig. 3, when the remaining available physical memory usage of the system reaches a third preset threshold, the determining whether to perform memory garbage collection includes:
step S302, under the condition that the total physical memory usage of the application program reaches a fourth preset threshold, judging whether to recycle the memory garbage or not;
step S304, generating a memory garbage collection instruction under the condition of performing memory garbage collection, where the memory garbage collection instruction includes a first garbage collection policy.
In this embodiment, the cloud is used as the execution subject to execute the above steps.
In step S302, that the total physical memory usage of the application program reaches the fourth preset threshold means that the total physical memory usage of the application program is extremely high, that is, the total physical memory usage of the application program is greater than or equal to the warning threshold of the total physical memory usage of the application program.
Specifically, the fact that the total physical memory usage of the application program reaches the fourth preset threshold means that the total physical memory usage of the application program is greater than or equal to the fourth preset threshold.
After step S302, if the memory garbage collection is not performed, the process returns to step S102.
After step S304, when the memory garbage collection is performed, the process returns to step S102.
In this embodiment, when the total physical memory usage of the application program is greater than or equal to the warning threshold of the total physical memory usage of the application program, it indicates that the application program occupies too many memory resources, and affects smooth operation of the system, so that a heavy garbage collection policy needs to be executed.
In this embodiment, the total physical memory usage of the application is further determined, so as to implement a more accurate and effective memory recovery policy (i.e., a garbage recovery policy).
Fig. 4 is a flowchart (iv) of a memory monitoring and reclaiming method according to an embodiment of the present application. As shown in fig. 4, when the remaining available physical memory usage of the system reaches the third preset threshold, the determining whether to perform memory garbage collection further includes:
step S402, under the condition that the total physical memory usage of the application program does not reach a fourth preset threshold, judging whether to recycle the memory garbage or not;
step S404, generating a memory garbage collection instruction under the condition of performing memory garbage collection, where the memory garbage collection instruction includes a second garbage collection policy.
In this embodiment, the cloud is used as the execution subject to execute the above steps.
In step S402, that the total physical memory usage of the application program does not reach the fourth preset threshold means that the total physical memory usage of the application program is not very high, that is, the total physical memory usage of the application program is less than the warning threshold of the total physical memory usage of the application program.
Specifically, the fact that the total physical memory usage of the application program does not reach the fourth preset threshold means that the total physical memory usage of the application program is smaller than the fourth preset threshold.
After step S402, if the memory garbage collection is not performed, the process returns to step S102.
After step S404, when the memory garbage collection is performed, the process returns to step S102.
In this embodiment, when the total physical memory usage of the application program is less than the warning threshold of the total physical memory usage of the application program, it indicates that the memory resources occupied by the application program are more, and the operation of the system is slightly affected, so that a light garbage collection policy needs to be executed.
In this embodiment, the total physical memory usage of the application is further determined, so as to implement a more accurate and effective memory recovery policy (i.e., a garbage recovery policy).
Fig. 5 is a flowchart (v) of a memory monitoring and reclaiming method according to an embodiment of the present application. As shown in fig. 5, in the case that the total physical memory usage of the application program does not reach the second preset threshold, the method further includes:
step S502, judging whether to carry out system cache cleaning;
and step S504, generating a system cache cleaning instruction under the condition of cleaning the system cache.
In this embodiment, the cloud is used as the execution subject to execute the above steps.
In general, when there is insufficient system memory, the operating system performs a cache flush, thereby increasing the available physical memory. However, in some embedded platforms, the operating system does not perform cache cleaning, so that the physical memory cannot be increased.
Therefore, under the above condition, the cloud performs system cache cleaning when the total physical memory usage of the application program is greater than the low threshold of the total physical memory usage of the application program, so as to release the physical memory.
Fig. 6 is a flowchart (vi) of a memory monitoring and reclaiming method according to an embodiment of the present application. As shown in fig. 6, under the condition that the remaining available physical memory usage of the system does not reach the first preset threshold and the total physical memory usage of the application program does not reach the second preset threshold, determining whether to perform memory garbage collection includes:
step S602, judging whether to recycle the memory garbage or not under the condition that the residual available physical memory usage of the system reaches a fifth preset threshold;
step S604, generating a memory garbage collection instruction under the condition of performing memory garbage collection, where the memory garbage collection instruction includes a third garbage collection policy.
In step S602, the fifth preset threshold is between the first preset threshold and the third preset threshold, that is, the fifth preset threshold is smaller than the first preset threshold and larger than the third preset threshold.
In this embodiment, the cloud is used as the execution subject to execute the above steps.
In some embodiments, there may be a plurality of fifth preset thresholds, that is, a plurality of fifth preset thresholds are set between the first preset threshold and the third preset threshold, so as to form a multi-level gradient judgment, and perform memory garbage collection more dynamically.
In step S604, the third garbage collection policy is a policy between the first garbage collection policy and the second garbage collection policy, that is, the third garbage collection policy is an intermediate garbage collection policy.
After step S602, if the memory garbage collection is not performed, the process returns to step S102.
After step S604, if the memory garbage collection is performed, the process returns to step S102.
Fig. 7 is a flowchart (seventeenth) of a memory monitoring and reclaiming method according to an embodiment of the present application. As shown in fig. 7, when the remaining available physical memory usage of the system reaches a fifth preset threshold, the determining whether to perform memory garbage collection includes:
step S702, judging whether to recycle the memory garbage or not under the condition that the total physical memory usage of the application program reaches a sixth preset threshold;
step S704, under the condition of performing memory garbage collection, generating a memory garbage collection instruction, where the memory garbage collection instruction includes a third garbage collection policy.
In this embodiment, the cloud is used as the execution subject to execute the above steps.
In step S702, the sixth preset threshold is between the second preset threshold and the fourth preset threshold, that is, the sixth preset threshold is greater than the second preset threshold and smaller than the fourth preset threshold.
In some embodiments, there may be a plurality of sixth preset thresholds, that is, a plurality of sixth preset thresholds are set between the second preset threshold and the fourth preset threshold, so as to form a multi-level gradient judgment and perform memory garbage collection more dynamically.
In step S704, the third garbage collection policy is a policy between the first garbage collection policy and the second garbage collection policy, that is, the third garbage collection policy is an intermediate garbage collection policy.
After step S702, if the memory garbage collection is not performed, the process returns to step S102.
After step S704, when the memory garbage collection is performed, the process returns to step S102.
Fig. 8 is a flowchart (eight) of a memory monitoring and reclaiming method according to an embodiment of the present application. As shown in fig. 8, a method for monitoring and recycling a memory includes:
step S802, uploading the remaining available physical memory usage of the system and the total physical memory usage of the application program;
step S804, obtaining a memory judgment strategy;
step 806, judging whether the remaining available physical memory usage of the system reaches a first preset threshold according to the memory judgment strategy;
step S808, under the condition that the residual available physical memory usage of the system does not reach a first preset threshold, judging whether the total physical memory usage of the application program reaches a second preset threshold according to a memory judgment strategy;
step 810, under the condition that the total physical memory usage of the application program does not reach a second preset threshold, acquiring a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy or a second garbage collection strategy;
step S812, in the case of obtaining the memory garbage collection instruction, executing the first garbage collection policy or the second garbage collection policy.
In this embodiment, the local execution end performs the above steps as an execution subject.
In step S802, the local execution end uploads the remaining available physical memory usage of the system and the total physical memory usage of the application program to the cloud.
In step S802, the remaining available physical memory usage and the total physical memory usage of the application program may be uploaded regularly or in real time. Generally, in order to reduce the load and the data transmission amount, the remaining available physical memory usage of the system and the total physical memory usage of the application program are uploaded regularly.
In step S804, the local execution end obtains the memory determination policy from the cloud.
In step S806, determining whether the remaining available physical memory usage of the system reaches the first preset threshold refers to determining whether the remaining available physical memory usage of the system is sufficient, that is, the first preset threshold refers to a threshold at which the remaining available physical memory usage of the system is sufficient.
In step S808, the remaining amount of the available physical memory of the system not reaching the first preset threshold indicates that the remaining amount of the available physical memory of the system is insufficient, that is, the remaining amount of the available physical memory of the system is smaller than the sufficient threshold of the remaining amount of the available physical memory of the system.
Specifically, the fact that the remaining available physical memory usage of the system does not reach the first preset threshold means that the remaining available physical memory usage of the system is smaller than the first preset threshold, and the fact that the remaining available physical memory usage of the system reaches the first preset threshold means that the remaining available physical memory usage of the system is greater than or equal to the first preset threshold.
In step S808, determining whether the total physical memory usage of the application program reaches the second preset threshold refers to determining whether the total physical memory usage of the application program is lower, that is, the second preset threshold refers to a low threshold of the total physical memory usage of the application program.
In step S810, the local execution end obtains a memory garbage collection instruction from the cloud.
In step S810, the fact that the total physical memory usage of the application program does not reach the second preset threshold means that the total physical memory usage of the application program is higher, that is, the total physical memory usage of the application program is greater than the low threshold of the total physical memory usage of the application program.
Specifically, the fact that the total physical memory usage of the application program does not reach the second preset threshold means that the total physical memory usage of the application program is greater than the second preset threshold, and the fact that the total physical memory usage of the application program reaches the second preset threshold means that the total physical memory usage of the application program is less than or equal to the second preset threshold.
In addition, after step S806, when the remaining available physical memory usage of the system reaches the first preset threshold, the process returns to step S802.
After step S808, when the total physical memory usage of the application program reaches the second preset threshold, the process returns to step S802.
After step S812, if the memory garbage collection is performed, the process returns to step S802.
In this embodiment, the local execution end does not analyze and determine the memory usage, so as to reduce the workload of the local execution end, and also does not store the memory recovery policies (i.e., the first garbage recovery policy and the second garbage recovery policy), and the fixed memory recovery policy is changed into the memory recovery policy dynamically updated in real time, thereby improving the flexibility of memory monitoring.
Fig. 9 is a flowchart (nine) of a memory monitoring and reclaiming method according to an embodiment of the present application. As shown in fig. 9, under the condition that the total physical memory usage of the application program does not reach the second preset threshold, acquiring the memory garbage collection instruction includes:
step S902, under the condition that the total physical memory usage of the application program does not reach a second preset threshold, judging whether the remaining available physical memory usage of the system reaches a third preset threshold according to a memory judgment strategy;
step S904, acquiring a memory garbage collection instruction under the condition that the remaining available physical memory usage of the system reaches a third preset threshold, wherein the memory garbage collection instruction includes a first garbage collection policy;
step S906, in the case of obtaining the memory garbage collection instruction, executes a first garbage collection policy.
In this embodiment, the local execution end performs the above steps as an execution subject.
In step S902, determining whether the remaining available physical memory usage of the system reaches the third preset threshold refers to determining whether the remaining available physical memory usage of the system is extremely low, that is, the third preset threshold refers to a warning threshold of the remaining available physical memory usage of the system.
In step S904, that the remaining available physical memory usage of the system reaches the third preset threshold means that the remaining available physical memory usage of the system is extremely low, that is, the remaining available physical memory usage of the system is less than the warning threshold of the remaining available physical memory usage of the system.
Specifically, the fact that the remaining available physical memory usage of the system reaches the third preset threshold means that the remaining available physical memory usage of the system is less than or equal to the third preset threshold, and the fact that the remaining available physical memory usage of the system does not reach the third preset threshold means that the remaining available physical memory usage of the system is greater than the third preset threshold.
After step S902, if the remaining available memory usage of the system does not reach the third preset threshold, the process returns to step S802.
After step S906, the process returns to step S802 after the first garbage collection policy is executed.
For the present embodiment, the related content and technical effects are as described in step S202 to step S204, and are not described herein again.
Fig. 10 is a flowchart (ten) of a memory monitoring and reclaiming method according to an embodiment of the present application. As shown in fig. 10, after determining whether the remaining available physical memory usage of the system reaches the third preset threshold, the method further includes:
step S1002, under the condition that the residual available physical memory usage of the system does not reach a third preset threshold, judging whether the total physical memory usage of the application program reaches a fourth preset threshold or not according to a memory judgment strategy;
step S1004, acquiring a memory garbage collection instruction under the condition that the total physical memory usage of the application program reaches a fourth preset threshold, wherein the memory garbage collection instruction includes a first garbage collection policy;
step S1006, in the case of obtaining the memory garbage collection instruction, executing a first garbage collection policy.
In this embodiment, the local execution end performs the above steps as an execution subject.
In step S1002, the step of determining whether the total physical memory usage of the application program reaches the fourth preset threshold means whether the total physical memory usage of the application program is extremely high, that is, the fourth preset threshold is an alert threshold of the total physical memory usage of the application program.
In step S1004, that the total physical memory usage of the application program reaches the fourth preset threshold means that the total physical memory usage of the application program is extremely high, that is, the total physical memory usage of the application program is greater than or equal to the warning threshold of the total physical memory usage of the application program.
Specifically, the fact that the total physical memory usage of the application program reaches the fourth preset threshold means that the total physical memory usage of the application program is greater than or equal to the fourth preset threshold, and the fact that the total physical memory usage of the application program does not reach the fourth preset threshold means that the total physical memory usage of the application program is smaller than the fourth preset threshold.
After step S1002, if the total physical memory usage of the application program does not reach the fourth preset threshold, the process returns to step S802.
After step S1006, after executing the first garbage collection policy, it returns to step S802.
For the present embodiment, the related content and technical effects are as described in step S302 to step S304, and are not described herein again.
Fig. 11 is a flowchart (eleven) of a memory monitoring and reclaiming method according to an embodiment of the present application. As shown in fig. 11, after determining whether the total physical memory usage of the application program reaches the fourth preset threshold, the method further includes:
step S1102, acquiring a memory garbage collection instruction under the condition that the total physical memory usage of the application program does not reach a fourth preset threshold, wherein the memory garbage collection instruction includes a second garbage collection policy;
step S1104, in the case of obtaining the memory garbage collection instruction, executing a second garbage collection policy.
In this embodiment, the local execution end performs the above steps as an execution subject.
Further, after step S1104, after the second garbage collection policy is executed, it returns to step S802.
For the present embodiment, the related content and technical effects are as described in step S402 to step S404, and are not described herein again.
Fig. 12 is a flowchart (twelfth) of a memory monitoring and reclaiming method according to an embodiment of the present application. As shown in fig. 12, in the case that the total physical memory usage of the application program does not reach the second preset threshold, the method further includes:
step S1202, a system cache cleaning instruction is obtained;
and step S1204, executing the system cache cleaning instruction under the condition of obtaining the system cache cleaning instruction.
In this embodiment, the local execution end performs the above steps as an execution subject.
For the present embodiment, the related content and technical effects are as described in step S502 to step S504, and are not described herein again.
Fig. 13 is a flowchart (thirteen) of a memory monitoring and reclaiming method according to an embodiment of the present application. As shown in fig. 13, under the condition that the total physical memory usage of the application program does not reach the second preset threshold, acquiring the memory garbage collection instruction includes:
step S1302, under the condition that the total physical memory usage of the application program does not reach a second preset threshold, judging whether the remaining available physical memory usage of the system reaches a fifth preset threshold according to a memory judgment strategy;
step S1304, acquiring a memory garbage collection instruction when the remaining available physical memory usage of the system reaches a fifth preset threshold, where the memory garbage collection instruction includes a third garbage collection policy;
step 1306, in the case of obtaining the memory garbage collection instruction, executing a third garbage collection policy.
In this embodiment, the local execution end performs the above steps as an execution subject.
In step S1302, determining whether the remaining available physical memory usage of the system reaches the fifth preset threshold refers to determining whether the remaining available physical memory usage of the system is low, that is, the remaining available physical memory usage of the system is lower than the first preset threshold but higher than the third preset threshold.
In some embodiments, there may be a plurality of fifth preset thresholds, that is, a plurality of fifth preset thresholds are set between the first preset threshold and the third preset threshold, so as to form a multi-level gradient judgment, and perform memory garbage collection more dynamically.
In step S1304, the fact that the remaining available physical memory usage of the system reaches the fifth preset threshold means that the remaining available physical memory usage of the system is low.
Specifically, that the remaining available physical memory usage of the system reaches the fifth preset threshold means that the remaining available physical memory usage of the system is less than or equal to the fifth preset threshold, and that the remaining available physical memory usage of the system does not reach the fifth preset threshold means that the remaining available physical memory usage of the system is greater than the fifth preset threshold.
In step S1306, the third garbage collection policy is a policy between the first garbage collection policy and the second garbage collection policy, that is, the third garbage collection policy is an intermediate garbage collection policy.
After step S1302, if the remaining available memory usage of the system does not reach the fifth preset threshold, the process returns to step S802.
Wherein, after step S1306, returning to step S802 after executing the third garbage collection policy.
For the present embodiment, the related content and technical effects are as described in step S602 to step S604, and are not described herein again.
Fig. 14 is a flowchart (fourteen) of a memory monitoring and reclaiming method according to an embodiment of the present application. As shown in fig. 14, when the remaining available physical memory usage of the system reaches the fifth preset threshold, the determining whether to perform memory garbage collection includes:
step S1402, under the condition that the remaining available physical memory usage of the system does not reach the fifth preset threshold, determining whether the total physical memory usage of the application program reaches a sixth preset threshold according to a memory determination policy;
step S1404, acquiring a memory garbage collection instruction when the total physical memory usage of the application program reaches a sixth preset threshold, where the memory garbage collection instruction includes a third garbage collection policy;
in step S1406, under the condition of obtaining the memory garbage collection instruction, a third garbage collection policy is executed.
In this embodiment, the local execution end performs the above steps as an execution subject.
In step S1402, determining whether the total physical memory usage of the application program reaches the sixth preset threshold means whether the total physical memory usage of the application program is high, that is, the total physical memory usage of the application program is higher than the second preset threshold but smaller than the fourth preset threshold.
In some embodiments, there may be a plurality of sixth preset thresholds, that is, a plurality of sixth preset thresholds are set between the second preset threshold and the fourth preset threshold, so as to form a multi-level gradient judgment and perform memory garbage collection more dynamically.
In step S1404, that the total physical memory usage of the application program reaches the sixth preset threshold means that the total physical memory usage of the application program is high.
Specifically, the fact that the total physical memory usage of the application program reaches the sixth preset threshold means that the total physical memory usage of the application program is greater than or equal to the sixth preset threshold, and the fact that the total physical memory usage of the application program does not reach the sixth preset threshold means that the total physical memory usage of the application program is smaller than the sixth preset threshold.
In step S1406, the third garbage collection policy is a policy between the first garbage collection policy and the second garbage collection policy, that is, the third garbage collection policy is an intermediate garbage collection policy.
After step S1402, if the total physical memory usage of the application program does not reach the sixth preset threshold, the process returns to step S802.
After step S1406, the process returns to step S802 after the third garbage collection policy is executed.
For the present embodiment, the related content and technical effects are as described in step S702 to step S704, and are not described herein again. Fig. 15 is a flowchart (fifteen) of a memory monitoring and reclaiming method according to an embodiment of the present application. As shown in fig. 15, before the remaining available physical memory usage of the uploading system and the total physical memory usage of the application program, the method further includes:
step S1502, acquiring state information of an application program;
step S1504, installing a memory monitoring timer under the condition that the application program is started;
and step S1506, waking up the memory monitoring timer.
In this embodiment, the local execution end performs the above steps as an execution subject.
In step S1502, the state information of the application includes, but is not limited to, application startup information, application resident background information, and application shutdown information.
In step S1504, the memory watchdog timer is installed to obtain the memory status of the system and the application program.
In step S1506, only when the memory monitoring timer is woken up, the memory status scan is performed to obtain the memory status of the system and the application program, including but not limited to:
the remaining available physical memory of the system (MemFree);
each process of the application program proportionally distributes a physical memory (Pss) occupied by the shared library and a SWAP page (swapss) occupied by the shared library according to the proportion;
and summing the Pss of each progress of the application program and the SwapPss to obtain the total physical memory usage of the application program.
Fig. 16 is a flow chart (sixteen) of a memory monitoring and reclaiming method according to an embodiment of the present application. As shown in fig. 16, after waking the memory monitor timer, the method further includes:
step S1602, after performing the memory garbage collection or not performing the garbage collection, waking up the memory monitoring timer again.
In this embodiment, the local execution end performs the above steps as an execution subject.
In this embodiment, no matter whether the local execution end performs the memory garbage collection, the memory monitoring timer is awakened again to perform the memory state scanning, so as to complete the purpose of the memory state real-time monitoring.
Fig. 17 is a flowchart (seventeenth) of a memory monitoring and reclaiming method according to an embodiment of the present application. As shown in fig. 17, after installing the memory watchdog timer, the method further includes:
step 1702, setting a wakeup time sequence;
and step S1704, waking up the memory monitoring timer at regular time according to the wake-up time sequence.
In this embodiment, the local execution end performs the above steps as an execution subject.
In this embodiment, the wake-up time sequence is used to set the wake-up time of the memory monitoring timer, that is, the purpose of regularly waking up the memory monitoring timer can be achieved by setting the wake-up interval time, so that the balance can be obtained in real-time monitoring and reducing the workload, and the system and the application program can be ensured to run normally and smoothly.
Fig. 18 is a block diagram of a memory monitoring and reclaiming system according to an embodiment of the present application. As shown in fig. 18, the memory monitoring and reclaiming system includes:
the local execution end 1810 is used for acquiring the remaining available physical memory usage of the system and the total physical memory usage of the application program;
the cloud 1820 is configured to receive the remaining available physical memory usage of the system and the total physical memory usage of the application program, which are transmitted by the local execution end 1810, and generate a memory determination policy;
the local execution end 1810 is further configured to receive a memory determination policy transmitted by the cloud 1820, and determine whether the remaining available physical memory usage of the system reaches a first preset threshold, and whether the total physical memory usage of the application program reaches a second preset threshold;
the cloud 1820 is further configured to determine whether to perform memory garbage collection under the condition that the remaining available physical memory usage of the system does not reach a first preset threshold and the total physical memory usage of the application program does not reach a second preset threshold; generating a memory garbage collection instruction under the condition of memory garbage collection, wherein the memory garbage collection instruction comprises a first garbage collection strategy or a second garbage collection strategy;
the local execution end 1810 is further configured to receive the memory garbage collection instruction transmitted by the cloud 1820, and execute the first garbage collection policy or the second garbage collection policy.
In some embodiments, the local execution end 1810 is further configured to determine whether the remaining available physical memory usage of the system reaches a third preset threshold value under the condition that the total physical memory usage of the application program does not reach the second preset threshold value; the cloud 1820 is further configured to determine whether to perform memory garbage collection when the remaining available physical memory usage of the system reaches a third preset threshold; under the condition of memory garbage collection, the cloud 1820 generates a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy;
the local execution end 1810 is further configured to receive a memory garbage collection instruction transmitted by the cloud 1820, and execute a first garbage collection policy.
In some embodiments, the local execution end 1810 is further configured to determine whether the remaining available physical memory usage of the system reaches a third preset threshold value under the condition that the total physical memory usage of the application program does not reach the second preset threshold value; under the condition that the remaining available physical memory usage of the system does not reach a third preset threshold, the local execution end is further used for judging whether the total physical memory usage of the application program reaches a fourth preset threshold; the cloud 1820 is further configured to determine whether to perform memory garbage collection when the total physical memory usage of the application reaches a fourth preset threshold; under the condition of memory garbage collection, the cloud 1820 generates a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy;
the local execution end 1810 is further configured to receive a memory garbage collection instruction transmitted by the cloud 1820, and execute a first garbage collection policy.
In some embodiments, the local execution end 1810 is further configured to determine whether the remaining available physical memory usage of the system reaches a third preset threshold value under the condition that the total physical memory usage of the application program does not reach the second preset threshold value; the local execution end 1810 is further configured to determine whether the total physical memory usage of the application program reaches a fourth preset threshold under the condition that the remaining available physical memory usage of the system does not reach the third preset threshold; the cloud 1820 is further configured to determine whether to perform memory garbage collection when the total physical memory usage of the application program does not reach a fourth preset threshold; under the condition of memory garbage collection, the cloud 1820 generates a memory garbage collection instruction, wherein the memory garbage collection instruction includes a second garbage collection policy;
the local execution end 1810 is further configured to receive the memory garbage collection instruction transmitted by the cloud 1820, and execute a second garbage collection policy.
In some embodiments, the local execution end 1810 is further configured to determine whether the remaining available physical memory usage of the system reaches a fifth preset threshold value under the condition that the total physical memory usage of the application program does not reach the second preset threshold value; the cloud 1820 is further configured to determine whether to perform memory garbage collection when the remaining available physical memory usage of the system reaches a fifth preset threshold; under the condition of memory garbage collection, the cloud 1820 generates a memory garbage collection instruction, wherein the memory garbage collection instruction includes a third garbage collection policy;
the local execution end 1810 is further configured to receive the memory garbage collection instruction transmitted by the cloud 1820, and execute a third garbage collection policy.
In some embodiments, the local execution end 1810 is further configured to determine whether the remaining available physical memory usage of the system reaches a fifth preset threshold value under the condition that the total physical memory usage of the application program does not reach the second preset threshold value; the local execution end 1810 is further configured to determine whether the total physical memory usage of the application program reaches a sixth preset threshold under the condition that the remaining available physical memory usage of the system does not reach the fifth preset threshold; the cloud 1820 is further configured to determine whether to perform memory garbage collection when the total physical memory usage of the application reaches a sixth preset threshold; under the condition of memory garbage collection, the cloud 1820 generates a memory garbage collection instruction, wherein the memory garbage collection instruction includes a third garbage collection policy;
the local execution end 1810 is further configured to receive the memory garbage collection instruction transmitted by the cloud 1820, and execute a third garbage collection policy.
In some embodiments, the local execution end 1810 is also used to upload a system cache;
the cloud 1820 is further configured to receive the system cache transmitted by the local execution end 1810, and determine whether to perform system cache cleaning; generating a system cache cleaning instruction under the condition of system cache cleaning;
the local execution end 1810 is further configured to receive a system cache cleaning instruction transmitted by the cloud 1820, and execute the system cache cleaning instruction.
In some embodiments, the local execution 1810 is communicatively coupled to a cloud 1820. The communication connection is connected through a network 1830, and may be a wired network connection or a wireless network connection. In some of these embodiments, the network 1830 may include a public network (e.g., the internet), a private network (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), etc.), a wireless network (e.g., an 802.11 network, a Wi-Fi network, etc.), a cellular network (e.g., a 4G network, a 5G network, etc.), a frame relay network, a Virtual Private Network (VPN), a satellite network, a router, a hub, a switch, a server, etc., or any combination thereof. By way of example only, network 1430 may include a cable network, a wireline network, a fiber optic network, a telecommunications network, an intranet, a Wireless Local Area Network (WLAN), a Metropolitan Area Network (MAN), a Public Switched Telephone Network (PSTN), the like, or any combination thereof. In some embodiments, the network 1830 may include one or more network access points. For example, the network 1830 may include wired and/or wireless network access points, such as base stations and/or internet switching points, through which various devices of the memory monitoring and recovery system may connect to the network to exchange information and/or data.
In some of these embodiments, local execution end 1810 includes:
the memory monitoring module is used for acquiring the remaining available physical memory usage of the system and the total physical memory usage of the application program and transmitting the remaining available physical memory usage and the total physical memory usage to the cloud 1820;
the policy control module is in communication connection with the memory monitoring module and is used for acquiring a memory garbage collection instruction transmitted by the cloud 1820, wherein the memory garbage collection instruction comprises a first garbage collection policy or a second garbage collection policy;
and the garbage recovery module is in communication connection with the strategy control module and is used for acquiring the first garbage recovery strategy or the second garbage recovery strategy transmitted by the strategy control module and executing the first garbage recovery strategy or the second garbage recovery strategy.
In addition, the memory monitoring and recycling method of the embodiment of the application can be realized by computer equipment. Components of the computer device may include, but are not limited to, a processor and a memory storing computer program instructions.
In some embodiments, the processor may include a Central Processing Unit (CPU), or A Specific Integrated Circuit (ASIC), or may be configured to implement one or more Integrated circuits of embodiments of the present Application.
In some embodiments, the memory may include mass storage for data or instructions. By way of example, and not limitation, memory may include a Hard Disk Drive (Hard Disk Drive, abbreviated to HDD), a floppy Disk Drive, a Solid State Drive (SSD), flash memory, an optical Disk, a magneto-optical Disk, tape, or a Universal Serial Bus (USB) Drive or a combination of two or more of these. The memory may include removable or non-removable (or fixed) media, where appropriate. The memory may be internal or external to the data processing apparatus, where appropriate. In a particular embodiment, the memory is a Non-Volatile (Non-Volatile) memory. In particular embodiments, the Memory includes Read-Only Memory (ROM) and Random Access Memory (RAM). The ROM may be mask-programmed ROM, Programmable ROM (PROM), Erasable PROM (EPROM), Electrically Erasable PROM (EEPROM), Electrically rewritable ROM (EAROM), or FLASH Memory (FLASH), or a combination of two or more of these, where appropriate. The RAM may be a Static Random-Access Memory (SRAM) or a Dynamic Random-Access Memory (DRAM), where the DRAM may be a Fast Page Mode Dynamic Random-Access Memory (FPMDRAM), an Extended data output Dynamic Random-Access Memory (EDODRAM), a Synchronous Dynamic Random-Access Memory (SDRAM), and the like.
The memory may be used to store or cache various data files for processing and/or communication use, as well as possibly computer program instructions for execution by the processor.
The processor reads and executes the computer program instructions stored in the memory to implement any one of the memory monitoring and reclaiming methods in the above embodiments.
In some of these embodiments, the computer device may also include a communication interface and a bus. The processor, the memory and the communication interface are connected through a bus and complete mutual communication.
The communication interface is used for realizing communication among modules, devices, units and/or equipment in the embodiment of the application. The communication interface may also be implemented with other components such as: the data communication is carried out among external equipment, image/data acquisition equipment, a database, external storage, an image/data processing workstation and the like.
A bus comprises hardware, software, or both that couple components of a computer device to one another. Buses include, but are not limited to, at least one of the following: data Bus (Data Bus), Address Bus (Address Bus), Control Bus (Control Bus), Expansion Bus (Expansion Bus), and Local Bus (Local Bus). By way of example, and not limitation, a Bus may include an Accelerated Graphics Port (AGP) or other Graphics Bus, an Enhanced Industry Standard Architecture (EISA) Bus, a Front-Side Bus (FSB), a HyperTransport (HT) interconnect, an ISA (ISA) Bus, an InfiniBand (InfiniBand) interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a Micro Channel Architecture (MCA) Bus, a Peripheral Component Interconnect (PCI) Bus, a PCI-Express (PCI-X) Bus, a Serial Advanced Technology Attachment (SATA) Bus, a Video Electronics standards association Local Bus (VLB) Bus, or other suitable Bus or a combination of two or more of these. A bus may include one or more buses, where appropriate. Although specific buses are described and shown in the embodiments of the application, any suitable buses or interconnects are contemplated by the application.
In addition, in combination with the memory monitoring and recycling method in the foregoing embodiments, the embodiments of the present application may provide a computer-readable storage medium to implement. The computer readable storage medium having stored thereon computer program instructions; the computer program instructions, when executed by a processor, implement any of the memory monitoring and reclaiming methods in the above embodiments.
Fig. 19 is a block diagram of a specific application implementation of the memory monitoring and recycling system according to the embodiment of the present application. As shown in fig. 19, the memory monitoring and recovering system includes a server (cloud) and an application (local execution end), the application uploads the memory monitoring data to the server, and the server generates a memory recovering policy according to the memory monitoring data and transmits the memory recovering policy to the application, so that the application executes the memory recovering policy.
Specifically, the memory monitoring device of the application program comprises a memory monitor, a policy controller, a garbage collector and a server, wherein the cloud is used for receiving memory monitoring data and issuing a memory recovery policy.
The memory monitor is triggered by a timer, memory state scanning is executed at intervals, the remaining available memory physical memory of the current system and the physical memory (PSS) occupied by the shared library are distributed by each process of the application program according to a proportion, and the total physical memory usage of the application program is obtained through summation.
The strategy controller is responsible for acquiring and implementing the memory strategy from the server side, informing the garbage collector according to the current memory pressure state and executing garbage collection of different levels.
The memory recovery strategy acquired by the strategy controller from the server side comprises the following contents:
behavior strategies of the garbage collector under different memory pressure levels comprise the content of collection (such as whether to clear network cache, image cache, font cache and the like) and the collection strength (such as whether to clear certain type of cache or clear the cache according to percentage) and the like;
each memory pressure level, the corresponding memory water level (threshold), including the threshold of the remaining available physical memory of the system, and the threshold of the total physical memory usage of the application program.
And the garbage collector is responsible for executing garbage collection of corresponding levels according to the memory pressure level calculated by the strategy controller. The garbage recycling level and the corresponding recycling operation details are obtained by the strategy controller from the server side.
The server collects the memory monitoring data of the client and carries out real-time statistics, a distribution graph of the number of the clients according to the physical memory occupation size is obtained through calculation, and different memory pressure levels are defined according to percentiles. The strategy controller periodically acquires the water level value under each memory pressure level from the server and corresponding memory recovery strategies.
Fig. 20 is a flowchart of an embodiment of a specific application of the memory monitoring and recycling method according to the embodiment of the present application. As shown in fig. 20, the memory monitoring and recycling method includes:
step S2001, installing a memory monitoring timer after the application program is started; (local execution terminal)
Step S2002, the memory monitoring timer is waken up; (local execution terminal)
Step S2003, obtaining memory states of the system and the application program; (local execution terminal)
Step S2004, judging whether the remaining available physical memory of the system is sufficient; (local execution terminal)
Step S2005, under the situation that the remaining available physical memory of the system is insufficient, judge whether the total physical memory consumption of the application program is lower; (local execution terminal)
Step S2006, judging whether to clear the system cache or not under the condition that the total physical memory usage of the application program is not low; (local execution terminal)
Step S2007, whether the system cache is cleaned or not, whether the residual available physical memory of the system is extremely low or not is judged; (local execution terminal)
Step S2008, judging whether to start garbage collection or not under the condition that the remaining available physical memory of the system is extremely low; (local execution terminal)
Step S2009, under the condition that the garbage collection is started, informing the garbage collector, enabling the garbage collector to execute a severe garbage collection strategy, and returning to the step S2002; (local execution terminal)
Step S2010, returning to step S2002 when garbage collection is not started; (local execution terminal)
Step S2011, under the condition that the residual available physical memory of the system is not low, judging whether the total physical memory usage of the application program is extremely high; (local execution terminal)
Step S2012, under the condition that the total physical memory usage of the application program is extremely high, judging whether to start garbage collection; (local execution terminal)
Step S2013, under the condition that the garbage recovery is started, the garbage recoverer is informed, the garbage recoverer executes a severe garbage recovery strategy, and the step S2002 is returned; (local execution terminal)
Step S2014, under the condition that the garbage collection is not started, returning to the step S2002; (local execution terminal)
Step S2015, judging whether to start garbage collection or not under the condition that the total physical memory usage of the application program is not high; (local executive);
step S2016, if garbage collection is started, notifying a garbage collector, and causing the garbage collector to execute a mild garbage collection policy, and returning to step S2002; (local execution terminal)
And step S2017, returning to step S2002 when garbage collection is not started. (local execution terminal)
The judgment basis of the local execution end is issued by the cloud end, and the severe garbage recycling strategy and the mild garbage recycling strategy are issued by the cloud end.
For the above embodiment, a practical example is shown as follows:
two memory pressure levels are set, and the corresponding memory water levels (thresholds) are respectively as follows:
level 1 (moderate memory usage):
the remaining available physical memory of the system is 50MB
The total physical memory consumption of the application program is 200 MB;
level 2 (critical memory state):
the remaining available physical memory of the system is 20MB
The total physical memory usage of the application program is 300 MB.
The concrete brief steps are as follows:
starting a memory detector timer after the application program is started;
after the timer is awakened, executing memory state scanning, and calculating to obtain that the residual available physical memory of the system is 30MB, and the physical memory occupation of an application program is 350 MB;
the timer transmits the measurement data to the policy manager, and the policy manager compares the water level values of the memory pressure levels:
from the angle of the residual memory of the system, judging that the current residual 30MB is at a Level of 1 between 20MB and 50 MB;
from the angle of the physical memory usage of the application program, the current physical memory consumes 350MB which exceeds 300MB, and the current physical memory is judged to be at a Level 2 Level;
integrating the two angles, and judging that the memory pressure Level of the application program is at a Level 2 Level;
and the strategy manager informs the garbage collector to execute garbage collection of Level 2 Level.
In the embodiment of the application, the memory monitoring and recycling system and the memory monitoring and recycling method have the following characteristics:
installing a timer after a main process of the application program is started, periodically acquiring the residual available physical memory of the system and the physical memory actually used by each process, and calculating to obtain the total physical memory occupation of the application program;
the application program integrates the total physical memory usage amount, the remaining available memory usage amount of the system and other information to define the memory pressure level of the application so as to implement garbage collection strategies of different degrees;
the application program reports the memory state statistical data to the server periodically through the network, and receives the threshold value of each memory pressure level and the corresponding garbage collection strategy information. The server side can accurately control the memory state of the client side.
In this embodiment, the memory monitoring and recovery system can accurately count and calculate the total physical memory occupation of the application program in a single process and a multi-process during running, and implement real-time, accurate and flexible memory monitoring.
The server side collects the memory data of the application program in real time, obtains the distribution situation of the total physical memory occupation of the application program through statistics, guides the application program to carry out reasonable garbage collection work, and flexibly controls the garbage collection behavior of the application program through issuing a strategy.
The application program judges the current memory pressure level according to the total physical memory usage and the remaining available physical memory of the system and other data by combining a memory pressure threshold value, so as to implement memory strategies of cache cleaning (cache cleaning), garbage collection and the like at corresponding levels. The probability that the application is killed under the condition that the residual available memory of the system is insufficient due to overhigh memory occupation is reduced, and the stability and the robustness of the application program are improved.
Compared with the prior art, the method and the device have the advantages that on the basis of the traditional memory monitoring method, a mechanism for reporting the memory detection data to the cloud and acquiring the memory strategy from the cloud is added. That is, the memory policy is not directly stored in the client (local), but becomes dynamically updatable, thereby greatly enhancing the flexibility of memory monitoring.
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A memory monitoring and reclaiming method, comprising:
acquiring the residual available physical memory usage of the system and the total physical memory usage of the application program;
judging whether to recycle the memory garbage or not under the condition that the residual available physical memory usage of the system does not reach a first preset threshold value and the total physical memory usage of the application program does not reach a second preset threshold value;
and under the condition of performing the memory garbage collection, generating a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy or a second garbage collection strategy.
2. The memory monitoring and reclaiming method according to claim 1, wherein the determining whether to reclaim the memory garbage when the remaining available physical memory usage of the system does not reach a first preset threshold and the total physical memory usage of the application program does not reach a second preset threshold comprises:
judging whether to recycle the memory garbage or not under the condition that the residual available physical memory usage of the system reaches a third preset threshold;
under the condition of performing the memory garbage collection, generating a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy;
or
Judging whether to recycle the memory garbage under the condition that the residual available physical memory usage of the system does not reach a third preset threshold value and the total physical memory usage of the application program reaches a fourth preset threshold value;
under the condition of performing the memory garbage collection, generating a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy;
or
Judging whether to recycle the memory garbage or not under the condition that the residual available physical memory usage of the system does not reach a third preset threshold value and the total physical memory usage of the application program does not reach a fourth preset threshold value;
and under the condition of performing the memory garbage collection, generating a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a second garbage collection strategy.
3. The method according to claim 1, wherein when the total physical memory usage of the application program does not reach a second preset threshold, the method further comprises:
judging whether to carry out system cache cleaning;
and generating a system cache cleaning instruction under the condition of cleaning the system cache.
4. A memory monitoring and reclaiming method, comprising:
uploading the residual available physical memory usage of the system and the total physical memory usage of the application program;
obtaining a memory judgment strategy;
judging whether the residual available physical memory usage of the system reaches a first preset threshold value or not according to the memory judgment strategy;
under the condition that the residual available physical memory usage of the system does not reach the first preset threshold, judging whether the total physical memory usage of the application program reaches a second preset threshold or not according to a memory judgment strategy;
under the condition that the total physical memory usage of the application program does not reach the second preset threshold, acquiring a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy or a second garbage collection strategy;
and executing the first garbage collection strategy or the second garbage collection strategy under the condition of obtaining the memory garbage collection instruction.
5. The memory monitoring and reclaiming method according to claim 4, wherein obtaining the memory garbage reclaiming instruction when the total physical memory usage of the application program does not reach a second preset threshold comprises:
under the condition that the total physical memory usage of the application program does not reach a second preset threshold, judging whether the remaining available physical memory usage of the system reaches a third preset threshold or not according to the memory judgment strategy;
under the condition that the remaining available physical memory usage of the system reaches the third preset threshold, acquiring a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy;
executing the first garbage collection strategy under the condition of obtaining the memory garbage collection instruction;
or
Under the condition that the total physical memory usage of the application program does not reach a second preset threshold, judging whether the remaining available physical memory usage of the system reaches a third preset threshold or not according to the memory judgment strategy;
under the condition that the residual available physical memory usage of the system does not reach the third preset threshold, judging whether the total physical memory usage of the application program reaches a fourth preset threshold or not according to the memory judgment strategy;
under the condition that the total physical memory usage of the application program reaches the fourth preset threshold, acquiring a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy;
executing the first garbage collection strategy under the condition of obtaining the memory garbage collection instruction;
or
Under the condition that the total physical memory usage of the application program does not reach a second preset threshold, judging whether the remaining available physical memory usage of the system reaches a third preset threshold or not according to the memory judgment strategy;
under the condition that the residual available physical memory usage of the system does not reach the third preset threshold, judging whether the total physical memory usage of the application program reaches a fourth preset threshold or not according to the memory judgment strategy;
under the condition that the total physical memory usage of the application program does not reach the fourth preset threshold, acquiring a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a second garbage collection strategy;
and executing the second garbage collection strategy under the condition of acquiring the memory garbage collection instruction.
6. The memory monitoring and reclaiming method according to claim 4, wherein in the case that the total physical memory usage of the application program does not reach the second preset threshold, the method further comprises:
acquiring a system cache cleaning instruction;
and executing the system cache cleaning instruction under the condition of acquiring the system cache cleaning instruction.
7. The method of claim 4, further comprising, before uploading the remaining available physical memory usage of the system and the total physical memory usage of the application program:
acquiring state information of an application program;
installing a memory monitoring timer in case the application program is started;
and awakening the memory monitoring timer.
8. A memory monitoring and reclaiming system, comprising:
the local execution end is used for acquiring the remaining available physical memory usage of the system and the total physical memory usage of the application program;
the cloud end is used for receiving the residual available physical memory usage of the system and the total physical memory usage of the application program transmitted by the local execution end and generating a memory judgment strategy;
the local execution end is also used for receiving a memory judgment strategy transmitted by a cloud end, and judging whether the residual available physical memory usage of the system reaches a first preset threshold value or not and whether the total physical memory usage of the application program reaches a second preset threshold value or not;
the cloud is further used for judging whether memory garbage collection is carried out or not under the condition that the remaining available physical memory usage of the system does not reach the first preset threshold and the total physical memory usage of the application program does not reach the second preset threshold; under the condition of memory garbage collection, generating a memory garbage collection instruction, wherein the memory garbage collection instruction comprises a first garbage collection strategy or a second garbage collection strategy;
the local execution end is further configured to receive the memory garbage collection instruction transmitted by the cloud end, and execute the first garbage collection policy or the second garbage collection policy.
9. A computer device, comprising:
at least one processor;
and a memory communicatively coupled to the at least one processor;
wherein the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to perform the memory monitoring and reclaiming method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the memory monitoring and reclaiming method as claimed in any one of claims 1 to 7.
CN202110208352.6A 2021-02-24 2021-02-24 Memory monitoring and recycling method, system, equipment and storage medium Active CN112948208B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110208352.6A CN112948208B (en) 2021-02-24 2021-02-24 Memory monitoring and recycling method, system, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110208352.6A CN112948208B (en) 2021-02-24 2021-02-24 Memory monitoring and recycling method, system, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112948208A true CN112948208A (en) 2021-06-11
CN112948208B CN112948208B (en) 2022-06-21

Family

ID=76246034

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110208352.6A Active CN112948208B (en) 2021-02-24 2021-02-24 Memory monitoring and recycling method, system, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112948208B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150026428A1 (en) * 2013-07-18 2015-01-22 International Business Machines Corporation Memory use for garbage collected computer environments
CN104536907A (en) * 2015-01-26 2015-04-22 联想(北京)有限公司 Memory cleaning method and electronic equipment
CN105893153A (en) * 2016-03-31 2016-08-24 北京百纳威尔无线通信设备有限公司 Memory cleaning method and device for mobile terminal
CN105955606A (en) * 2016-04-22 2016-09-21 北京金山安全软件有限公司 Terminal device memory cleaning method and device and electronic device
CN105975348A (en) * 2016-05-31 2016-09-28 宇龙计算机通信科技(深圳)有限公司 Memory optimization method, optimization device and terminal
CN107861812A (en) * 2017-10-30 2018-03-30 江西博瑞彤芸科技有限公司 A kind of internal memory method for cleaning
CN108073520A (en) * 2016-11-10 2018-05-25 腾讯科技(深圳)有限公司 A kind of internal memory control method and device
CN110018793A (en) * 2019-04-11 2019-07-16 苏州浪潮智能科技有限公司 A kind of host I O process control method, device, terminal and readable storage medium storing program for executing
CN111198759A (en) * 2018-11-16 2020-05-26 深圳市优必选科技有限公司 Memory optimization method, system, terminal equipment and readable storage medium
CN111966491A (en) * 2020-08-04 2020-11-20 Oppo广东移动通信有限公司 Method for counting occupied memory and terminal equipment

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150026428A1 (en) * 2013-07-18 2015-01-22 International Business Machines Corporation Memory use for garbage collected computer environments
CN104536907A (en) * 2015-01-26 2015-04-22 联想(北京)有限公司 Memory cleaning method and electronic equipment
CN105893153A (en) * 2016-03-31 2016-08-24 北京百纳威尔无线通信设备有限公司 Memory cleaning method and device for mobile terminal
CN105955606A (en) * 2016-04-22 2016-09-21 北京金山安全软件有限公司 Terminal device memory cleaning method and device and electronic device
CN105975348A (en) * 2016-05-31 2016-09-28 宇龙计算机通信科技(深圳)有限公司 Memory optimization method, optimization device and terminal
CN108073520A (en) * 2016-11-10 2018-05-25 腾讯科技(深圳)有限公司 A kind of internal memory control method and device
CN107861812A (en) * 2017-10-30 2018-03-30 江西博瑞彤芸科技有限公司 A kind of internal memory method for cleaning
CN111198759A (en) * 2018-11-16 2020-05-26 深圳市优必选科技有限公司 Memory optimization method, system, terminal equipment and readable storage medium
CN110018793A (en) * 2019-04-11 2019-07-16 苏州浪潮智能科技有限公司 A kind of host I O process control method, device, terminal and readable storage medium storing program for executing
CN111966491A (en) * 2020-08-04 2020-11-20 Oppo广东移动通信有限公司 Method for counting occupied memory and terminal equipment

Also Published As

Publication number Publication date
CN112948208B (en) 2022-06-21

Similar Documents

Publication Publication Date Title
CN113395178B (en) Method and device for elastic expansion and contraction of container cloud
EP3270287A1 (en) Scheduling method and system for video analysis tasks
CN113051075A (en) Kubernetes intelligent capacity expansion method and device
CN113608871A (en) Service processing method and device
CN109842521A (en) A kind of mobile terminal delay machine forecasting system and method
CN111858031B (en) Cluster distributed resource scheduling method, device, equipment and storage medium
CN115277598B (en) Method and device for scheduling computing power resources and computer readable storage medium
EP2476277A1 (en) Method and apparatus for cell control
CN114189482A (en) Control method, device and system for cluster resources
CN111885618A (en) Network performance optimization method and device
CN112948208B (en) Memory monitoring and recycling method, system, equipment and storage medium
CN112996060B (en) Carrier wave closing method and device and server
CN110851286B (en) Thread management method and device, electronic equipment and storage medium
CN113132247B (en) Management method, system and storage medium suitable for distributed flow collection
CN109640344B (en) Information processing method and device, terminal and storage medium
CN113258679A (en) Power grid monitoring system channel distribution method based on server instance capacity reduction
CN114788357A (en) Method and apparatus for prioritized 5G NSA cell (re) selection
CN111158899A (en) Data acquisition method, data acquisition device, task management center and task management system
CN115696466B (en) Method and device for determining priority of S-NSSAI
EP4351214A1 (en) Method for determining reselection determination parameter, and cell reselection method
CN108174387B (en) CE resource scheduling method and device
CN112770362B (en) Cell switching method, device and equipment
CN114281505A (en) Thread pool optimization processing method, device, storage medium and equipment
CN116866282A (en) Method and device for adjusting computing resources and readable storage medium
CN117851013A (en) Alarm method, device, equipment and medium of cluster job scheduling system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant