[ZODB-Dev] [Enhancement Proposal] Memory size limited Cache
Dieter Maurer
dieter at handshake.de
Fri Oct 6 15:46:04 EDT 2006
Jim Fulton wrote at 2006-10-6 15:13 -0400:
>Dieter Maurer wrote:
>> Jim Fulton wrote at 2006-10-6 12:21 -0400:
>>> ...
>>>> We would have a use case for this, too.
>>> We've started moving toward just using a single application thread per process
>>> (with many processes). There isn't really much advantage in running multiple
>>> threads if you have multiple processes.
>>
>> Apart from sharing resources, such as the cache....
>
>That isn't a benefit of multiple threads.
I disagree.
> It is a way to
>mitigate the cost of multiple threads. In the presence of the
>GIL there is no throughput benefit in running multiple threads.
I agree.
>The only benefit of multiple threads is that it is somewhat
>less likely that expensive requests will block inexpensive ones.
Multiple threads can share resources such as main memory and
a common cache (proposed by the original poster).
While this does not give more throughput, it uses memory more
efficiently.
RAM got quite cheap but it is still a limiting factor -- at least for us:
We abused Zope a bit and have build a desktop application with it.
One of the main critiques of our customers is too high memory
consumption. Many have computers with 256 MB memory and
they do not like at all that our application uses roughly a third
of it...
They would even less like it when there were several processes
with each of them taking about 60 MB (many of our caches
are on module level and are shared indeed).
--
Dieter
More information about the ZODB-Dev
mailing list