# cache-mem-tester **Repository Path**: mirrors_antirez/cache-mem-tester ## Basic Information - **Project Name**: cache-mem-tester - **Description**: Test memory efficiency of Redis / Memcached against values with a given size distribution. - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-08 - **Last Updated**: 2026-02-28 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README This small Ruby program tests the memory efficiency of Redis and Memcached using a given distribution of values sizes, against 400 MB of used memory. It was written because of the following thread in the Redis mailing list: https://groups.google.com/forum/#!topic/redis-db/rmuO_gRWzUs USAGE --- Uncomment test_redis or test_memcache at the end of the memtestr.rb file and execute the program. When testing Redis, just start an instance using port 10000 with: ./redis-server --port 10000 When testing Memcached start the server with: ./memcached -m 400 -M The -M switch is used to tell memcached to return errors when the 400 MB of memory are full instead of start key eviction, this way the program has a simple way to understand the server is full. To test memcached a second time, you have to restart the server. This is not needed for Redis (probably to fix this is trivial, pull requests accepted). CREDITS / CONTRIBUTING --- This software was written by Salvatore Sanfilippo and is released under the two clause BSD license. Send pull requests using Github.