0

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 :( ......

arya
  • 1

1 Answers1

1

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)

Paul Ma
  • 57
  • 3
  • 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 03 '12 at 03: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 03 '12 at 07: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 03 '12 at 07:21
  • can you post some debug information for both machines? average load, mem usage, cpu, wait times, io ? – Paul Ma Aug 03 '12 at 12:10