Performance Tuning
Performance tuning is an important aspect of running a high-performance web server like Gruxi. In Gruxi, these settings are high-level optimizations that can be adjusted to better suit your specific workload and environment. This means you will never have to deal with low-level tuning of thread pools, connection limits, or similar settings.
In most cases, the default settings work well out of the box.
Gzip Compression
A simple win is enabling gzip compression, which can significantly reduce response sizes and improve load times. In combination with the file cache, compression is especially effective because it happens when a file is cached rather than on every request.
File caching
Another big improvement for serving static files is file caching. By enabling file caching, you can drastically reduce the load on your server and improve response times for clients. The file cache keeps the file state and content in memory, allowing it to serve files as fast as the network allows without hitting the disk every time.
Downsides of file caching
File caching will consume a certain amount of memory, especially if you have a large number of files or files that change frequently. Monitor your server's memory usage and adjust the cache size as needed.
File caching works best when files don’t change frequently. If your files are updated often, consider using a different caching strategy.
An internal thread in Gruxi monitors cached files for changes and refreshes the cache as needed, but this is not instantaneous, so a small delay may occur after updating files.
See the settings related to file caching for details on how to configure file caching.