Closed jeongsik-woo closed 3 months ago
large size file exmple: https://github.com/json-iterator/test-data/blob/master/large-file.json
cc @nodejs/libuv
It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.
It seems there has been no activity on this issue for a while, and it is being closed. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.
Details
When I run zlib.gzip, I expect the gzip to be handled by threads in a UV_THREADPOOL with the number of threads set by UV_THREADPOOL_SIZE.
So, I thought that increasing the UV_THREADPOOL_SIZE would naturally result in more threads running concurrently, which would improve performance, but this was not the case.
I experimented with UV_THREADPOOL_SIZE values of 4, 8, 16 and 32. The modification from 4 to 8 resulted in a nearly 2x performance increase, while the modification from 8 to 16 resulted in almost no performance difference. I thought that setting UV_THREADPOOL_SIZE to 16 would make the job faster by having 16 UV_THREADs running at the same time to do 32 gzips, but it didn't.
Do you have any idea why?
test results is below.
Node.js version
v18.17.0
Example code
Operating system
Darwin 21.6.0 Darwin Kernel Version 21.6.0: Sat Jun 18 17:07:22 PDT 2022; root:xnu-8020.140.41~1/RELEASE_ARM64_T6000 arm64
Scope
runtime
Module and version
Not applicable.