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

Configure I/O pool threads' stack size to a smaller value instead of using the default. #1425

Closed
srh opened this issue Sep 13, 2013 · 2 comments
Assignees
Milestone

Comments

@srh
Copy link
Contributor

srh commented Sep 13, 2013

In issue #1422, user @nu11gravity ran out of memory because his system had a 10 MB default stack size and 256MB of memory, resulting in hitting a resource allocation limit in a pthread_create call since the default I/O pool size is 32.

A workaround is to use --io-threads to specify a smaller I/O pool size.

Our blocker pool threads do not need much stack space. They don't recurse, the deepest we go is when printing a backtrace when a guarantee fails.

The default stack size on the system I'm using right now is 2 MB. There's no need for use to spend 64 MB of memory on these I/O pool threads. We could set a pthread attribute to make their stacks much smaller. 128 KB would be fine, that's what our coroutine stack size is.

edit: working on this in branch sam_1425 off v1.9.x.

@srh
Copy link
Contributor Author

srh commented Sep 13, 2013

Currently in branch sam_1425, review 920.

@srh
Copy link
Contributor Author

srh commented Sep 13, 2013

Merged to v1.9.x as of 6f17115.

@srh srh closed this as completed Sep 13, 2013
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