homepage Welcome to WebmasterWorld Guest from 54.161.246.212
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / WordPress
Forum Library, Charter, Moderators: lorax & rogerd

WordPress Forum

    
How does memcached work? (details inside)
Quser



 
Msg#: 4689017 posted 3:27 pm on Jul 18, 2014 (gmt 0)

As I understand memcached should cache stuff to virtual/physical memory. I've a Wordpress installation with W3TC installed, and my server is capable of using either Disk or Memcached, so I went for Memcached.

When I check the memory usage in cPanel, it's on 0 (physical's on ~100Mb). When I try to load the site, memory usage jumps to 100-300Mb (different values for both types of memory, but they are both at ~300Mb). CPU usage jumps to 100%. It stays like that for a few minutes.

So how does memcached work then? It doesn't make sense to me. Would I be better off using Disk cache instead? The site's utterly slow too, unless I'm reloading it or revisiting pages I've already visited - then it's lightning-fast. Disk cache however, seems slow-ish too in general...

What am I supposed to do? Is there a way of "fixing" this, if there is something to fix in the first place of course?

Any info or insight is appreciated,

Thanks!

 

penders

WebmasterWorld Senior Member penders us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



 
Msg#: 4689017 posted 11:13 pm on Jul 18, 2014 (gmt 0)

The site's utterly slow too


How slow?

Quser



 
Msg#: 4689017 posted 2:43 am on Jul 19, 2014 (gmt 0)

The previously-unloaded pages sometimes load for 20, 30, 40s, sometimes even time out altogether. Admin pages always load for at least half a minute, any admin page.

penders

WebmasterWorld Senior Member penders us a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



 
Msg#: 4689017 posted 12:57 pm on Jul 19, 2014 (gmt 0)

TBH if pages are taking more than 20s (and sometimes timeout!) then you need to look at more than just caching in my opinion - unless your site intentionally does something devilishly complex in order to generate pages?

I realise this isn't your main question, but unless you are doing something specific on your site then it sounds more like a rogue plugin or something is perhaps consuming all your resources?

...memory usage jumps to 100-300Mb


This looks excessive for a "standard" WordPress site. Many shared hosting accounts have memory limits as low as 64MB on which WordPress would normally run OK.

not2easy

WebmasterWorld Administrator 5+ Year Member Top Contributors Of The Month



 
Msg#: 4689017 posted 2:41 pm on Jul 19, 2014 (gmt 0)

By any chance does this install incorporate "JetPack"? It is a prime suspect for this kind of issue. It is a standard plugin on WP.com sites and is also added using some "one button install" options at hosts. It's finicky to remove, but it is known to cause problems like this. If you have JetPack, search for "remove JetPack" because a few people have documented all the steps.

Quser



 
Msg#: 4689017 posted 5:05 pm on Jul 19, 2014 (gmt 0)

TBH if pages are taking more than 20s (and sometimes timeout!) then you need to look at more than just caching in my opinion - unless your site intentionally does something devilishly complex in order to generate pages?

I realise this isn't your main question, but unless you are doing something specific on your site then it sounds more like a rogue plugin or something is perhaps consuming all your resources?

...memory usage jumps to 100-300Mb


This looks excessive for a "standard" WordPress site. Many shared hosting accounts have memory limits as low as 64MB on which WordPress would normally run OK.


If I turn off caching though, pages don't take that long to load, so the problem is caching.

Although yes, I am using a bunch of plugins, though none that aren't necessary. Well, except collecting stats (like Jetpack as mentioned below) aren't necessary.

By any chance does this install incorporate "JetPack"? It is a prime suspect for this kind of issue. It is a standard plugin on WP.com sites and is also added using some "one button install" options at hosts. It's finicky to remove, but it is known to cause problems like this. If you have JetPack, search for "remove JetPack" because a few people have documented all the steps.


Is there any decent alternative that I could use as a substitute for Jetpack's Enhanced Distribution, Spelling and Grammar and Stats? When it comes to stats, Google Analytics doesn't seem to provide as much depth as Jetpack's stats system, though let's not forget the other two things.

not2easy

WebmasterWorld Administrator 5+ Year Member Top Contributors Of The Month



 
Msg#: 4689017 posted 6:03 pm on Jul 19, 2014 (gmt 0)

It depends on what browser you use, but most browsers today offer spell-checking. Grammar not so much.

Caching WP pages is not as useful as setting up gzip and E-tags or Expires for the domain. That makes your pages load faster because the visitors' browsers cache your theme elements like css, .js and background images. Google offers some excellent resources in their Page Speed articles: [code.google.com...]

Quser



 
Msg#: 4689017 posted 7:20 pm on Jul 19, 2014 (gmt 0)

It depends on what browser you use, but most browsers today offer spell-checking. Grammar not so much.

Caching WP pages is not as useful as setting up gzip and E-tags or Expires for the domain. That makes your pages load faster because the visitors' browsers cache your theme elements like css, .js and background images. Google offers some excellent resources in their Page Speed articles: [code.google.com...]


Thanks, that was helpful and I feel good after having removed something (you know that feeling when you clean up?), as I removed Jetpack. Unfortunately it didn't change the page loading speed, though. I removed everything associated with Jetpack.

Planet13

WebmasterWorld Senior Member planet13 us a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



 
Msg#: 4689017 posted 8:17 pm on Jul 19, 2014 (gmt 0)

Well, it may be that you have to turn off ALL your plugins and then turn them back on one-by-one until you can figure out if one (or more) is causing you a problem.

not2easy

WebmasterWorld Administrator 5+ Year Member Top Contributors Of The Month



 
Msg#: 4689017 posted 9:11 pm on Jul 19, 2014 (gmt 0)

Jetpack has hidden folders, that is why I suggested you look for the steps that are posted online around the topic. It creates an extra .htaccess file somewhere too, but I don't recall all the dirty details of removing it, sorry.

getcooking

5+ Year Member



 
Msg#: 4689017 posted 2:17 pm on Jul 20, 2014 (gmt 0)

I use memcached on a wordpress site with W3TC and have no slowdowns at all. And in fact it actually did what it is supposed to do and improved pageloads. My guess would be that either there is a conflict with another plugin as others have suggested or perhaps your memcached setup needs adjusting on the server itself. I don't know much about those settings unfortunately (I let our webhost handle that) but I do know that the amount of memory you allocate to each pool can be adjusted (so maybe it's too low?).

ergophobe

WebmasterWorld Administrator ergophobe us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4689017 posted 4:27 pm on Jul 23, 2014 (gmt 0)

Are you memory constrained on that system? Maybe if you're dumping too much into memcache, you're forcing other things into virtual memory and you're doing a lot of reading and writing to virtual memory.

Log into the shell and watch memory usage and I/O performance.

Or possibly your allocation for memcache is too small and so it's constantly switching in and out of the cache.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / WordPress
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved