Skip to main content
Version: 10.0

Performance

The webPDF server executes its PDF operations via web services. As of this writing, the server features seven web services. Several instances of each web service can be executed in parallel, i.e. per web service end point, several queries can be processed simultaneously.

tip

In the standard installation, a max. of two (2) instances of each web service will be run. This number can be increased with an additional license.

If all instances of a web service are busy with queries, additional queries have to wait and are queued, and therefore executed with a delay. Consequently, increasing the number of instances allows more queries to be processed in parallel and the overall throughput of the server also increases.

Adapting the instances

To improve the server’s performance (the throughput), it is possible to increase the number of parallel instances per web service using the configuration settings in the administration area of the portal. This allows more queries per unit of time to be answered and the processing performance or data throughput is increased.

Sample for the effect of the instances on the throughput

Assumption: You want to convert Word documents to PDF documents and it takes 5 seconds to convert a single document.

Conversion of 20 documents:

  • Two instances (standard license): Two documents in parallel in 5 seconds, which means that all 20 documents are converted in 10 (= 20 documents / 2 instances) x 5 seconds = 50 seconds.
  • Four instances: Four documents in parallel in 5 seconds, which means that all 20 documents are converted in 5 (= 20 documents / 4 instances) x 5 seconds = 25 seconds.

In addition to the improvement in data throughput, the response times per document also improve. While in the first case the 19th and 20th document arrive at the client after 50 seconds, in the second case documents 17-20 are already at the client after 25 seconds.

caution

If the number of instances is to be increased, it may be necessary to adapt the license. Please contact support in this regard.

Adapting the memory and cores

If you increase the number of instances, it may also become necessary to adapt the hardware (CPU, memory). Especially the CPU usage increases with the number of instances. Consequently, it is important that the number of instances should be set in a suitable relation to the number of processor cores available on a system.

Also bear in mind that with an increasing number of instances, the memory requirements also go up. Adapt the available memory accordingly using the configuration files of the server.

Waiting queue

The size of the waiting queue is calculated automatically ("Auto queue mode"). It is based on the number of instances available and is as large as there are instances available.

tip

Ideally, a client application should send as many requests as there are instances available, but never more than the number of instances plus the size of the waiting queue (number of instances * 2).

The waiting queue and the automatic calculation of the size ensure that there is always a waiting request under optimal conditions so that the instances can continue their work without additional delay.

If the waiting queue is full, no further requests are accepted and the web service call is cancelled with an error code of -9.

You can see the size of the waiting queue in the Admin Portal under the sidebar Statistics. The maximum size and the current utilisation during server operation are displayed there.

The queue size is configured in the Admin Portal under the Webservices sidebar.

caution

It makes no sense to define the waiting queue as being excessively large, as this only results in the server having to hold more requests, unnecessarily increasing memory and system load.

If you get the error code -9 when calling up web services, it means that the client (or the various clients) are sending too many requests at the same time. In this case, you need to reduce the number of simultaneous requests or increase the number of instances on the server (see above).

Maximum latency

If the server executes the web services in parallel via its instances, then these web service requests require a certain amount of time from the start time (trigger time) until the results are provided. This execution time is defined as “latency” in webPDF.

The default setting limits the latency to 180 seconds, i.e. a web service call can be executed on an instance for a maximum of 180 seconds. If the web service does not return a result within this time, the execution on the instance is canceled. In this case, the web service call returns error code -10. Instances are monitored on the server by a watchdog process to detect and abort hanging requests.

If you regularly receive the error code -10 from your client, then this can have various reasons:

  • Document content: the document is corrupt and, for example, runs in an endless loop during processing
  • Document size: a PDF is to be processed with OCR, for example, but has too many pages and therefore takes too long
  • Timeout: the server has no internet access, for example, when converting e-mails (timeout when retrieving resources)
  • Resource availability: the server is to access a resource that is currently unavailable (e.g. a printer)

These are just a few possible reasons for the error code. If you cannot determine the reason, please contact support with the relevant documents and information about the web service used (with parameters).