The pdserver's virtual memory management

Much of the memory used by a pdserver is transient, that is, it is used for a purpose, freed, and available for use again. However, the pdserver tries to maintain all its objects in memory to provide the best performance.

Once a pdserver has allocated 70% of its total virtual memory allotment, it starts to manage its existing memory before requesting more memory. When a pdserver reaches 90% of its total virtual memory, it automatically shutdowns to prevent object corruption that could be caused by a crash from running out of memory.

This mechanism is not enabled by default, because this behavior lowers the performance too early. If you want to enable this mechanism, export the PD_USEMEMCLEANUP environment variable with a value of yes before starting InfoPrint Manager server.

After reaching 70% of its total virtual memory, a pdserver tries to re-use its existing allocated memory by swapping objects out of memory to disk before requesting more memory. The process of swapping objects out of memory can be time consuming. A least-recently-used algorithm is used to swap objects out of memory. Depending on the situation, a lot of memory can be recovered and your server can run for a long time on that recovered memory. However, any objects swapped out of memory will be brought back into memory if you access them again, for example by issuing a pdls -c job serverName: . If the server doesn't have objects to swap out that it doesn't need to access, it is not going to benefit from the memory recovery process.

The ability to recover memory for re-use is related to object management, so the memory is only checked when objects are being accessed in the pdserver. Functions in the pdserver that do not access objects have no ability to recover memory for re-use. These functions do not leak memory, but if they need more memory they request it from the O/S without swapping objects out of memory in an attempt to re-use previously allocated memory.

You are definitely not getting the best performance possible if you have a pdserver in object swapping mode and should avoid this situation. To alert you to this so you can correct the problem, the pdserver logs messages regarding this situation in its error.log. It also sends notification messages to the GUI for display in the error message window and to those identified on the server's notification-profile attribute. By default, the pdserver's notification-profile is set to send both low-on-memory and memory-exhausted notification messages. The messages sent for low-on-memory events are 5010-642 InfoPrint Manager server ____ detected a memory shortage and is attempting to recover memory and 5010-648 The InfoPrint Manager server ___ is using ___ percent of its available memory. The message sent for memory-exhausted is 5010-647 No memory available for the InfoPrint Manager server ___. Attempting shut down.

    Note:
  1. If you don't like the server's default delivery-address and delivery-method for these notifications, you can change them. You can also have the notifications sent to multiple delivery-addressses.
  2. If your pdserver's notification-profile existed before these events were added to the product, you might have to add them to your server's notification-profile, or you can reset the notification-profile to the default, and they should appear.

If you are encountering a low memory situation, you can correct the problem by increasing the pdservers allotment of memory or by adding more pdservers and moving some of the objects and processing to them. You might also have old objects, such as retained jobs, you do not really need that could be deleted.

The PD_THRMEM_THREADSHOLD environment variable can control how much memory is used for permanent objects (queues, actual destinations) and transient objects (jobs). A higher value for the PD_THRMEM_THREADSHOLD environment variable is used for permanent objects, while a lower value is used for transient objects. For more information about this environment value, see RICOH InfoPrint Manager: Reference.