Memory issues

So I moved ONE of my sites from shared hosting to see if I can get more speed. While the speed has been a little better at times, I am now having memory issues. Keep in mind, this site currently has almost no visits (less than 10 PER DAY) and not a lot of content yet.

I am running W3 Total Cache with with Xcache on the Database and Objects. Since I am still in the week trial, I thought let me lower the memory to 300MB to see how it will be next week. First day I am getting e-mails saying I went over the limit.

If I am going over the limit with almost no visits, what happens next week when we go live? Still will not have a ton of volume, but could top a couple hundred visits/day and on the night of our podcast, could be a couple hundred at the same time.

My fear is the amount of memory I will need to not run into problems may be so much that it is too costly. BTW, this same exact site, never had issues on the shared server that I know of, where I thought the amount of ram we were allocated was less than 300MB. If that is not true, why would we be given less ram on the VPS than the shared?

A DH VPS setup is going to cost you - make no mistake about that. 300MB will serve up some static HTML via Apache no worries but dynamic sites definitely need more RAM. You might consider switching to nginx in order to lower memory usage.

OK, can I do this? On show night, I bump the memory up high enough to handle the traffic. Then after the show, I lower it back down to a reasonable level. Given the pre-show, show and post show time, we are only talking 3 hours per week. If the billing is minute or hour based, this would not add a bunch to the cost, but would give me the flexibility to handle known volume spikes.

Yeah, you could do that. I’d “bump” it to the maximum amount available rather than try to guess how much is enough during the show hours. I believe the system still only charges for actual usage rather than how much you have preallocated within settings.

Thanks. That should work then.

It just occurred to me – I was surfing through the forum last night and happened to notice that DreamHost’s own resident WP Guru is using nginx. If she reads this she might be able to offer you advice and a definitively more authoritative account about memory usage running WordPress on nginx here at DreamHost.

I’m really really really new to nginx :wink: Actually right now my site’s on Apache because I was using it to debug Google PageSpeed woes for everyone.

Your CPU and memory are both totally awesome low. On my rather larger site, I have to have my memory set to 800MB just to have a prayer of running (it’s on 1G right now thank you reddit). Memory usage on WP is a funny thing. If you’re using caching, your memory will actually go up, but your CPU will go down. Since our default nginx comes with PHP 5.2 (which is also not the best for memory), I’d actually stay on apache right now with PHP 5.3 and home-brew xcache.

Then I’d set W3TC as follows:

Page Cache: Disk Enhanced
Minify: Enable, Disk, Manual
Browser Cache: Enable
Object Cache: Enable, xcache (or apc, something other than disk)

Page Cache, I usually take the default settings. I have a couple pages I force not to cache, like /wp-content/uploads/, so I can block hotlinkers.

Minify: HTML check everything. JS and CSS I only check ‘enable’ (since I have weird results when I compress and join them, right now it’s off).

Object and Browser Caches are normal/defaults.

I very rarely even consider DB caching, since my sites get enough DB traffic (comments etc) to make it totally worthless. ONE site is, essentially, read only, and that I use it on :slight_smile:

Had our first show this past Tuesday and wasn’t sure how many people would come to the new site (on the VPS) or go to the old site (on shared hosting), so I bumped the memory all the way up to 2000MB. I kept it this way a little before and after the show. Memory never went high enough to even go over my current setting of 500MB so I didn’t need to do that, I think it cost like $0.31 to bump it up so there is not much lost. Being able to bump it up and down so easily really is nice.

Awesome news, Mike :smiley: The ease of memory management on a VPS here is really a selling point to me. I wish I could do that on another host… Ah well.