Object Caching 302 MB

I have an object (actually an array of objects) that is 302 MB. When I try to cache it with memcached, it does not work, no matter how much memory I pass memcached, apparently because memcached has a 1 MB limit on objects that it can cache. (Perhaps I am mistaken in this last part. I was not able to find excellent documentation.)

Any suggestions on how to cache this thing? I am using PHP / symfony on Linux.

+5
source share
4 answers

Quote

15.5.5.4: What is the maximum size of an object that you can store in memcache, and is it configurable?

- 1 . memcached 1.4.2 , -I.

, , memcached. POWER_BLOCK slabs.c .

memcached 1.4.2 -I . , 5 :

 $ memcached -I 5m

. , .

1 ?

: - , .

: Memcached ( / ...), . , .

, - 400 , - 1 , - 1,20:

1 - 400 2 - 480 3 - 576 ... ..

, . , , . Memcached , .

, ... -, / , , , , - . , , , .

1 , memcached slabs.c: POWER_BLOCK malloc/free. , MogileFS ..

+12

, [/etc/memcached.conf], :

# Increase limit 
-I 512M

.

+1

, ( ) RAM-.

- -?

I still join the others when they say that you probably need a different approach. Try to explain what data you want to cache.

0
source

There is no way for you to need a 302Mb instance of an object (or an array of objects) that will be cached.

Without seeing the code, I can’t suggest how ... but there should be a good way to refactor it so that you perform caching on a smaller scale.

-1
source

All Articles