-1

I have a system running on a remote VPS whose main feature is a long running script (it could run for about 10 hours, depending on the user input).

The following are some of its features:

  • Database insertion and selection (MySQL)
  • HTTP Post (cURL)

The following are some of the VPS/system features:

  • Intel(R) Xeon(R) CPU E5-2430 0 @ 2.20GHz, 11 cores
  • Real memory of 1024 MB total
  • OpenVZ Network Interface
  • CentOS Linux 6.4
  • Apache version 2.2.15
  • PHP Version 5.3.3
  • MySQL version 5.1.69

Basically, the long running script should execute a lot of HTTP Post and Database selects and deletes (for a queue) per second. Each HTTP Post will send 50 kb out from my server to another uknown server, and each local Database operation will involve few bytes.

What do I need? I need a server that perform per SECOND, AT LEAST:

  • 10 HTTP Post involving 50 kb (total: about 500 kbps)
  • 10 selects and 10 deletes in the Database (total: about 20 simple and light operation per second [for a queue])

Now, my server is performing 20% of what I need, but I feel that I can get much more from it (since the script itself is already optimized). So I want some tips and good pratices about server configurations in order to optimize its performance, cause I am very noob on it. For example:

  • OS, Apache, PHP and MySQL configuration (cache, enable or disable certain features, CPU and memory limit, etc);
  • Disabling fool processes runing on CentOS by default;
  • Configuring properly the server network interface;
  • Increasing Server CPU cores or Memory or even changing the whole server features;
  • Updating MySQL to 5.6 version

I (and, of course, another noobs) would apreciate a lot if anyone could help.

Edit:

Just got it! (can't answer my onw question... check my comment bellow) :D

cawecoy
  • 273

1 Answers1

1

I'm eager to say that your script is FAR from optimised by looking at the performance you get the and the server specs you gave. Even your typical smartphone should get much better results than the ones you tell us.

  • Is that "another unknown server" responding fast?
  • Does your script spawn only one request at a time, wait for the results, and only then perform the next request, or does it spawn multiple requests in parallel?
  • Is the database the bottleneck? Does it lack indexes? Does it have some big databases but running with the default settings? From your text it doesn't sound like it, but just making sure.

From the OS point of view, I guarantee you that the default CentOS is good enough for much better performance than the ones you gave us and disabling couple of background processes might give you something like 0.5-1.0% performance boost, if that, and no way 500% like you need. The default CentOS install is not starting with the handbrake on.