简体   繁体   中英

enable gzip compression on nginx give me long time server response

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 在此处输入图像描述

gizp disabled response time

在此处输入图像描述

The following configurations have been tested and there are no problems with slowness or problems.

gzip on;
gzip_vary       on;
gzip_proxied    any;
gzip_comp_level 6;
gzip_types 
 application/javascript
 ...
 ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM