Slow site on VPN 49/100

My site is being hosted at HostGator and I'm not impressed with the speed. Am I doing something wrong?



This same site was getting a speed score of 78/100 when it was at Godaddy on a shared server.



Now I'm sitting at 49/100 !!



CPU- 1.13GHZ

RAM- 768MB





http://gtmetrix.com/reports/www.derbysmack.com/hTC0Sj1T

[quote name=‘nathand’ timestamp=‘1352852460’ post=‘149105’]

My site is being hosted at HostGator and I’m not impressed with the speed. Am I doing something wrong?



This same site was getting a speed score of 78/100 when it was at Godaddy on a shared server.



Now I’m sitting at 49/100 !!



CPU- 1.13GHZ

RAM- 768MB





[url=“http://gtmetrix.com/reports/www.derbysmack.com/hTC0Sj1T”]http://gtmetrix.com/...ck.com/hTC0Sj1T[/url]

[/quote]



Nathand,



I have ran sites on Hostgators mid level VPS plans with no speed problems what so ever.



Just a quick observation, however, for starters you absolutely must get Gzip activated on your site! You can request Hostgator do this, or can do it yourself if on a vps plan. ;-)

I spent the day on the phone with HostGator trying to get GZIP activated. Every time they did it, the changes would not stick.



Is it disabled again?



------------------



Looking at the phpinfo.php, it says its active.



HTTP_ACCEPT_ENCODING gzip,deflate,sdch

_SERVER[“HTTP_ACCEPT_ENCODING”] gzip,deflate,sdch

_ENV[“HTTP_ACCEPT_ENCODING”] gzip,deflate,sdch



zip

Zip enabled Extension Version $Id: 75f98b591f6e5b656786b38e42f0ca759a8eca80 $ Zip version 1.11.0 Libzip version 0.10.1



zlib

ZLib Support enabled Stream Wrapper support compress.zlib:// Stream Filter support zlib.inflate, zlib.deflate Compiled Version 1.2.3 Linked Version 1.2.3

Directive Local Value Master Value zlib.output_compression Off Off zlib.output_compression_level -1 -1 zlib.output_handler no value no value

[quote name='nathand' timestamp='1352856060' post='149110']

zlib

ZLib Support enabled Stream Wrapper support compress.zlib:// Stream Filter support zlib.inflate, zlib.deflate Compiled Version 1.2.3 Linked Version 1.2.3

Directive Local Value Master Value zlib.output_compression [color=#ff0000]Off Off[/color] zlib.output_compression_level -1 -1 zlib.output_handler no value no value

[/quote]



Just because you have a low score does not necessarily mean you have a slow site.

You will also need to configure browser caching, which will also improve your scores. This can be done either in server config or htaccess files, you will also need to do same for gzip.



Most hosts just install pre-defined image so the server will not be fully configured or optimized for your requirements. You can also end up with a lot of unused software/servers running consuming vital resources, and exposing more potential security holes. If you running just CS-Cart, or wordpress, and email then you would only require:



Web Server - Apache or NGinx with PHP support (Module or FPM)

Database Server - MySQL

Mail Server

Depending on the number of simultaneous users you have, 768MB of RAM could be pretty low. Remember that for every page read there are a minimum of 3 PHP processes spawned to service the request (standard release configuration and up to 6-8 depending on site configuration). If your site has a lot of AJAX activity then the number of PHP processes per page will go up proportionately. If you have had to increase the distributed memory_limit in config.local.php above the standard 48M then you are probably running out of memory. Note also that the LINUX kernel and all the unique processes associated with your VPS also use the memory allocated to your VPS. So you might only have on the order of 200MB out of your 768 available to PHP processes. You can have your server administrator run a 'vmstat' for a while at 5 second intervals to get a picture of the memory usage of your VPS.

Some of the extra php processes do tend to have lower overhead and as such execute in quite a short time. For image verification on send_to_friend for example this have a typical execution time of around 30ms (based on 768Mb RAM XEN VPS). If using a PHP process manager then once this code has executed and responded to the request it is free to carry out another request. If your store is relatively small and does not have too many product variations then a small quality VPS will cope / depending on your number of concurrent users (this usually means having many users requesting same pages within a given time period e.g. 2seconds). A lot of how well a server performs will depend on how well it is configured, although you can still reach a limit on number of concurrent users.



If you want to try and get some idea of performance then you could try running concurrency tests on a category and product page.