0

I have set up my Magento hosting on Azure. I have 1 VM with 2 cores ( each of 2.14 GhZ), 3.6 GM RAM hosting apache and PHP code. Redis is set up as well.

Initially, this VM was hosting the SQL database as well, but after facing issues handling traffic, I moved my SQL database to a separate VM ( 1 core - 0.75 GB RAM).

I used this load testing online software - https://app.loadimpact.com

I simulated 50 VUs (gradually increasing from 1 to 50 within a minute).

I noticed that the load on the DB server never crossed 0.5

Meanwhile, the load on the apache + php server looked something like below -

Load average

For those unable to see clearly, the load average numbers are 48.27 23.75 12.81

This is just with 50 Virtual Users on the site.

Please advise how I should tackle this.

1
  • also not sure how swap memory is managed on this VM
    – MagenX
    May 4, 2016 at 9:32

2 Answers 2

0

do you realize that you have only 2 virtual cpu core on a probably "castrated" VM (limited hardware resources access)? you will get the same no matter what you replace, nginx, varnish, super duper awesome magento cache plugin...

the only thing will help you (one or all of these):

install and configure HHVM.
or increase CPU to 4 or 8.
or add another VM to spread your traffic.

maybe if you add Varnish after first and second options it will help even more.

the only way to get more traffic and transactions.
you can't cheat the system.

2
  • Thanks @MagenX. When you say increase CPU to 4 or 8, do you mean that I should increase the number of cores to 4 (total RAM - 7 GB) / 8 (total RAM - 14 GB)? Another advice I got is that I should set the max connections in centos configuration. I see that currently I have no settings corresponding to max connections, MinSpareServers, MaxRequestsPerChild etc. Could that be one of the reasons for the problem too ? May 6, 2016 at 7:27
  • if you are going to get more traffic then the server needs to be bigger. or just run what you have but only add cache.
    – MagenX
    May 6, 2016 at 7:40
-1

You can always solve such issue with the Apache configuration, but that's need a server admin to handle that. But before you start the server party, you need to check if there is anything on the site itself. So you can turn the log on and the Profiler to see if there is any error or anything is not working well. Indeed, you can install AOE Profiler, which allow you to track the time of every function you used, you may see this article about it. And from there you can see the issues you have in the site development and fix it.

And after that, I advise you to use NGinX Technologies instead of the Apache. We were facing this problem actually and we moved our site to another hosting which are using this NGinX with AWS service too. And that make the site load from 8-10 sec to 1.5-2 sec. So I just provide you with my experience here, with my company store, and how we fix it. So at the end you are the one who should see what will fit for your business.

I hope you will solve your issue.

1
  • there is no issues with SPEED, but the server capacity in the first place, as you can see CPU and memory consumption per process is normal, but too many processes are running.
    – MagenX
    May 4, 2016 at 9:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.