How does the Conversion Service handle concurrency and how can it be adjusted?
Nutrient’s range of Document Conversion products is designed with scalability in mind, as detailed in the load test results in How well does the PDF converter scale deal with high load?. However, we frequently receive inquiries regarding how the Document Converter schedules requests internally, handles parallel processing, and how the settings can be optimized for specific scenarios.
Concurrency
The Conversion Service efficiently tracks and manages all incoming requests, including:
-
The number of requests currently executing
-
The duration of each request
-
The responsiveness of each request
-
The type of each request
Each file format (e.g., Word, Excel) is tracked separately, with the number of concurrent requests per file type limited by a configurable value (default is 2).
Key considerations
-
Sequential execution of operations: Each incoming request or operation is processed sequentially. This means that the steps of an operation are executed one after another (for example, a document is converted, followed by optional watermarking and encryption steps).
-
Sequential merge operations: Merge operations are executed sequentially, with each file being converted in sequence, not in parallel. Therefore, if you don’t expect many concurrent merge operations, having more than two CPU cores on your conversion server is generally unnecessary.
-
Parallel execution of concurrent requests: Concurrent incoming requests (including conversion, merge, watermarking, etc.) are processed in parallel to maximize CPU and system resource utilization.
-
Request limits: The total number of concurrent requests must not exceed the value set in the
maxConcurrentCalls
configuration (for more details, see the Tweaking Settings section below).
Requests that arrive when the system is at maximum capacity for a given file type or overall will be queued and processed as soon as resources become available.
This straightforward yet effective model enables the software to scale exceptionally well, making it both easy to understand and troubleshoot.
Tweaking settings
The default settings are designed to accommodate most common scenarios. However, if you have specific requirements—such as only converting MS-Word files, or if your system has more than 2 CPU cores—you may want to adjust the following settings in the service’s configuration file:
These settings apply to releases older than version 8.4. For guidance on configuring newer versions, refer to the details further down the page.
-
Concurrency.MaximumInstances.WinWord: Specifies the maximum number of parallel conversions allowed for the Word Processing converter (for example, DOC, DOCX, RTF, TXT). The default value is set to 2.
-
Concurrency.MaximumInstances.Excel: Specifies the maximum number of parallel conversions allowed for the Spreadsheet converter (for example, XLS, XLSX, CSV). The default value is set to 2.
-
Concurrency.MaximumInstances.MSPub: Specifies the maximum number of parallel conversions allowed for the MS-Publisher converter. The default value is set to 2.
-
Concurrency.MaximumInstances.Visio: Specifies the maximum number of parallel conversions allowed for the Vector converter (for example, VSD, VDX, SVG). The default value is set to 2.
-
Concurrency.MaximumInstances.CAD: Specifies the maximum number of parallel conversions allowed for the CAD converter (for example, DWG, DXF). The default value is set to 2.
-
Concurrency.MaximumInstances.TIFF: Specifies the maximum number of parallel conversions allowed for the TIFF converter. The default value is set to 2.
-
Concurrency.MaximumInstances.MSG: Specifies the maximum number of parallel conversions allowed for the MSG (email) converter. The default value is set to 6.
-
Concurrency.MaximumInstances.PowerPNT: Specifies the maximum number of parallel conversions allowed for the Presentations converter (for example, PPT, PPTX, ODP). The default value is set to 1 and should not be changed.
-
Concurrency.MaximumInstances.InfoPath: Specifies the maximum number of parallel conversions allowed for the InfoPath converter. The default value is set to 1 and should not be changed.
-
Concurrency.MaximumInstances.HTML: Specifies the maximum number of parallel conversions allowed for the HTML & Image converter (for example, HTML, JPG, GIF, PNG). The default value is set to 2.
-
Concurrency.MaximumInstances.CommandLineConverter: Specifies the maximum number of parallel conversions allowed for the Command Line converter. The default value is set to 2. This value is shared across all configured Command Line converters.
-
Concurrency.MaximumInstances.OCR: Specifies the maximum number of parallel operations allowed for the OCR Facility. The default value is set to 2.
-
serviceThrottling maxConcurrentCalls: Specifies the maximum number of overall concurrent requests, including conversion, watermarking, and security operations. The default value is set to 15.
With the release of version 8.4 of Nutrient Document Converter, these settings have been moved to the maxInstances
property matching the figures described previously, with the exception of the setting for the OCR Processor, which can be found in the
Important considerations for configuration changes
-
Do not modify the values for the presentations (PowerPoint) and InfoPath converters. These converters are limited by architectural constraints in the underlying Microsoft Office applications, preventing them from tracking concurrent instances separately.
-
Avoid setting values greater than 16 for each file format. The underlying Office applications do not perform optimally under high loads and may encounter performance degradation.
-
Do not set
maxConcurrentCalls
below 5. Setting this value too low can lead to deadlocks, particularly when converting file formats that involve attachments, such as MSG and InfoPath.
Editing the configuration file
The configuration file can be edited as follows:
-
Open the
Muhimbi.DocumentConverter.Service.exe.config
file in a text editor (for example, Notepad). You can quickly locate the configuration/installation folder that holds this file using the shortcut available in the Muhimbi Document Converter group in the Windows Start Menu. -
Search for the configuration keys you want to modify.
-
Save the configuration file.
-
Restart the
Muhimbi Document Converter Service
using the Services Management Console or using the command prompt to execute the following commands:
Net stop "Muhimbi Document Converter Service" Net start "Muhimbi Document Converter Service"
For more details, see: