Score:0

enable gzip compression on nginx give me long time server response

sd flag

I have a web application running on a very low web server (CPU: ARM926EJ-S, RAM: 128MB), when I enabled gzip on nginx, I found that the server takes longer to respond, and I don't know if there is something wrong with the configuration.

configuration:

   gzip on;

   gzip_vary on;
   gzip_proxied any;
   gzip_comp_level 3;
   gzip_buffers 16 8k;
   gzip_http_version 1.1;
   gzip_min_length 256;
   gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

gizp enabled response time enter image description here

gizp disabled response time

enter image description here

Score:2
us flag

It seems like the CPU is just too weak to compress the data in a timely manner. Obviously for you to have any benefit the compression and transfer of the compressed data needs to be faster then just pure uncompressed data delivery.

Try reducing the compression level to 1. If it still takes longer than uncompressed data, you are SOL I guess, and need to live with the relative slow loads of uncompressed data :/

Unknown avatar
sd flag
thank you for answer, and compression level 1 still takes longer than uncompressed data
in flag
Depending on the content you serve [precompressed files](https://nginx.org/en/docs/http/ngx_http_gzip_static_module.html) might be an option.
Unknown avatar
sd flag
@GeraldSchneider thank you very much this way work fine, but I should upload my static folder .gz
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.