Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to execute a set of commands (shell commands) on a number of other AWS Cloud Instances from our java based web platform hosted on the AWS Cloud instance itself. We observed that the time taken to execute a command is much higher when the application is deployed on the cloud instance, than what it is when the same web application is deployed on our local machine. I was actually expecting it to be the other way round.

We are using JCloud's SSH Client APIs to execute commands on the shell of the launched Instances.

How can we resolve the latency issue that we are facing when there are a number of commands executed from a cloud instance on another cloud instance?

Is there anyone else who has observed the same issue? All the instances are in the same Availability zones and so are the EBSes.

I tried pinging the EC2 instance from my local and from within another EC2 instance. I saw the ec2-ec2 instance ping is very fast as compared to ping from my local machine, then why are my shell commands executing slow from EC2 but much faster from my local machine?

Please help i am in real soup here :( ......

share|improve this question

instance to instance communication usualy is very fast on aws. I would suspect that your issues are generated by the application itself. You should monitor instance performance (mem,io,cpu) i suspect you have a high mem usage (due to java)

share|improve this answer
yes, i am also leaning towards it, but the issue is that its just not my local box where its fast. Its on almost 4 local boxes where i have tested. Furthermore, i have also tested my app by deploying it in 3 different cloud instance and same problem. By the way,i do not really agree with your comment on high memory usage because of java. – arya Aug 3 '12 at 3:07
well you can check for one of the others, io and cpu. In every case you can go up to a more resource machine. – Paul Ma Aug 3 '12 at 7:13
actually both my local machine and AWS machine has same configuration, and therefore, i am unable to see what could be the problem. i did ICMP ping and as expected it was much faster in intra-cloud communication than inter-cloud communication :( – arya Aug 3 '12 at 7:21
can you post some debug information for both machines? average load, mem usage, cpu, wait times, io ? – Paul Ma Aug 3 '12 at 12:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.