process threads/stacks use up memory - which tools can detect?
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
process threads/stacks use up memory - which tools can detect?
My process starts up 200 threads (over time) and each one gets (defaultly) 10 MB of stack. This totals 2 GB just for stack space, and the process eventually dies.
I found this problem the hard way - by messing around with ulimit. I tried using vmastat, free, top, and looking at /proc/meminfo and /proc/slabinfo, but these tools don't seem to show that my address space (2 GB per process, right?) is being used up by the thread's stack. I looked at top output before and after the threads were started, and saw very little change. The other tools/data were inconclusive as well.
Any ideas concerning how a problem like this could be detected w/o having to guess at sizes? For example, figuring out 'ulimit -s unlimited' actually -reduced- the size of the allocated stack from 10 MB (the default on RH) to 2 MB took a while to detect.
How can I see this problem develop? Am I using the wrong tools, am I looking at the data wrong.. or the wrong data?
My process starts up 200 threads (over time) and each one gets (defaultly) 10 MB of stack. This totals 2 GB just for stack space, and the process eventually dies.
I found this problem the hard way - by messing around with ulimit. I tried using vmastat, free, top, and looking at /proc/meminfo and /proc/slabinfo, but these tools don't seem to show that my address space (2 GB per process, right?) is being used up by the thread's stack. I looked at top output before and after the threads were started, and saw very little change. The other tools/data were inconclusive as well.
Any ideas concerning how a problem like this could be detected w/o having to guess at sizes? For example, figuring out 'ulimit -s unlimited' actually -reduced- the size of the allocated stack from 10 MB (the default on RH) to 2 MB took a while to detect.
How can I see this problem develop? Am I using the wrong tools, or am I looking at the data wrong.. or the wrong data?
Thanks for any help
Steve
BUMP. I'm still getting, e.g., sig 11, and crashes all over. During problem periods, the process restarts and fails quickly. I'm pretty sure it is a resource problem, but I need proof. Any help is greatly appreciated. Thanks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.