DocMaker uses InDesign Server as the back-end technology for document processing,
but is cleverly designed to minimize the server load for performance reasons.
Furthermore, communication with the server is streamlined through the DocMaker QueuingService,
which can be configured to address multiple InDesign instances, with automatic support for intelligent load balancing and failover.
You can even dedicate certain servers to handle interactive user requests while others handle unattended jobs.
All of this provides you with the ability to easily scale your Web2Print solution and improve performance by adding additional InDesign servers.
When you are about to take DocMaker into production,
it may not be easy to predict how many instances of InDesign Server will be required to achieve an optimal performance/cost balance.
You can (and should) run some stress tests first, but global timings will only give you a global idea.
Fortunately the DocMaker 3.0 API also provides you with more detailed statistics to monitor back-end performance.
The relevant classes are in the Adam.DocMaker.Core.Statistics namespace.
Before running your tests, you first need to enable gathering of statistics about the InDesign Server internals:
| C# |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
using Adam.DocMaker.Core.Statistics;
class Statistics
{
static void EnableStatistics()
{
// Remove all statistics gathered up until now.
InDesignStatistics.Reset();
// Set the maximum number of log items.
InDesignStatistics.MaxEntries = 250;
InDesignStatistics.Enabled = true;
}
}
|
After running the tests, you can obtain a list of the gathered statistics.
Each item in the list corresponds to the execution of a single script on InDesign Server.
A distinction can be made between scripts that load a document into InDesign Server and scripts that execute document processing on a loaded document.
For each script that has been executed, all kinds of characteristics are available in the
StatisticItem.
Here we are most interested in the detailed timings.
For instance, we can calculate the average time a script spends waiting in the queue of the QueuingService, or the average time it takes to copy
a document from the ADAM documents location to the InDesign Server working folder:
| C# |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
using Adam.DocMaker.Core.Statistics;
class Statistics
{
static void EvaluateStatistics()
{
IEnumerable<StatisticItem> statistics = InDesignStatistics.GetValues();
double averageTimeInQueue = statistics.Average
(s => s.TimeInQueue.Value.TotalMilliseconds);
double averageTimeToCopy =
statistics.Where(s => s.Type == ScriptType.Load).Average
(s => s.TimeToCopy.Value.TotalMilliseconds);
}
}
|
The detailed timings should give you a good idea of how to optimize performance for your specific setup.
If the time spent in the queue is high, adding additional InDesign Server instances may drastically improve performance.
If on the other hand the time needed to copy documents is higher than expected, you may be better off optimizing your network infrastructure
and finetuning the network settings of the DocMaker QueuingService.
Note that gathering statistics can also be enabled in DocMakerStudio through the AdministrationHandler (http://servername/DocMakerStudio/AdamAdmin.axd).