Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Cross-posted from StackOverflow:

I wrote a little toy script to solve this type of game, and put it on my new micro EC2 instance. It works perfectly, but while it takes around 0.5 seconds to run a local version, and takes under 0.5 seconds to run both the local and the bottle.py version on my home computer, running the bottle.py version on the EC2 instance takes over 2 minutes.

Python has the cpu pegged at 99% the entire time. Only 7.4% memory usage, consistently, and no swapping. The only guess I have is initialization time for bottle.py on EC2, but if it were that, why would it be ~200x faster on my own computer with bottle.py?

share|improve this question
    
Out of curiosity, which pybloomfilter are you using? I'm getting "TypeError: too many initializers" on the scrambled = line. Or is there something else that's causing that error? –  Dennis Williamson Dec 20 '10 at 18:44
    
Instead of pybloom, I went with pybloomfiltermmap from this post. It works fantastically well in every use case except when called by bottle.py on EC2. –  user61633 Dec 20 '10 at 20:11

1 Answer 1

Amazon micro instances only guarantee a small amount of CPU, but will occasionally burst additional CPU resources. If you have a CPU intensive script, it will run slowly on a micro instance most of the time by design. More information is in the Amazon announcement here:

http://aws.amazon.com/about-aws/whats-new/2010/09/09/announcing-micro-instances-for-amazon-ec2/

share|improve this answer

Your Answer

 
discard

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.