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

About the memory consumption of pool #125

Open
gitmko0 opened this issue Nov 7, 2020 · 0 comments
Open

About the memory consumption of pool #125

gitmko0 opened this issue Nov 7, 2020 · 0 comments
Assignees
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@gitmko0
Copy link

gitmko0 commented Nov 7, 2020

How much memory per goroutine pool size? Can you please put this on main page?
p, _ := ants.NewPool(50000) <- basically goroutine use 2kb / 4kb per go routine

From benchmark, it's 50k pool
https://github.com/panjf2000/ants/#-performance-summary
total 10M ants instance is 38mb which means each item size is 760bytes with 50000 items.

is 760bytes the limit for each pool item?

last question:
pool.Tune(100000) <- May I ask what's the "optimum size" for this? what's a good suggestion / advise on setting size? also on what occasion will u suggest tuning this size? please put the number of bytes each pool is on front page as mentioned so we can calculate and adjust better with your input.

@gitmko0 gitmko0 added help wanted Extra attention is needed question Further information is requested labels Nov 7, 2020
@panjf2000 panjf2000 changed the title How much memory per goroutine pool size? Can you please put this on main page? About the memory consumption of pool Nov 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants