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 recently moved a web app to Rackspace (CentOS). It runs pretty well with 512mb RAM but im sure i will have to upgrade it to 1024mb RAM pretty soon.

The bad news, is that the service runs on mobile devices (with 5 minute interval pulls to the server)... that means somewhat a pretty high load if a lot of people is using the service at the same time.

Yes, yes... we are working on the push solution already, but until then, do you have any tips on how to optimize the server to handle heavy loads? I already implemented memcached (which helped us a lot) but im still looking forward to other solutions.

Thanks for all tips!

share|improve this question
up vote 1 down vote accepted

Without knowing anything about the service or the type of load it generates I can only offer a very generic answer.

  1. Profile, try to find the bottlenecks. It's hard to tell where your bottlenecks actually are. Some options are
    1. Disk IO
    2. Database (a combination of CPU and Memory)
    3. Apache workers
    4. TCP connections (and other network primitives)
    5. Network bandwidth
  2. Herding is a serious problem with pull applications. Make sure you don't herd users into a periodic load. If possible, randomize how often the users hit the site.
  3. Scale the frequency the users pull data after the load
  4. If the data the users pull is not always fresh, make sure you implement a conditional-get of some sort to ensure you don't spend lots of time generating data nobody needs.
share|improve this answer
well, the there are over 350k users. 130gb bandwidth. We have around 10k online users at a given time... each 5 minutes each user pulls data to check if there is something new. I use memcache (64MB assigned) to store the data. – andufo Nov 26 '10 at 17:34
How much data does the users fetch in a short and a long session? Is the data unique per user or do you serve the same data to all users? – pehrs Nov 26 '10 at 18:13
unique per user. it is a xml file (no more than 2kb - 4kb) but afterwards images of profile pictures (can be up to 10 jpegs of 10kb each). usually images are only requested the first time. – andufo Nov 26 '10 at 18:19
Do some profiling, return and tell us what is being overloaded. My guess would be that you are CPU bound, and that the load of the TCP sessions is a serious problem, but it is hard to tell. With the amount of connections you are dealing with TCP-offloading starts to make senses. – pehrs Nov 28 '10 at 21: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.