CPC G06F 3/0613 (2013.01) [G06F 3/0653 (2013.01); G06F 3/067 (2013.01)] | 12 Claims |
1. A method for dynamically managing a shared memory pool, comprising:
determining a first shared memory pool mechanism for the shared memory pool, wherein the first shared memory pool mechanism is a fixed memory pool mechanism or a dynamic memory pool mechanism;
determining a second shared memory pool mechanism suitable for a second service scenario based on the second service scenario, wherein the second shared memory pool mechanism is a fixed memory pool mechanism or a dynamic memory pool mechanism; and
when the second shared memory pool mechanism is different from the first shared memory pool mechanism, adjusting the first shared memory pool mechanism to the second shared memory pool mechanism,
wherein the determining a second shared memory pool mechanism suitable for a second service scenario based on the second service scenario comprises:
determining, based on the second service scenario, meter of a second shared memory pool the parameter being applicable to the second service scenario, and
determining the second shared memory pool mechanism applicable to the second service scenario based on the parameter of the second shared memory pool,
wherein the determining, based on the second service scenario, a parameter of a second shared memory pool comprises:
obtaining memory usage information in a first time period in the second service scenario; and
determining the parameter of the second shared memory pool based on the memory usage information, and
wherein the determining the parameter of the second shared memory pool based on the memory usage information comprises:
obtaining a memory usage value in a second time period in the second service scenario;
when the memory usage value is greater than a maximum size of a first shared memory pool, using the memory u value as the maxi mum size of the second shared memory pool, or
when the memory value is less than a maximum size of a first shared memory pool using the memory usage value a s the maximum size of the second shared memory pool; and
when the memory usage value is greater than a minimum size of the first shared memory pool, using the memory usage value as the minimum size of the second shared memory pool, or
when the memory usage value is less than a minimum size of the first shared memory pool, using the memory usage value as the minimum size of the second shared memory pool.
|