Fine tune WHM VPS server for lots of hits

theobserver

Pez Lightyear
Dec 7, 2013
64
1
0
Hi Guys

Can anyone give some tips to optimize the server for the following

Its just 1 account on the VPS (its not even a website, just 1 file)

Basically its going to have 10,000's of hits per day to a very small (1kb php file which puts some data into an MySQL database)

Each visitor may request this file 10-20 times within the space of around 2 minutes.

The server needs to respond as quickly as possible and be able to handle possibly 100s of MYSQL SELECTS and INSERTS at the same time.

Ive no need for mail, or any other services on this VPS, its used purely for this functionality.

Its a WHM (cPanel, CentOS Linux server) with 4GB RAM, 4 Core CPU, 100GB SSD Hard drive.

Im sure there are lots of settings I can change in WHM to optimize the server for this use.

Any help would be much appreciated.

Cheers!
O
 


Your application sounds so simple that you likely won't need to do any tuning (especially with a beefy server like that.) You can use a tool like loader.io to simulate the traffic you expect and verify that.

I would think the mysql setup would be the only potential bottleneck. Just make sure your queries have proper indexes and cache any that don't need live data every time.

If you find some bottleneck after using a load test tool, please describe more what your application code is doing and what your db schema is like.
 
Log into WHM and find the PHP Configuration Editor

Set field 'memory_limit' to 1M

tl;dr - this basically tells your server to use 1 MILLION threads of memory and since you will be getting lots of visitors, will help out with speed.