OCR performance and scale testing
Goals
- Check throughput SPA OCR and identify the performance baseline.
- Identify scaling capabilities.
Solution
See test_tools/perf_test/README.md to review details about running.
OCR configuration
OOTB configuration:
- MongoDB as DB
- MongoDB as message queue
- MongoDB GridFS as object storage
- Two workers
Run configurations
#1
- Hardware: Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50 GHz, 1 Core(s), 2 GB RAM
- Load: mixed, 200 images (one page), no special parameters
- Processing time: 19 min
- Throughput: ~ 630 pages/hour



#2
- Hardware: Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50 GHz, 2 Core(s), 2 GB RAM
- Load: mixed, 200 images (one page), no special parameters
- Processing time: 17 min
- Throughput: ~ 700 pages/hour



#3
- Hardware: Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50 GHz, 4 Core(s), 2 GB RAM
- Load: mixed, 200 images (one page), no special parameters
- Processing time: 12 min
- Throughput: ~ 1000 pages/hour



#4
- Hardware: Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50 GHz, 1 Core(s), 8 GB RAM
- Load: mixed, 200 images (one page), no special parameters
- Processing time: 19 min
- Throughput: ~630 pages/hour



#5
- Hardware: Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50 GHz, 2 Core(s), 8 GB RAM
- Load: mixed, 200 images (one page), no special parameters
- Processing time: 17 min
- Throughput: ~ 700 pages/hour



#6
- Hardware: Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50 GHz, 4 Core(s), 8 GB RAM
- Load: mixed, 200 images (one page), no special parameters
- Processing time: 11 min
- Throughput: ~ 1090 pages/hour



#7
- Hardware: Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50 GHz, 1 Core(s), 16 GB RAM
- Load: mixed, 200 images (one page), no special parameters
- Processing time: 19 min
- Throughput: ~ 630 pages/hour



#8
- Hardware: Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50 GHz, 2 Core(s), 16 GB RAM
- Load: mixed, 200 images (one page), no special parameters
- Processing time: 12 min
- Throughput: ~ 1000 pages/hour



#9
- Hardware: Intel(R) Xeon(R) Platinum 8175M CPU @ 2.50 GHz, 4 Core(s), 16 GB RAM
- Load: mixed, 200 images (one page), no special parameters
- Processing time: 11 min
- Throughput: ~ 1090 pages/hour



Conclusion
- OCR on Linux as a part of SPA has good almost linear scaling capabilities.
- Each processing thread (worker) can fully utilize CPU.
- Each worker requires 2 GB of memory for 1 document page.
- OCR with two workers consumes < 5 GB of memory for 1 document page.
- It's better to OCR worker +1 core for OCR API and system processes.
- Optimal hardware requirements: 4 Core, 8 GB.