0

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

Unknown
  • 101
  • 1

1 Answers1

2

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 :/

Malik
  • 191
  • 4
  • thank you for answer, and compression level 1 still takes longer than uncompressed data – Unknown Nov 16 '22 at 08:39
  • 1
    Depending on the content you serve [precompressed files](https://nginx.org/en/docs/http/ngx_http_gzip_static_module.html) might be an option. – Gerald Schneider Nov 16 '22 at 09:13
  • @GeraldSchneider thank you very much this way work fine, but I should upload my static folder .gz – Unknown Nov 16 '22 at 10:34