What is the best server configuration for online stores?
I am new in the community and this is my first topic and i want to thanks in advance to all users that will help me.
I came from shared hosting and i am a totally newbie working with VPS
I need to know what is the best solution to host several online stores with a fast and stable server.
The onlines store will be exclusively from Prestashop platform.
Currently i have the start Linode plan in order to test and see if i can achieve a fast and stable server
For the moment i don't have any public store to host with thousands of visit per day, but i hope that i will have in the near future.
For test proposes i will have one online store with about 40000 products and 80000 pictures ore more. Normally the online store will not show more than 20 products per page.
I will want a server that can load the online store with many pictures and scripts in about 2 seconds!!!
Feel free to ask for more information, if you need to help me with the best server configuration
10 Replies
I wouldn't start worrying about performance until you start to have 1000s of requests every 10-20 mins. Before you get there buy some professional help. You should be able to afford it then.
Your response time of 2 seconds is going to be affected by html/css layout more than any aspect of server configuration.
To help keep the number of simultaneous connections under control, you'll also want to disable keepalives, or at least set it to only one or two seconds (low enough to prevent clients from hogging idle connections, but high enough to allow a client to work through a queue without reconnecting).
The alternative is to move Apache to mpmworker, which also requires you to set up PHP in a different way (instead of modphp). This gets a bit more technical, though, so for a user starting out, tweaking the defaults is a much easier approach (since you just have to change one or two numbers in the config file and that's it).
Another thing is to make sure you configure MySQL appropriately for the amount of RAM you have. This is pretty easy, because there are a bunch of pre-made config files you can start with. The files you're probably interested in are my-medium.cnf or my-large.cnf (look at the header of the files for descriptions about how much RAM they are appropriate for). I think they're somewhere in /usr/share/doc/mysql-server-5.0/examples/ or something like that. You would replace the existing config file with one of those. They're a pretty decent starting point. I'd say use my-medium if you have 512MB of RAM, and my-large if you have 1024MB or more RAM.
My problem now is not the space that photos will use in this online store that i will use, only for testing purposes, but for information it will be about 1.5GB .
You must horry with performance from the begin, because customers like fast shops, not slow shops.
Think by yourself… do you like to browse a slow site? if you have to choose from 2 sites to buy the same product, with the same price you will choose the faster one or the slow one?
The code is important, but the server is also very important… for example some people says that nginx is must more faster then apache. If you have a server with ssd disks it will be much more faster
@guzpaz
I will try to follow what you said, can you point me any good tutorial for install and optimize apache server with php, mysql and phpmyadmin for low memory… currently i only have 512MB.
Thank for both of you for the reply's
Next days i will try that programs…
Thanks for your advice and suggestion
It basically just runs a variety of image optimization tools on your image to losslessly reduce their size. It's convenient because it does it all for you.
@obs
Many thanks for your tips regarding script and images optimization.
You have point me some tools that i haven't tested yet
I am a junior developer in the beginning and Moderator from Prestashop since 1999, so have some experience with the script and is optimization.
What i want now is to make a very well optimized server for Prestashop stores only.
I prefer that the reply don't go out from the topic title, that is try to find the best server configuration to run online stores.
Beside this if anybody can point also specific optimizations for a specific server configuration to Prestashop online stores, this will be very nice
Best Regards,
1. On static resources set the expires header to something long (if you're using nginx you can use expires max;)
2. Enable GZIP compression
3. If you use nginx you can use the fastcgi cache options to cache copies of your pages reducing how many pages hit your php back end
4. If you're using apache and mpm worker turn keep alives off lower your max clients 10's probably a good start for a Linode 512 but your mileage may vary.
5. Run mysqltuner.pl perodically to keep an eye on your MySQL server i.e. query cache size.
6. Use innodb if you can for your database tables it recovers from crashes must better than myisam.
7. Document what you do, at some point in the future you'll need it and the odds are you'll forget what you did
8. Have a solid backup system you test regularly
But unfortunately i will say goodbye to Linode…
Thanks for all of you that have try to help me.
Best Regards