5

Before jumping into the question let me give details about my site.

  • I have a blog that is a coding blog so I have tutorials and code samples on it.
  • I am running WordPress self-hosted as my platform.
  • I have some of the popular plugins such as Yoast SEO,contact form 7,Google Analytics to name a few.

I have the following Godaddy hosting plan (Delux plan with added resources)

  • 1gb ram
  • 2 Cpu
  • 1024 i/o
  • 125 Entry process

The site is less than 1000 visits per day.

Yet I find that It runs out of resources.

How can this be possible?

4

This can be due to a wide range of factors including the number of plugins that you are running. Some factors that need to be taken into consideration are...

  • Is Caching Enabled
  • How Many Images Are Being Served
  • Is the Output GZiped

Basically everything that wordpress is doing will consume memory for each request. In addition to that WordPress does not scale well without some sort of caching plugin such as W3 Total Cache and WP Super Cache. Any WordPress installation should make use of some sort of caching plugin as this will esentially minimize the dynamic PHP compilation and SQL hits for each request made and instead serve cached copies of the content.

Without having access to the command line of your server to see what is consuming the most memory anyone here is only going to be able to give you reasonable guesses but the first steps would be to take the actions above.

As a side note when working with shared hosting providers I tend to calculate the average PHP application as 2MB of memory per session due to all of the added modules that many shared providers enable within Apache.

Further after checking the GoDaddy help page I found that the number of simultaneous connections is the entry process count (haven't encountered that before with other providers). You don't indicate which resource you are running out of so if it is the entry process resource you are maxing out then the only solution would be to either change to an alternate provider who doesn't apply that sort of resource limit, or to increase the number of entry processes your account can support. Additionally CRON jobs and SSH sessions count towards the entry process count as well. The entry process you provided of 125 seems unusually low for GoDaddy as they advise their delux plan has at least 300 entry processes included and in the next plan up of premium, unlimited, and ultimate, that count goes up to 600.

Try checking these out first and if none of these are the reduced resources please advise of which specific resource is being maxed out and I will post an update.

4

RAM usage by Linux

Linux will generally eat a lot of RAM to avoid disk caching (swap file) and does not indicate that anything is wrong if you have little to no ram free. You should only consider it a problem when you have no free memory and your Linux OS is using the swap file.

Linux Swap File

Disk Swap caching should be avoided as much as possible since SQL queries that occur on disk are much slower and cause the system to start queuing requests, this increases CPU usage and IO read/writes.

It's a common question by Webmasters do I need more RAM or CPU? the answer is neither one or another, and varies from site to site depending on the processes, if they are more SQL based, or CPU based. SQL will hit both CPU and RAM, but if the SQL is cached, it does not hit the CPU as much since its processed fast and then goes on another. In most cases, more ram will cure the resources issue.

If your server is using the swap space then you need to increase RAM. Most sites will generally need more RAM than they need CPU, so you could always reduce to 1 core and increase the RAM. Personally, given the choice I would choose 1 CPU core 1.5GB RAM over 2 CPU cores, 1GB RAM.

Vanish HTTP Cache

SOURCE

Varnish is an HTTP accelerator designed for content-heavy dynamic web sites as well as heavily consumed APIs. In contrast to other web accelerators, such as Squid, which began life as a client-side cache, or Apache and nginx, which are primarily origin servers, Varnish was designed as an HTTP accelerator. Varnish is focused exclusively on HTTP, unlike other proxy servers that often support FTP, SMTP and other network protocols.

Varnish is used by high-profile, high-traffic websites including Wikipedia, online newspaper sites such as The New York Times, The Guardian, The Hindu, Corriere della Sera, social media and content sites such as Facebook, Twitter, Vimeo, and Tumblr. Of the Top 10K sites in the web, around a tenth use the software.

A lot of 'GOOD' Hosting companies such as GANDI use Vanish, its incredibly fast and has been known to speed up sites by 100-1000x faster.

Content Delivery Network

You can also reduce the amount of fetches by using a CDN network, they are very affordable and will help you reduce server load but also... help you speed your site up since they will load the nearest file to the location of your visitor. Google rewards for fast sites and I recommend Cloudflare and similar services.

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.