Nginx and Gzip
I'm sure most other people know this already, but hey... maybe they don't?
Whilst nginx typically comes with gzip compression enabled by default, it doesn't compress proxied content by default. Since my default setup is to proxy to gunicorn, that means all of my Django content was going out uncompressed.
On top of that, the default compression level is 1... yes, it's fast, but how often is your site CPU bound?
Here's a comparison of compression times and rates for the page that triggered this effort. It's a django admin page with inlines, each of which has a very large list of m2m records to select from.
Timing is on my antiquated Toshiba Tecra S1 (Pentium-M 1.5G). I haven't done anything more than run it once for each, after doing an initial run to prime the caches/buffers.
As you can see, there's a significant improvement in compression at level 4, without a major cost in time. After 5, it's a more linear time/size tradeoff.
So what does this mean? For general HTML content, level 4 at least for good results, 5 or 6 is probably safe... 9 only if you have a lot of large files, and CPU to spare.