Cpu |
[DataContractAttribute] public enum CpuCoreMode
| Member name | Value | Description |
|---|---|---|
| TwoCore | 0 | Internal task threading is optimized to use 2 CPU cores (assumption is that these cores have Hyper-Threading Technology or something equivalent). This mode should be used for low end desktop/laptops processors. |
| FourCore | 1 | Internal task threading is optimized to use 4 CPU cores (assumption is that these cores have Hyper-Threading Technology or something equivalent). This is the default environment mode. |
| SixCore | 2 | Internal task threading is optimized to use 6 CPU cores (assumption is that these cores have Hyper-Threading Technology or something equivalent). |
| EightCore | 3 | Internal task threading is optimized to use 8 CPU cores (assumption is that these cores have Hyper-Threading Technology or something equivalent). |
Internally, DocumentTaskEngine will adjust the number of task processing threads for this given CPU core mode.
If you are running DocumentTaskEngine on a desktop PC with a 4-core Intel i7 CPU then use FourCore. Setting a higher CPU core count for a system that has less CPU cores will actually degrade performance due to too much thread context switching. An Intel i7 CPU (with 16GB RAM) is the minimum system requirement for an DocumentTaskEngine instance.
If you have a server with 16 CPU cores and you wish to run 4 instances of DocumentTaskEngine simultaneously, then also use FourCore. But these cores should have Hyper-Threading Technology or something equivalent. Each DocumentTaskEngine instance should have 16GB of RAM, so if running 4 instances on one system, that system should have 64GB of RAM.
It is better to break processing jobs into smaller tasks of 1000 to 5000 documents or whatever adds up to 4-5 GB worth of documents so that a document processing job can be better distributed by work (tasks). If something goes wrong with a task, then only that task and its associated documents need to be re-processed. For example, if a failure happens on a very large task (and towards the end of the task) then all that processing time has been wasted and needs to be re-started.