On a weekday at a time where very few use the optimized website on the server, the time for the page to completely load excluding 3rd party advertisements is about 0.6 seconds to 1 second.
Now when a lot of users access the site simultaneously, the loading time exceeds googles recommended time. It loads in 1.8 seconds. I'm trying to keep it down to under 1.5 seconds.
I looked at logs that could possibly affect the issue. I looked at iostat and see:
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
sda 1.29 5.06 4.05 2.07 24.74 28.50 17.41 0.23 37.09 2.76 1.69
I then looked at system activity reporter for the busy timeframe:
03:30:01 PM all 0.10 0.01 0.02 0.07 0.00 99.80
03:40:01 PM all 0.10 0.01 0.02 0.08 0.00 99.79
03:50:01 PM all 0.22 0.01 0.03 0.13 0.00 99.61
04:00:01 PM all 0.11 0.01 0.02 0.12 0.00 99.75
04:10:01 PM all 0.09 0.01 0.02 0.09 0.00 99.78
04:20:01 PM all 0.17 0.01 0.02 0.13 0.00 99.67
04:30:01 PM all 0.20 0.01 0.02 0.12 0.00 99.65
04:40:01 PM all 0.10 0.01 0.02 0.11 0.00 99.75
04:50:01 PM all 0.08 0.01 0.02 0.09 0.00 99.80
05:00:02 PM all 0.14 0.01 0.03 0.13 0.00 99.69
05:10:01 PM all 0.16 0.01 0.02 0.13 0.00 99.68
05:20:01 PM all 0.15 0.01 0.02 0.14 0.00 99.68
05:30:01 PM all 0.17 0.01 0.02 0.15 0.00 99.65
05:40:01 PM all 0.32 0.01 0.03 0.16 0.00 99.48
05:50:01 PM all 0.37 0.01 0.04 0.16 0.00 99.42
06:00:01 PM all 0.08 0.01 0.02 0.08 0.00 99.81
06:10:01 PM all 0.18 0.01 0.02 0.14 0.00 99.65
06:20:01 PM all 0.09 0.03 0.02 0.11 0.00 99.76
06:30:01 PM all 0.10 0.01 0.02 0.09 0.00 99.78
06:40:01 PM all 0.10 0.02 0.02 0.08 0.00 99.78
06:50:01 PM all 0.14 0.01 0.02 0.11 0.00 99.72
07:00:01 PM all 0.12 0.01 0.02 0.12 0.00 99.74
07:10:01 PM all 0.08 0.01 0.02 0.08 0.00 99.82
The reason why I picked that time was because the server provider has a cacti graph that shows me when users access the server for any reason. The requests in the busy time averaged about 100Kb/s and ranged between 50 and 400kb/s (kilobits).
The cpu speed is around 3GHz and the memory is 8GB.
So I'm wondering what linux settings I should configure to make the server run at decent speed when it comes to processing a webpage in heavy traffic.
I tried optimizing my tcp settings by increasing read and write buffers.
I also tried upping my apache children (to 66 at once) so users wont have to wait in the backlog forever to be served, but I'm considering dropping that number.
What special linux settings could I use to boost the overall speed of the server and make pages load faster under heavy load?