English 中文(简体)
Memcached Writes Extremely Slow
原标题:
  • 时间:2009-11-20 21:35:03
  •  标签:
  • memcached

I m running memcached on ec2 instances and in some cases am seeing extremely slow writes (10s) for small amounts of data. I m using memcache-client from rails on the client side. Has anyone seen this type of behavior from memcached before?

最佳回答

That memcached client is known to be unnecessarily incredibly slow.

Perhaps trying Evan Weaver s client would give you better results.

问题回答

Not on any hardware I ve ran, however I ve never used it in a virtualized environment. I d recommend checking out the pings between the servers assuming they re on separate instances. I d also try to make sure you re not swapping or otherwise limited on memory.

Which version of memcached are you using? There are many bugs in the 1.2 series fixed in the 1.4 series. Did you configure memcached to use more memory than the EC2 VM has availble? Memcached is kind of pointless when you start swapping.

Instead of doing a "roll your own" memcached EC2, you could try using the Gear6 memcached AMI. It is free (except for the Amazon charges) for the 32bit instance types, and it gives you a nice managment and monitoring interface, so you can get better visibility into these kinds of problems.

What Rails version are you using? The memcache-client that came with Rails 2.1.2 is version 1.5. There are a number of issues that have been resolved with the latest version, 1.7.x.

If you re using frozen Rails, just install the latest memcache-client gem and remove the memcache-client in RAILS_ROOT/vendor/rails/activesupport/lib/active_support/vendor/

Also, are you using cache_fu? I find that cache_fu issues a lot of unnecessary memcache calls. This is especially a problem if you have pages that show multiple records (e.g. search results). My solution to this was to stop using cache_fu and use plain Rails.cache.





相关问题
Memcached Writes Extremely Slow

I m running memcached on ec2 instances and in some cases am seeing extremely slow writes (10s) for small amounts of data. I m using memcache-client from rails on the client side. Has anyone seen ...

can t install memcache php module

i m trying to install memcache module from http://pecl.php.net/package/memcache. Im using xampp in ubuntu (lampp) with php 5.3. After download the extension, I run phpize, make and make install, then ...

sphinx is returning stale results

Environment: Memcached, Rails 2.2.2 + cache_money, Sphinx + thinking sphinx The following yields stale results: - add a record; mysql contains the correct data - the record is probably cached in ...

Pylons and Memcached

Anyone happen to use this combination in their web application? I m having a bit of trouble finding some sort of tutorial or guideline for configuring this. Also seeing as how I started using Pylons ...

Memcached crashing under moderate load

When running memcached, after a few minutes of use it starts throwing the following errors and memcache stops responding. mcm_server_connect_next_avail():2328 I have searched the Google, and it ...

enyim and memcached : NOT_STORED errors

We are using memcached 1.2.4 via enyim and are finding it difficult to get some objects to cache. If I watch the memcache console it just says NOT_STORED . I think we need to use [serializable] but ...

PHP - Memcache - HTML Caching

I would like to create a caching system that will bypass some mechanisms in order to improve the performance. I have some examples: 1-) I have a dynamic PHP page that is updated every hour. The page ...

热门标签