Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects). It is commonly used as a cache to speed access to frequently used data.

learn more… | top users | synonyms

53
votes
10answers
40k views

memcache vs memcached?

I want to use memcached http://www.danga.com/memcached/ I have installed it through yum install memcached But now I need to connect to PHP, and there is an extension named memcache and one named ...
27
votes
5answers
19k views

Which PHP (opcode) cache one should use and why?

I keep hearing about some PHP (opcode) caches like - APC, XCache, Memcache, eAccelerator, etc. But I couldn't ever figure out how to go about choosing one. Apart from performance benefit, which a ...
21
votes
5answers
19k views

Can a pool of memcache daemons be used to share sessions more efficiently?

We are moving from a 1 webserver setup to a two webserver setup and I need to start sharing PHP sessions between the two load balanced machines. We already have memcached installed (and started) and ...
13
votes
4answers
4k views

How well do nginx and memcached work together?

We have a Java EE-based web application running on a Glassfish app server cluster. The incoming traffic will mainly be RESTful requests for XML-based representations of our application resources, but ...
12
votes
4answers
15k views

how to restart/clear memcache without restarting the whole web server?

/opt/eduserver/eduserver gives me options: Usage: /opt/eduserver/eduserver ...
12
votes
3answers
14k views

How to increase the amount of memory memcache uses?

I am currently on a Xeon 7550 server running Redhat x86_64 es5 with 32gb RAM. I have memcache installed and the only step remaining in the configuration is to set how much memory it uses. I had done ...
12
votes
3answers
2k views

Unexpected(?) high 'wasted' memory in memcached

Updated, see bottom of the longish (sorry) question. Looking at our memcached stats I think I have found an issue I was not aware of before. It seems that we have a strangely high amount of wasted ...
8
votes
4answers
4k views

View content of memcached

Are there any tools to explore what is currently cached inside a memcached pool? Not some much graphs, but the actual key/values currently stored.
7
votes
1answer
29k views

What does “<service_name> dead but subsys locked” mean?

I'm trying to run memcached on a centos box and it runs for a while, but then ends up in this state: memcached dead but subsys locked netstat shows this: tcp 0 0 :::11211 ...
6
votes
3answers
14k views

How to setup Memcached/APC on Ubuntu Server 10.04 for PHP?

I will be soon setting up Simple Machines forum on a fresh Ubuntu Server 10.04 VPS. The forum software is written in PHP. I will using Nginx as the web server, and I will be following a guide to ...
6
votes
1answer
1k views

Having problems with maintaining sessions across multiple Amazon EC2 instances

One of my sites is hosted via Amazon EC2 service. The problem starts happening when the site faces a heavy load which in turn spawns a new EC2 instance via AutoScaling. This is good but the issue is ...
6
votes
1answer
18k views

Failed to connect to memcache host !

I'm totally new to memcached ! I sucessfully Installed and started memcached with this command in my host A (Ip 192.168.1.102) memcached -u memcached -d -m 30 -l 127.0.0.1 -p 11211 I also add these ...
6
votes
2answers
3k views

How to debug memcached “SERVER HAS FAILED AND IS DISABLED UNTIL TIMED RETRY” errors?

I have a two server memcached setup. When memcached write fails, I receive an email notification. About once per day "SERVER HAS FAILED AND IS DISABLED UNTIL TIMED RETRY" error comes and I have no ...
5
votes
3answers
5k views

Memcached memory usage

Is there any command line or php script which returns the memcached total memory usage?
5
votes
2answers
2k views

Add vs Set in Memcached

I don't understand the difference between ADD and SET Any clues? It seems as if ADD includes SET or that ADD returns false if something is there and SET just overwrites. Thanks! EDIT: My specific ...
5
votes
1answer
5k views

How is memcache distributed?

I've got memcache running on 5 web servers all of which are on the host list in php and which are load balanced on the front end. So since memcached is supposed to be distributed the php client will ...
5
votes
1answer
697 views

How do I monitor memcached evictions?

How do I monitor memcached to know if / how many evictions are occurring, and how much memory is used/free.
5
votes
3answers
6k views

Multiple Memcached server /etc/init.d startup script that works?

I install memcached server via source and can get standard start up script installed for 1 memcached server instance, but trying several scripts via google, can't find one that works to manager auto ...
5
votes
3answers
4k views

Nginx & PHP caching: fastcgi_cache, proxy_cache, APC or memcached or combo?

We have webservers running nginx 7.65 along with fastcgi PHP5 and are looking into caching possibilities to speed up content delivery and lower system loads. The servers run different (custom) ...
5
votes
3answers
724 views

Memcached - one big server vs several smaller ones

I am considering whether we should get one big (48 Gb RAM) server or buy 4 smaller (12Gb RAM) servers for running memcached service. In either case I would also have stand-by spares for redundancy, ...
5
votes
3answers
254 views

Memcached Lagging

Let me preface this by saying that this is a followup question to this topic. That was "solved" by switching from Solaris (SmartOS) to Ubuntu for the memcached server. Now we've multiplied load by ...
5
votes
5answers
8k views

Netcat (nc) traditional package for RHEL 6.x?

I'm trying to use the Percona Apache Monitoring [Cacti] Template for Memcached. They do indeed warn that you can't use the openbsd version of the package and provide a solution for Ubuntu/Debian ...
4
votes
1answer
2k views

Confused about caching solution: MemCache, Varnished, mod_cache, else?

I have a very heavy site in my server. The load of the server is always about 30-50 and sometimes it become even 150 and server work really hard. I'm looking for a caching solution that can increase ...
4
votes
3answers
2k views

Yum install php-pecl-memcached - No package found (Have epel-release-6-8.noarch.rpm)

I believed I've downloaded and updated the EPEL rpm but I can't install php-pecl-memcached.. I'm very new to this, any help is appreciated. #rpm -Uvh epel-release-6-8.noarch.rpm warning: ...
4
votes
2answers
108 views

Memcached listen on selected interfaces

I am setting up Memcached on a Debian server that has two interfaces - eth0 (public) and eth1 (private). I want Memcached to listen on both eth1 and lo (loopback) so that it can be accessed even if ...
4
votes
4answers
1k views

Recommended way to pre-warm memcached?

I am currently testing memcached on a system that will be rebooted once a week, and would therefore like to pre-warm memcached after the reboot. Wondering if anyone has a sample script they have ...
4
votes
1answer
8k views

nginx with Memcache Vs Varnish

I was wondering if anyone has any comments / benchmarks / suggestions on Varnish Vs Memcache when used to serve content (usually 2-5kb JS file depending on the parameters in request; thousands of diff ...
4
votes
2answers
491 views

Does Memcached support IPv6

Has anyone used Memcached with IPv6? Can you provide any configuration tips, gotchas, or mention any stability issues you've had?
4
votes
2answers
1k views

Are there any drawbacks to running memcached on a Unix domain socket instead of the network (assuming one server)?

I’m setting up a Django website to use memcached to cache its pages. (The content of each page won’t change very often at all, so I’m hoping that most of the site will be served from memcached most ...
4
votes
1answer
341 views

How does php know what memcached node to look for its data in?

I am new to the world of Memcached clusters If I have a php web application that is using memcache - how does it does its hash and decide what node to check for a particular value to avoid having to ...
4
votes
1answer
393 views

Memcache/Elasticache holding many user passwords in memory instead of DB

I have two servers in AWS. One is a live production server (a multi site WordPress installation with hundreds of sites and about 5,000 users) and the other is a clone of prod that is being configured ...
3
votes
3answers
804 views

Copy MySQL to RAM as a poor man's memcached replacement?

What about this idea: I've got a 4GB MySQL database, with few UPDATEs. On system startup I copy it to RAM and run it from there. Every couple of hours or even on UPDATES, I dump it to disk. ...as ...
3
votes
8answers
2k views

MemCached on Windows x64

This question has previously been asked, but that was a year ago and I wanted to know if there had been any developments since then. Basically we'd like to use a MemCached Server on a Windows Server ...
3
votes
3answers
303 views

What are the speed drawbacks from using multiple servers to serve a website?

I know these questions are hard to answer :) But I want to get some kind of an idea of the impact of separating services onto different servers. Specifically, I am setting up a website that will have ...
3
votes
2answers
5k views

How to set up memcached to use unix socket?

While I could use memcached on Debian to use the default 11211 port, but I've had great difficulty setting up unix socket, Form what I'v read, I know that I need to create a memcache.socket and add ...
3
votes
2answers
14k views

Memcache basic configuration

I have installed memcache for a Drupal site with the memcached pecl extension. It's all running fine but I'm still struggling with the configuration settings. For instance , following advice on ...
3
votes
2answers
2k views

Launch memcached on server boot?

How can I do this? Im running RedHat x86_64 es5. I heard that a cron job is possible, and some other people talk about a script? Note that my linux server knowledge is very limit, so please be ...
3
votes
1answer
518 views

Does a growing number of TIME_WAIT connections affect server performance?

I have 2 servers, both running RHEL 6, one for Apache 2.2 and one for memcached (memcached-1.4.4-3). I noticed an increase in the number of TIME_WAIT connections on the Apache server netstat -n | ...
3
votes
2answers
324 views

Memcached scaling strategy

Currently I am running a production environment with 4 dedicated memcached servers, each of them having 48Gb of RAM (42 dedicated to memcache). Right now they are doing fine, but traffic and content ...
3
votes
1answer
115 views

Save PHP opcache to Memcached

Running on small servers it would make sense offloading these as much as possible for performance. Also offloading will prevent from the server becoming a bottleneck. Therefore I use memcached for ...
3
votes
4answers
2k views

Slow Memcached: Average 10ms memcached `get`

We're using Newrelic to measure our Python/Django application performance. Newrelic is reporting that across our system "Memcached" is taking an average of 12ms to respond to commands. Drilling down ...
3
votes
2answers
3k views

PHP on several servers with session-sharing

there's certanly other threads about this, but I have one more question. We are about to scale the website at work to have more than one server. And we need to share the sessions between the servers. ...
3
votes
1answer
110 views

Nginx with Memcached module

I'm running Wordpress website with "W3 Total cache plugin" for Memcached on Nginx. I know that there is a Nginx module available for Memcached and I'm wondering what's the preferred/recommended method ...
3
votes
2answers
4k views

Configure php5-fpm for many concurrent users

EDIT: Added some configs and a clarification on how many is "many", as requested by anthonysomerset. EDIT 2: Added fastcgi_cache to nginx config, as suggested by SleighBoy. I run a server for a ...
3
votes
2answers
1k views

Multiple AWS EC2 running Auto Scaling and Distributed Memcache

I'm planning to use distributed Memcache across a series of Linux web servers on Amazon EC2. These EC2s currently run auto scaling so will increase and decrease with load. I have used this post to ...
3
votes
1answer
207 views

What is the standard way to deploy memcached?

I have two IIS servers and two MySQL servers. On all servers I have some available memory (More than a GB). What is the standard way to deploy memcached? Should I add a new server especially for ...
3
votes
3answers
85 views

If I make a request to my server's IP address, will it be the same as using 127.0.0.1, or slower?

I have application servers with memcached running on them. What will happen if I make a request to memcached on 10.243.98.5, which just happens to be the originating server? Will it use the same ...
3
votes
1answer
193 views

Does a RewriteCond that checks for the existence of a file cause high IO latency?

I am setting up an apache configuration to check for the existence of a file. If the file exists, then the server will redirect to a maintenance page. If not, the application will get served up ...
3
votes
1answer
152 views

Memcached on same servers as websites

I have a website that runs on 4 loadbalanced servers. These are Windows servers, each with 16 GB of memory. I need to move to a shared cache, so I was thinking of Memcached. However, budgetary reasons ...
3
votes
1answer
346 views

Memcached - one large instance vs many smaller

I will be adding a memcached server to my web app to offload lots of db requests. I'll be mostly caching different small id-name pairs (memberid-membername, blogid-blogname, etc) and expect total ...