Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Quick questions about saving cache to disk vs memory(memcached)
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Quick questions about saving cache to disk vs memory(memcached)

GM2015GM2015 Member
edited September 2015 in Help

So I've got this lowendtraffic wordpress site and I've wondered which is faster, saving all caches to disk or to memory using memcached? I'm using w3tc caching plugin and I've managed to cut the http calls on my site from 15 to 8. It loads around 0.3 - 1.1 sec around the globe according to pingdom.

Disk is your typical Digitalocean ssd disk, while memcached is freshly installed using serverpilot's articles.

Just wondering cause my ram usage went up going with memcached.

Anyone with insightful comments?

Thanked by 1Hassan

Comments

  • memcached is equiv to a ramdisk with more abilities. it stores in memory so ram will always be higher. Same on redis.

    memcached <= ramdisk < ssd < regular disk.

    Thanked by 1GM2015
  • @pcfreak30 said:
    memcached is equiv to a ramdisk with more abilities. it stores in memory so ram will always be higher. Same on redis.

    memcached <= ramdisk < ssd < regular disk.

    If only you replace all the < with > symbols... (:

  • HassanHassan Member, Patron Provider

    @GM2015 said:
    So I've got this lowendtraffic wordpress site and I've wondered which is faster, saving all caches to disk or to memory using memcached? I'm using w3tc caching plugin and I've managed to cut the http calls on my site from 15 to 8. It loads around 0.3 - 1.1 sec around the globe according to pingdom.

    Disk is your typical Digitalocean ssd disk, while memcached is freshly installed using serverpilot's articles.

    Just wondering cause my ram usage went up going with memcached.

    Anyone with insightful comments?

    Memcached will definitely bring your RAM usage up since it is literally storing your cache in the memory. I've had really good experience using Memcached with both Wordpress and Magento.

    I strongly recommend setting up Memcache using an internal sockets instead of having it facing the internet on the default port without authentication. Take a look at this article: http://blog.binaryedge.io/2015/08/10/data-technologies-and-security-part-1/

  • Hi Hassan

    These are the two articles I've used when I've installed memcached for my wp site:
    https://serverpilot.io/community/articles/how-to-install-memcached.html
    https://serverpilot.io/community/articles/how-to-install-the-php-memcache-extension.html

    I'm running php5.6 as serverpilot's 7.0 version was too bugged for me. Thanks for your link.

    Hassan said: Memcached will definitely bring your RAM usage up since it is literally storing your cache in the memory. I've had really good experience using Memcached with both Wordpress and Magento.

    I strongly recommend setting up Memcache using an internal sockets instead of having it facing the internet on the default port without authentication. Take a look at this article: http://blog.binaryedge.io/2015/08/10/data-technologies-and-security-part-1/

  • @Nomad said:
    If only you replace all the < with > symbols... (:

    Don't follow.

  • DavidxDavidx Member
    edited September 2015

    @pcfreak30 said:
    Don't follow.

    How you used your symbols was incorrect.

    SSD > Regular disk means that SSD is greater than a regular disk, however
    SSD < Regular disk means that SSD it is lesser than a regular disk.

  • perennateperennate Member, Host Rep
    edited September 2015

    David_P said: SSD > Regular disk means that SSD is greater than a regular disk, however SSD < Regular disk means that SSD it is lesser than a regular disk.

    The hell? It wasn't a freaking math equation. Maybe he or she was talking about the relative latencies; anyway who cares.

    Thanked by 1Dazzle
  • @perennate said:
    The hell? It wasn't a freaking math equation. Maybe he or she was talking about the relative latencies; anyway who cares.

    It was a play on programming logic and its a HE BTW.

    And I was thinking a < b as in greatest to least so depends on perspective :)

    Thanked by 1Davidx
  • I run a ton of Wordpress sites that have a lot of images and I ended up going with a LEMP Stack and Supercache with the default mod_rewrite option selected and used wordpress.org's Supercache nginx rewrites...everything is REALLY fast with minimal memory usage because it's all served through the static pages Supercache creates so php-fpm children aren't even spawned unless I'm using wp-admin. I did a lot of benchmarking with loader.io on all kinds of different setups for Wordpress and I found that Supercache with those settings worked out the best for me and my Wordpress installs.

  • What's your load time?

    I've dos-ed my site with Xenu, lol, and crawling the site with about 300-1000 threads from Xenu, my site becomes unresponsive and times out.

    CPU usage goes to 100% and memory usage increases by 100MB or 200MB.

    The first time I did it on php7.0, php crashed and the whole stack needed restarting.

    But after reverting back to 5.6, the stack remained stable with timing out issues.

    What theme you're using? I'm using a minimalist theme and it's great.

    sin said: I run a ton of Wordpress sites that have a lot of images and I ended up going with a LEMP Stack and Supercache with the default mod_rewrite option selected and used wordpress.org's Supercache nginx rewrites...everything is REALLY fast with minimal memory usage because it's all served through the static pages Supercache creates so php-fpm children aren't even spawned unless I'm using wp-admin. I did a lot of benchmarking with loader.io on all kinds of different setups for Wordpress and I found that Supercache with those settings worked out the best for me and my Wordpress installs.

  • Your kernel is brave. if there is extra RAM it will cache the most needed files.

    It works quite well and make caching on disk as efficient as caching in RAM as most accessed files will be cached in RAM.

    If you have enough extra ram, don't worry as long as you have static caching things will be pretty fast.

  • @perennate said:
    anyway who cares.

    Obviously you do.. no need to be a dick about it. I was just explaining how those symbols are 'usually' used as he said he didn't follow regarding a previous comment.

Sign In or Register to comment.