How to handle memcached server down???
Hi, I use the .net clients and 2 servers at 2 different machines. When one of the memcached servers is down, I try to set an item to the cache (According the hashing algorithm of the client, this item should stored the inactive server!) and this item get stored at the active server. After I set the item, the second server get back to work. Now if I'll try to get this item I won't succeed, because the client will searche the item at the second server (According the hashing algorithm). What can i do to solve this problem??? (To set the item again at the second server isn't a solution, because I don't want to store any item at 2 servers)
Re: libmemcached size
Thanks, I don't want to use strip, because it will remove the debug symbole. I want the debus symbole as well. Any other way? On Fri, Feb 18, 2011 at 10:07 PM, Roberto Spadim robe...@spadim.com.brwrote: strip 2011/2/18 aa_zz aaliya.zar...@gmail.com: Hi, I am trying to compile libmemcached for my applicaction with Linux The size of the client is quite big compare to server. I want to reduce the size of libmemcached library created after compilation. Can anybody suggest how to do this. I have tried by disabling the few option in configure which are not needed. still facing same problem. Pls suggest if any solution is there for this? Thanks in advance. -- aa_zz -- Roberto Spadim Spadim Technology / SPAEmpresarial -- Thanks Regards, Aaliya Zarrin (+91)-9160665888
total_malloced (slab stat) bytes (general stat)
Hi I'm currently using total_malloced for figuring out available memory in an internal memcached monitoring tool. Is this correct ? I noticed that total_malloced bytes, so I'm getting negative numbers. I'm assuming the memory freed up is not being considered when I use total_malloced ? General Stats: .. STAT bytes_read 45663976040 STAT bytes_written 36016856264 STAT limit_maxbytes 4294967296 STAT accepting_conns 1 STAT listen_disabled_num 0 STAT threads 4 STAT conn_yields 0 STAT bytes 3471623014 . Slab Stats: . STAT 21:incr_hits 0 STAT 21:decr_hits 0 STAT 21:cas_hits 0 STAT 21:cas_badval 0 STAT active_slabs 18 STAT total_malloced 4296279648 thanks kiran
Java PHP communication
I have a php application that reads data continuously from a server through sockets. Now i want to have my own socket server which i plan to write in java. That means some how i should get the data from root server using sockets in PHP and then i should have my own java socket server that sends data to my clients. Now how do i pass data read by the PHP script to the java socket server.
Re: SASL and Python...
I just added this to pylibmc. The pull request is still fresh: https://github.com/lericson/pylibmc/pull/31 On Feb 16, 7:23 am, Sam samsli...@gmail.com wrote: Do any of the Python clients supportSASL? Thanks.
Re: Problems when one of the memcached server down
I couldn't easily find any memcache .net documentation, but a user contributed note on the php memcache doc page says: http://php.net/manual/en/book.memcache.php The memcache changelog for 3.0.5 has the comment: Added method MemcachePool::findServer(key) which returns the server a key hashes to I bring this up because knowing (storing elsewhere) the server storing your key allows to handle the case when your key may no longer exist there and reload it from the database or file. Your client and or your server memcache/d versions may not provide these features. Also read the other thread `Replication ?`
Replication of key-value pairs
Hi, Are the key-value pairs replicated on different nodes or does the pair remain with only on one RAM? Regards, Priya
Load balancing in memcached
Does memcached load balance, i.e., what if most of the keys hash to a particular server, does memcached take some actions to load balance it?
Re: Problems when one of the memcached server down
Hi Lior, On 3/3/11 1:53 PM, Evil Boy 4 Life wrote: Hi, I use the .net clients and 2 servers at 2 different machines. When one of the memcached servers is down, I try to set an item to the cache (According the hashing algoritem of the client, this item should stored the inactive server!) and this item get stored at the active server. After I set the item, the second server get back to work. Now if I'll try to get this item I won't succeed, because the client will searche the item at the second server (According the hashing algoritem). Are you referring to the Enyim client? I believe there's a separate mailing list for that client, but I am not sure. What can i do to solve this problem??? (To set the item again at the second server isn't a solution, because I don't want to store any item at 2 servers) This seems like something more fundamental is wrong, or I miss the question. Keep in mind, having two servers isn't a situation where they are active/inactive, it's a collection of two servers. Each adds to the pool of cache available. It's normal for a given key to hash to one server or another, depending on the key. Are you saying that in a normal, no failures kind of situation, you cannot get and then set the same key? Matt
Re: Load balancing in memcached
On 3/4/11 3:55 AM, Priya wrote: Does memcached load balance, i.e., what if most of the keys hash to a particular server, does memcached take some actions to load balance it? Generally speaking, since responses come from RAM and memcached can pretty easily saturate network interfaces with very low CPU overhead, it's quite rare that the imbalance of a pool/cluster of memcached servers becomes an issue. If you do have this kind of situation, it's best resolved by getting the cache closer to the user. By that, I mean possibly give up a bit of consistency and cache for 1 sec or less in the application and/or get the caching all the way down to the end user (i.e., browser). Hope that helps, Matt
Re: Replication of key-value pairs
On 3/4/11 3:54 AM, Priya wrote: Are the key-value pairs replicated on different nodes or does the pair remain with only on one RAM? With memcached, key/value pairs remain only in one node in RAM. Have a look at the wiki and the list archives for more info. Good luck! Matt
Re: Load balancing in memcached
The memcached server doesn't do anything, it's the job of the client to distribute keys across the servers in a cluster. Having that distribution deterministic, i.e. that any client can figure out on which server a certain key is without communicating with the other clients is a good thing. If you were to alter the distribution runtime based on whatever keys happen to be stored right now, then all clients would have to communicate this somehow, and then you can forget about scaling linearly, and then why are you using memcached in the first place? If your data distributes badly across your cluster, change your keys or your hashing algorithm until you're satisfied. /Henrik On Fri, Mar 4, 2011 at 12:55, Priya priya.seh...@gmail.com wrote: Does memcached load balance, i.e., what if most of the keys hash to a particular server, does memcached take some actions to load balance it?
Re: Is memcached useful in sharing data between instances in cloud?
No, memcached is a cache, not a datastore. When you put some data in memcached your are not guaranteed to be able to retrieve it again. /Henrik Schröder On Fri, Feb 25, 2011 at 11:56, TV Ganesh tvganesh...@gmail.com wrote: Hi, I have a basic question. I need to deploy an application on a public cloud like EC2. Since the cloud creates multiple instances of the application I was wondering how to share data between instances. I was suggested to use memcached. Is ,memcached the right choice for sharing global data between parallel instances in the cloud? Any information will be appreciated. Thanks Ganesh
Re: How to handle memcached server down???
This is not a problem, this is the way that memcache is designed. When your formerly failed memcached server comes back up and you request the item from it, it will miss. Ideally this is when you go recalculate whatever the value is and you then set it in the 'proper' cache. Also, consider that when your 2nd memcached server is down, you'll put into the 1st server on its first miss, but any subsequent requests (until the 2nd comes back up) are getting served appropriately by the first. After the second server comes back up, over time the 'duplicate' on the first server will be purged from memory because it will end up as Least-Recently-Used data. - Nelz On Fri, Mar 4, 2011 at 03:46, Evil Boy 4 Life lior.m...@gmail.com wrote: Hi, I use the .net clients and 2 servers at 2 different machines. When one of the memcached servers is down, I try to set an item to the cache (According the hashing algorithm of the client, this item should stored the inactive server!) and this item get stored at the active server. After I set the item, the second server get back to work. Now if I'll try to get this item I won't succeed, because the client will searche the item at the second server (According the hashing algorithm). What can i do to solve this problem??? (To set the item again at the second server isn't a solution, because I don't want to store any item at 2 servers)
Open Source Projects using Memcache?
Anyone know of any open source projects (preferably in php) which use memcache at its core, or that is greatly accelerated with it? I've got some ideas for speeding up memcache and reducing network traffic and am in need of some app to stress. I'd be great if I had a running site with actual usage data, but without it I'm forced to simulate. More specifically, changes to the client, not memcached itself. Yes, Drupal does have a memcache module, but from my own investigation it doesn't speed up, if at all. Thanks for your insights!
Re: Open Source Projects using Memcache?
Not php, but subversion server uses memcached for some internal FSFS caching. On Mon, Mar 7, 2011 at 7:29 PM, Fuzzpault fuzzpa...@gmail.com wrote: Anyone know of any open source projects (preferably in php) which use memcache at its core, or that is greatly accelerated with it? I've got some ideas for speeding up memcache and reducing network traffic and am in need of some app to stress. I'd be great if I had a running site with actual usage data, but without it I'm forced to simulate. More specifically, changes to the client, not memcached itself. Yes, Drupal does have a memcache module, but from my own investigation it doesn't speed up, if at all. Thanks for your insights!