Rock Store: suggestions on object size restriction to Ipc::Mem::pageSize()

From: Alexander Komyagin <komyagin_at_altell.ru>
Date: Fri, 20 Jul 2012 18:28:11 +0400

Hi! I've taken a look at the code related to object caching and found
out only two places where this restriction (hard coded to 32K) is
actually applied:

1) DiscIO/IpcIoFile.cc: when Squid worker pushes an i/o request to
disker via IpcIoFile::push() and disker handles that request with
DiskerHandleRequest(). IpcIoMsg object contains the memory page for i/o.
Before and after i/o plain byte arrays are used for data storage.

So why not to use an array of pages for i/o here instead of one single
page?
We know the exact object size here so we can easily calculate the number
of pages needed to load/store and object.

2) Shared memory (MemStore, shm): Squid stores a map 'store_key -
MemStoreMap::Extras', where MemStoreMap::Extras contains a memory page
with stored data. Just like with IPC I/O, we could use an array of pages
here and adapt MemStore::copyToShm() and MemStore::copyFromShm()
functions.

Are there any other places where Ipc::Mem::pageSize() restriction takes
effect?

I think all Squid users are interested in caching large objects. In
particular, 32K is too small even to cache a GIF with a cute kitty!

-- 
Best wishes,
Alexander Komyagin
Received on Fri Jul 20 2012 - 14:29:57 MDT

This archive was generated by hypermail 2.2.0 : Fri Jul 20 2012 - 12:00:02 MDT