Hello! Is it possible to reduce server response time on shared hosting? For the test, a simple php script is made that selects (select) data from a table of 50,000 rows. Nothing is displayed on the page, just a call to the database and an alert that the script is executed. The response time of this page is ~ 350 ms. On another shared hosting exactly the same script, the same base and table, time - ~ 80 ms. It is interesting that hosting where the response time is large is the most expensive common fare, and that hosting where the response time is small is the standard inexpensive sharing. I understand correctly that the matter is in the speed of MySQL? Is there any way to increase the speed of response and where to start? Thanks for answers!
1 answer
Obviously, another hosting provider simply has better hardware or server load from clients for less resources. Maybe his drives are SSD (which have IOPS at times superior to conventional hard drives) or processors are more powerful, and the RAM is given more under the base. Of course, it may still be the case in the correct settings of the MySQL engine, but the more obvious option is still the hardware. MySQL itself has nothing to do with it, it works on what they give it and the difference even in several versions (if it is certainly not a difference of 5 years in the databases) does not give a noticeable performance boost, as SSD can give.
Standard methods can only try to change the database settings (increase any buffers), but this is hardly possible on shared hosting.
Want more performance rent a VPS or dedicated server. There you will get complete freedom of action in the setting.
- oneIt is also worth adding that on shared hosting, often several accounts share the same MySQL instance, accessing their databases and neighbors can simply create a rather serious burden. Therefore, +1 to VPS, shared-hosting is a roulette. - cheops