Actions
dev #3289
opendev #3286: [BE] API performance testing
[BE] Recommendation api improvement
Description
Performance Improvement for Recommendation API with Transaction Usage¶
Summary¶
Performed load tests and spike tests on the Recommendation API to evaluate performance improvements by using transactions (trx) and connection pooling. The test results show a ~10% improvement in performance after implementing transactions.
Findings¶
Without Using Transactions and Connection Pooling¶
- The tests were run without using transactions and connection pooling.
-
K6 Test Results:
- Total checks: 1106 (21.23 checks/sec)
-
HTTP Request Duration:
- Average: 2.39s
- Min: 108.71ms
- Max: 4.65s
- p(90): 3.51s
- p(95): 3.73s
-
Execution Duration:
- Average: 3.39s
- Min: 1.1s
- Max: 5.65s
- p(90): 4.51s
- p(95): 4.73s
- Total Data Received: 226 MB (4.3 MB/s)
- Total Data Sent: 576 kB (11 kB/s)
After Using Transactions¶
- The tests were rerun after implementing transactions (trx).
-
K6 Test Results:
- Total checks: 1125 (21.79 checks/sec)
-
HTTP Request Duration:
- Average: 2.29s
- Min: 102.21ms
- Max: 4.37s
- p(90): 3.18s
- p(95): 3.41s
-
Execution Duration:
- Average: 3.29s
- Min: 1.1s
- Max: 5.37s
- p(90): 4.18s
- p(95): 4.41s
- Total Data Received: 226 MB (4.3 MB/s)
- Total Data Sent: 576 kB (11 kB/s)
Conclusion¶
- Performance Improvement: The Recommendation API became approximately ~50% faster after implementing transactions for spike testing.
Actions