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

On spawning multiple processes, the processes are going into sleep state. #65

Open
akhileshnirna opened this issue Feb 10, 2021 · 0 comments

Comments

@akhileshnirna
Copy link

akhileshnirna commented Feb 10, 2021

Hello,
I've been conducting load tests on my code on AWS EC2 instance. This piece of code is run on multiple threads. (it executes a ruby script written by me):

begin
  Subprocess.check_call(['some','command'])
rescue Subprocess::NonZeroExit => e
  p e.message
end

OS: Ubuntu
No of threads: 15
AWS Instance: t2.2xlarge

After some amount of time, i start noticing that most of the processes go into S state and stay there
Following is the output of top command:
Screen Shot 2021-02-10 at 5 18 16 PM

Note: I have ran my tests on the same code without using subprocess (i.e. only multithreading), it works fine without any issues. However there is a requirement that I use Subprocesses.

Could you please guide as to where I am going wrong.
Is it possible that the pipe buffer is being filled? I am not using pipe buffers for my std-in/out/err and the default behavior should not be using pipe.

Thanks,
Akhilesh

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

1 participant