New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small nginx tweaks #45659
Small nginx tweaks #45659
Conversation
While there is little gain of space to use a compression level of 9, the CPU usage is significant. Many experiments point to use something between 4 and 6. For example: - https://mjanja.ch/2015/03/finding-the-nginx-gzip_comp_level-sweet-spot/ - https://github.com/h5bp/server-configs-nginx/blob/3bda5b93edba147d51760e900c2079828a7dc274/nginx.conf#L93
The additions are: - image/svg+xml for SVG images - application/atom+xml for Atom feeds These types are also present in mime.types. For better readability, the list is sorted and formatted with one type per line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both changes seems reasonable.
@GrahamcOfBorg test nginx |
Success on x86_64-linux (full log) Attempted: tests.nginx Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: tests.nginx Partial log (click to expand)
|
In my opinion, the justification should be in a comment instead of a commit message. After the code has moved around a lot, it's difficult to find out the original reason why some value was set to some default if it's in commit messages. |
Feel free to add the urls to the gzip compression value. |
Thanks @vincentbernat |
Motivation for this change
These two changes are independent but I thought it would be silly to have two PR for such small changes. If one of these changes only is rejected, I'll rebase the PR to remove it.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)