[ZODB-Dev] Re: [Enhancement Proposal] Memory size limited Cache

2006-10-06 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jim Fulton wrote:
 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.  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.
 The only benefit of multiple threads is that it is somewhat
 less likely that expensive requests will block inexpensive ones.

Assuming that you aren't disk or RAM constrained, I'll agree that
running multiple processes is more likely to win, especially on
multi-CPU machines.  However, most sites which have such needs might do
better to have a single, *large* cache, than many smaller ones;
swapping will kill any benefit obtained from better parallelism.


Tres.
- --
===
Tres Seaver  +1 202-558-7113  [EMAIL PROTECTED]
Palladion Software   Excellence by Designhttp://palladion.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFJq6R+gerLs4ltQ4RAhqsAJ97DfKF64DExcGCadOCBZElvf+KlQCfXdVx
LBY1UlywAjTiNqwZJ3JsXcE=
=eIaF
-END PGP SIGNATURE-

___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


[ZODB-Dev] Re: [Enhancement Proposal] Memory size limited Cache

2006-10-06 Thread Jim Fulton

Tres Seaver wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jim Fulton wrote:

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.  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.
The only benefit of multiple threads is that it is somewhat
less likely that expensive requests will block inexpensive ones.


Assuming that you aren't disk or RAM constrained, I'll agree that
running multiple processes is more likely to win, especially on
multi-CPU machines.  However, most sites which have such needs might do
better to have a single, *large* cache, than many smaller ones;
swapping will kill any benefit obtained from better parallelism.


Sure.  I would definitely not run more processes than processors
(assuming that the processes are identical).  And I wouldn't
use more than one thread unless responsiveness was an issue, as
it sometimes is.

Jim

--
Jim Fulton   mailto:[EMAIL PROTECTED]   Python Powered!
CTO  (540) 361-1714http://www.python.org
Zope Corporation http://www.zope.com   http://www.zope.org
___
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev