Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

increase item max size in memcached?

Tags:

memcached

i am using memcached on my centos server , my project is large and has objects more than 1MB which i need to save to memcached , well , i can't ! because the max_item_size is 1MB , anyway to edit that ?

Thank you

like image 505
Rami Dabain Avatar asked Jan 25 '11 15:01

Rami Dabain


People also ask

What's the maximum limit on key size in memcached?

Limitations. There are four key limitations in memcached to keep in mind: The key used is a string with a maximum length of 250 bytes. The value has a 1 megabyte size limit, which can be increased with the –I parameter.

What happens when memcached is full?

First, when memcached gets full, it will start removing items from the cache using the Least Recently Used algorithm. Second, you can have multiple instances of memcached running, adding them gets complicated because it will change the hashing algorithm used to determine which cache the data is in.

How much RAM does memcached use?

Set the amount of memory allocated to memcached for object storage. Default is 64MB. To increase the amount of memory allocated for the cache, use the -m option to specify the amount of RAM to be allocated (in megabytes).

What is the difference between Memcache and Memcached?

They both have very basic difference while storing value. Memcache mostly considers every value as string whereas Memcached stores it value's original type.


1 Answers

You can change the limit quickly by edit the configuration file [/etc/memcached.conf] adding:

# Increase limit 
-I 128M

Or if you have trouble with SO config run it with command line directly

memcached -I 128M
like image 183
onalbi Avatar answered Sep 22 '22 11:09

onalbi