memcached

Enabling memcache on Mac OSX with stock apache and php5

Hello, I cannot for the life of me figure out how I can enable memcache on Mac OSX to work w/ apache. I have installed memcache and can verify that it is working via the php command line. The following command: php --ri memcache reports that memcache is supported. However, if I load a local test script that executes phpinfo() in my...

Good examples of python-memcache (memcached) being used in Python?

I'm writing a web app using Python and the web.py framework, and I need to use memcached throughout. I've been searching the internet trying to find some good documentation on the python-memcached module, but all I could find was this example on the MySQL website, and the documentation on its methods isn't great. ...

Memcached on EC2

Am I right in thinking that until I am able to afford dedicated servers or have any spare servers, I could successfully run a small number of memcached servers through EC2? With the annoucement of the new auto-scaling and load balancing by Amazon today, do you guys think this would be a viable option? And what would be the basic techni...

Drupal site - Memcache Connection errors

We are tying to perf tune our drupal site. We are using Siege to measure performance (as drupal visitor). Env: Nginx + FastCGI+ Memcache Siege runs fine for a few seconds, and then we run into connection errors: Example: HTTP/1.1 200 29.18 secs: 5877 bytes ==> / HTTP/1.1 200 29.39 secs: 5877 bytes ==> / warning: socket: -16562...

What if I want to store a None value in the memcache?

This is specifically related to the Google App Engine Memcache API, but I'm sure it also applies to other Memcache tools. The dictionary .get() method allows you to specify a default value, such as dict.get('key', 'defaultval') This can be useful if it's possible you might want to store None as a value in a dictionary. However, the m...

Do memcache clients of different languages hash the same way?

We would like to some processing in a Java application, store the results in our pool of memcache servers, and read it back using memcache in PHP. This is easy enough to try, but I though I would ask and see if anyone else has done this. As long as both the Java and PHP clients connect to the same pool of memcache servers, will both cl...

Caching Strategies with Paged/Filtered Data

Hi, I am currently thinking about Caching Strategies and more importantly avoiding any duplication of data inside the cache. My query is kind of language agnostic but very much programming related. My question is regarding the efficient caching of paged or filtered data but more than that, distributed caching. The latter I have decid...

Memory usage on Linux systems

Hi there if I run top on a Linux system, I can see a lot of information about memory usage. Mem: 15736360k total, 8415332k used, 7321028k free, 174876k buffers Swap: 0k total, 0k used, 0k free, 2630508k cached I was wondering: What is the "cached" attribute telling me? Seems like this is not being freed...

Improve speed by memory+eval or use regular file

I'm trying to improve the speed of our server but I would like to have your view of that before modifying everything. I have a high read rate on my file system. Right now we are using regular PHP file. I wonder if I can cache these file in Memcache and later do an eval on the code if it will be faster than letting these file get interpr...

Does python-memcache use consistent hashing?

I'm using the python-memcache library, and I'm wondering if anyone knows if consistent hashing is used by that client as of 1.44. ...

Can't get nhibernate config section out though configuration manager.

I'm trying to to setup Memcached 2nd level caching. I've followed what documentation I could find, including downloading the project from SVN and looking at how it is configured in their test project, and ended up with this in my app.config. <configuration> <configSections> <section name="memcache" type="NHibernate.Caches.MemCache...

High-traffic percentage-based set picks?

The setup: High traffic website and a list of image URLs that we want to display. We have one image spot, and each item in the set of image URLs has a target display percentage for the day. Example: Image1 - 10% Image2 - 30% Image3 - 60% Because the traffic amount can vary from day to day, I'm doing the percentages within blocks of 1...

Memcached + batch data loading + replication + load balancing, any existing solutions?

Here is my scenario: A dozen of clients reading from memcached-like store. Read-only access 50K gets/sec 99.999% availability 300 million records, 100 bytes each If one of the stores goes down the system should be able to automatically switch to another replica. When it is time for update the system should be able to quickly reload...

memcached expiration time

Hi, Memcached provides a cache expiration time option, which specifies how long objects are retained in the cache. Assuming all writes are through the cache I fail to understand why one would ever want to remove an object from the cache. In other words, if all write operations update the cache before the DB, then the cache can never con...

What's faster: Memcached or MySQL in memory table like HEAP?

If I have a pretty static set of data that I want to be able to access as quickly as possible. Should I cache the data into Memcached or should I store it in a HEAP table or something inside MySQL? Would one scale better than the other? Is there some other option that's even faster? ...

cache controller response

Hi, I'd like to use memcached to cache the response produced by my controllers. The controllers themselves are Grails controllers, but there's nothing really Grails-specific about the problem. If I could figure out how to solve this problem in a Spring MVC, Struts (or similar) application, I should easily be able to migrate the solution...

Persistent connections to memcached in PHP

In our current use of memcached, we are running into problems in a high volume server because so much time is used setting up and tearing down connections to our memcache server. Would using persistent connections to memcached help alleviate this problem? Also, what is the preferred way to connect and use persistent memcahced connectio...

How can I tell where memcached is storing cached data?

I'm trying to do a performance analysis for an existing client, and I'm having trouble determining whether or not memcached is actually storing data. It looks to be installed and running, but I see nothing in /var/log/memcached.log (on Ubuntu hardy). Can I tell if there are log files elsewhere that would tell me if caching is happening, ...

Is there an option to configure a priority in memcached? (Similiar to Expiry)

A hashtable in memcached will be discarded either when it's Expired or when there's not enough memory and it's choosen to die based on the Least Recently Used algorithm. Can we put a Priority to hint or influence the LRU algorithm? I want to use memcached to store Web Sessions so i can use the cheap round-robin. I need to give Session...

What experience do you have using nginx and memcached to optimize a web site?

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 perhaps 5% of the traffic might be for JSON- or XHTML/CSS-based representations. We're now investigating load-balancing solutions to dist...