Kernkonzepte
A caching proxy system that buffers and performs bulk-write operations to significantly improve database write performance compared to conventional caching proxies.
Zusammenfassung
The paper explores the design and implementation of a caching proxy system, referred to as RcSys, that aims to enhance database performance by optimizing the handling of upload requests.
Key highlights:
- Conventional caching proxies like Squid simply redirect upload requests to the main server, missing opportunities for optimization.
- RcSys extracts and buffers the data from cacheable upload requests locally, then performs bulk-write operations to the database, resulting in substantial performance gains.
- RcSys utilizes a multi-threaded architecture with a thread pool to efficiently process incoming requests, avoiding bottlenecks that could occur with a single-threaded design.
- The caching mechanism relies on the operating system's file caching capabilities, simplifying the implementation while benefiting from OS-level performance optimizations.
- Experimental results show that RcSys outperforms Squid by 5.20 to 9.12 times in SQL query execution time and 14.17 to 52.11 times in SQL query planning time for database write operations.
- While RcSys lacks some advanced features present in mature solutions like Squid, it demonstrates the potential benefits of a caching proxy system designed specifically to optimize database write performance.
Statistiken
The execution time for inserting 1, 100, 1,000, 10,000, 50,000, and 100,000 rows into the database tables was measured for both RcSys and Squid. The results show significant performance improvements with RcSys:
For the 4c0fk table:
RcSys execution time: 0.055 ms (1 row), 1.831 ms (100 rows), 9.64 ms (1,000 rows), 48.106 ms (10,000 rows), 254.99 ms (50,000 rows), 514.69 ms (100,000 rows)
Squid execution time: 0.055 ms (1 row), 8.249 ms (100 rows), 65.345 ms (1,000 rows), 633.505 ms (10,000 rows), 3174.3 ms (50,000 rows), 6413.4 ms (100,000 rows)
For the 10c0fk table:
RcSys execution time: 0.299 ms (1 row), 0.758 ms (100 rows), 6.368 ms (1,000 rows), 59.859 ms (10,000 rows), 296.108 ms (50,000 rows), 578.355 ms (100,000 rows)
Squid execution time: 0.299 ms (1 row), 6.11 ms (100 rows), 57.113 ms (1,000 rows), 730.357 ms (10,000 rows), 3446.2 ms (50,000 rows), 6458.6 ms (100,000 rows)