Skip to content
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

ab test failed #18

Open
AlPasser opened this issue Mar 1, 2023 · 2 comments
Open

ab test failed #18

AlPasser opened this issue Mar 1, 2023 · 2 comments

Comments

@AlPasser
Copy link

AlPasser commented Mar 1, 2023

Hi, I tried to replace gzip with zstd. So I did an ab test.
This is for gzip
ab -s 120 -c 1000 -n 200000 -H "Accept-Encoding: gzip" -T "application/json" -p test1.json ip:port/health_check/check
I got my ab reports finnally.
And then I tried this:
ab -s 120 -c 1000 -n 200000 -H "Accept-Encoding: zstd" -T "application/json" -p test1.json ip:port/health_check/check
ab exited with this:
apr_socket_recv: Connection reset by peer (104)
Total of 2317 requests completed
I checked the nginx error.log, found some wokers exited like this:
2023/03/01 20:10:26 [alert] 12898#0: worker process 12917 exited on signal 9
Any advices will be helpful, thx!

@tokers
Copy link
Owner

tokers commented Mar 2, 2023

Signal 9 means the worker process was killed with SIGKILL. Could you checkout the dmesg output? Maybe this process was killed by the OOM killer.

@AlPasser
Copy link
Author

AlPasser commented Mar 2, 2023

I found out that zstd_comp_level was set too large:
zstd_comp_level 16;
After some tests, I got the result:

  1. The compression speed of zstd_comp_level 2 is almost equal to gzip_comp_level 6
  2. As for zstd_comp_level 2 and gzip_comp_level 6, when HTML docs is larger than 2KB, $zstd_ratio beats $gzip_ratio

@jason-x-xu jason-x-xu mentioned this issue Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants