Beego, nginx performance testing, beegong.pdf Performance Testing
Test Tool: AB (apache.pdf)
Hardware environment:
Intel xeon cpu E5-2682 v4 2.50 GHz 4 core
8 GBytes memory
Software environment:
Ubuntu16
Nginx
Static files
3 Kbytes
26000 responses/second (average)
Throughput: 111 Mbytes/second (average)
Concurrency: 300
Each request response time: 10.8 [MS] (average)
------------------------------------------------
58 Kbytes
20000 responses/second (average)
Throughput: 1165 Mbytes/second (average)
Concurrency: 300
Each request response time: 14.2 [MS] (average)
-------------------------------------------------------
Beego
Dynamic files
3 Kbytes
16000 responses/second (average)
Throughput: 52 Mbytes/second (average)
Concurrency: 330
Each request response time: 20.2 [MS] (average)
Performance Test Result Analysis:
From the above results, we can see that nginx's processing performance on static files is powerful in terms of throughput, concurrency, and request processing time per unit. In addition, the cpu usage is only 50%. The overall performance is limited by the AB single process and is not fully utilized.
Beego's dynamic file processing performance is also very powerful. For the same file (3 Kbytes), when nginx is used as a static file for processing, the performance is responses per second. When beego is processed as a dynamic file, it can still achieve the performance of 16 thousand responses per second, with a small reduction in performance. Compared with static file processing, the dynamic file processing server must go through more processes to complete the output, so performance will decline.
Beego's cpu usage reached 95% during processing, and the i3 cpu usage also reached 93% in the previous test in the notebook, which indicates that beego has good scalability. With the enhancement of hardware (CPU and memory), we can improve the performance.