Increasing the memory available to PaperCut

KB Home   |   Increasing the memory available to PaperCut

By default, the PaperCut Application Server is restricted to a maximum RAM allocation of up to one quarter (1/4) of system memory. This ensures that PaperCut does not consume too many resources and “plays nicely” with other applications that may be run on the same system.

If the server is dedicated to running PaperCut then you may choose increase the amount of memory made available to PaperCut. This can improve application performance, particularly on sites with many users or with large printing volumes. Increased RAM allocation helps PaperCut by allowing it to perform optimizations such as disk and data caching. Being a database driven application, PaperCut can benefit greatly.

A popular option with our customers is to allow PaperCut to use up to ½ of the machine’s memory, and then provision the machine with at least 4GB of memory. That strikes a good balance between giving enough resources to PaperCut to process and analyze jobs, as well as letting the machine handle the OS level tasks required for a print server. Since server loads and performance vary greatly, we highly recommend testing the configuration and increasing memory (and CPU) if you are seeing performance issues that you suspect are due to low resources.

Increasing maximum memory (Windows/Linux/Novell)

To increase amount of memory available to PaperCut.

1. Create a text file called service.conf in the directory: [app-path]\server\custom\

2. Open the file in a text editor and add the following line to make PaperCut use up to one third of physical RAM:

wrapper.java.additional.6=-XX:DefaultMaxRAMFraction=3
To make PaperCut use up to one half of physical RAM use the line:
wrapper.java.additional.6=-XX:DefaultMaxRAMFraction=2
You may also specify the amount of physical RAM to use. To make PaperCut use up to 768MB use the line:
wrapper.java.additional.6=-Xmx768m

3. Save the text file

4. Restart the PaperCut Application Server service (On Windows do this in Control Panel→Admin Tools→Services).

5. After the service is restarted the server log file ([app-path]\server\logs\server.log) will show the new “max memory” setting.

Increasing maximum memory (Apple Mac)

NOTE: This only works on PaperCut 9.6 and higher.

To increase amount of memory available to PaperCut on the Mac.

1. Create a text file in the directory: [app-path]\server\custom\ directory called launch-app-server.conf. Change the file permissions to make the file readable to all users (or at least the papercut user).

2. Open the file in a text editor and add the following line to make PaperCut use up to 256MB of physical RAM:

PC_CUSTOM_SERVER_ARG=-Xmx256m
To make PaperCut use up to 512MB of physical RAM use the line:
PC_CUSTOM_SERVER_ARG=-Xmx512m

3. Save the text file

4. Restart the PaperCut Application Server service (By running stop-server.command and then start-server.command scripts located in [app-path]/server/bin/mac/).

5. After the service is restarted the server log file ([app-path]/server/logs/server.log) will show the new “max memory” setting.

Running out of memory or High CPU usage

If PaperCut runs out of memory an OutOfMemoryError will be displayed to the user and/or logged to the service.log file. You may also see GC overhead limit exceeded which is again an indication of running out of memory.

Another indication of running out of memory is very high CPU usage for extended periods of time, by the pc-app process/service as the service tries to rearrange RAM for various tasks.

If this occurs then this is an indication that the server requires more memory, and there are two possible solutions:

  • Add more RAM to the server. We recommend at least 2GB of RAM for busy servers. Our larger customers run around 4Gb of RAM.
  • Increase the maximum amount of memory available to PaperCut (see above). This should only be done if there are not other applications running on the server or if recommended by the support team.

See also


Categories: Implementation / Deployment, Administration, Architecture


Keywords: memory usage, memory fraction, high cpu utilisation, increase memory pool

Comments

Share your findings and experience with other PaperCut users. Feel free to add comments and suggestions about this Knowledge Base article. Please don't use this for support requests.

Article last modified on November 25, 2015, at 08:27 PM
Printable View   |   Article History   |   Edit Article