Understanding Preview Generation Properties

Preview Generation Thread Controls

With the version 8.0, more options are added to control the threads used by Preview Server for various tasks.
In this article we will explore the internal working and learn how to configure the threads if needed.

In most cases you don’t have to worry about configuring these values, Preview Server will select the optimal available threads for the various jobs.
This has version has divide the jobs into three categories:

  • Threads for low priority jobs. Default value is 1 thread.
    • Used for Video Scrub Generation it is a low priority job and each job takes considerable about of CPU.
  • Threads for I/O jobs. Default value is very High.
    • Used for various checkout operations on the Preview Server. Preview server needs to checkout the files from Zoom server for generating the previews. As these job are I/O bound, a very high limit is kept.
  • Thread for CPU bound Jobs. Default value is number of cores minus one. So, if you are running the preview serer on 8 core machine, CPU jobs will be limited to 7 cores(threads).
    • This pool is used for various preview generations like Image preview generation, custom converters, video conversions etc…

Changing the Thread Limits

To change the thread limits:

  • Visit the Preview Server installation machine.
  • Locate the [PREVIEW_SERVER_INSTALL_DIR]/conf/preview-server.xml file.
  • Open the preview-server.xml for edit.
  • Locate the section: <previewGenerationProperties>.
  • Add or Edit the following properties in the <previewGenerationProperties> section:
    • <lowestPriorityPoolSize>
    • <ioJobsPoolSize>
    • <cpuLimitedPoolSize>
  • Setting the above values to Zero or removing them results in the loading of defaults values as explained earlier in this section.
  • Make sure to restart the Preview Server after changing the settings.

Snippet from preview-server.xml