are there any compile time optimizations for python that would also help optimize zope? shared libraries? threads? -- David Bear phone: 602-496-0424 fax: 602-496-0955 College of Public Programs/ASU University Center Rm 622 411 N Central Phoenix, AZ 85007-0685 "Beware the IP portfolio, everyone will be suspect of trespassing"
--On 18. Januar 2008 10:21:33 -0700 David Bear <David.Bear@asu.edu> wrote:
are there any compile time optimizations for python that would also help optimize zope?
Not really. Why do you ask? What is slow? What appears as slow? -aj
On Fri, Jan 18, 2008 at 06:25:29PM +0100, Andreas Jung wrote:
--On 18. Januar 2008 10:21:33 -0700 David Bear <David.Bear@asu.edu> wrote:
are there any compile time optimizations for python that would also help optimize zope?
Not really. Why do you ask? What is slow? What appears as slow?
I'm putting zope/plone on a virtual machine and I would like to optimize for memory consumption if possible. I don't know how rapidly the hosting service I'm using could add ram to the vm.
-aj
-- David Bear phone: 602-496-0424 fax: 602-496-0955 College of Public Programs/ASU University Center Rm 622 411 N Central Phoenix, AZ 85007-0685 "Beware the IP portfolio, everyone will be suspect of trespassing"
--On 18. Januar 2008 10:56:16 -0700 David Bear <David.Bear@asu.edu> wrote:
On Fri, Jan 18, 2008 at 06:25:29PM +0100, Andreas Jung wrote:
--On 18. Januar 2008 10:21:33 -0700 David Bear <David.Bear@asu.edu> wrote:
are there any compile time optimizations for python that would also help optimize zope?
Not really. Why do you ask? What is slow? What appears as slow?
I'm putting zope/plone on a virtual machine and I would like to optimize for memory consumption if possible. I don't know how rapidly the hosting service I'm using could add ram to the vm.
Memory optimization is tricky. Especially ZODB cache tuning. But there is nothing at a compilation that would help you. Perhaps one thing: there is a switch that cares about the internal unicode representation (UCS2 vs UCS4). UCS2 might be the better choice since it will use only 2 byte per unicode character instead of 4. Andreas
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 David Bear wrote:
are there any compile time optimizations for python that would also help optimize zope? shared libraries? threads?
The only one I know of for Python-compilation time: - Ensure that Python is compiled to use UCS2, rather than UCS4, for unicode (UCS2 is the default, but some "system" pythons use UCS4). Runtime: - Run python with '-O' on the command-line helps (it turns of some 'if __debug__' logging). - If you don't allow untrusted users to create templates or scripts on your site, set 'skip-ownership-checking yes' in your zope.conf. - Ensure that debugging and profiling are disabled in zope.conf. - Set your log levels as high as you can (at least INFO for the event log). - Tune the ZODB connection cache size (more objects, more memory, but faster). - Tune the ZEO disk cache size (the warning sign is seen lots of "ZEO cache flip" entries in the event log). Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHkRrH+gerLs4ltQ4RAgIFAJ4s3vNNvHfYX7n+jYnRa1m9459MEwCff6aV K0NYQg37T5TLUcLqcyxXse8= =yHSW -----END PGP SIGNATURE-----
Tres Seaver wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
- Tune the ZEO disk cache size (the warning sign is seen lots of "ZEO cache flip" entries in the event log).
Can you explain this some more? 1. Do we increase the cache size when we see these ZEO cache flips? 2. What is a "good" rate for these cache flips? Suresh
--On 19. Januar 2008 13:42:30 +0530 "Suresh V." <suresh_vv@yahoo.com> wrote:
Tres Seaver wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
- Tune the ZEO disk cache size (the warning sign is seen lots of "ZEO cache flip" entries in the event log).
Can you explain this some more?
1. Do we increase the cache size when we see these ZEO cache flips? 2. What is a "good" rate for these cache flips?
offtopic, but persistent zeo caches - especially with larger cache sizes - require a lot of time for performing cache validation/invalidation at start time (sometimes minutes..). Andreas
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Suresh V. wrote:
Tres Seaver wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
- Tune the ZEO disk cache size (the warning sign is seen lots of "ZEO cache flip" entries in the event log).
Can you explain this some more?
1. Do we increase the cache size when we see these ZEO cache flips?
Yes In general, keep increasing it until they are no longer "noticeable".
2. What is a "good" rate for these cache flips?
I don't have a firm sense, but no oftener than every hour, say: when the cache flips, you lose half the working set (the "oldest" half). Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHkfTy+gerLs4ltQ4RAsrnAKCpQBnp/eARWtDLbLaVqxU6acd+NwCghkpP oKdWmCIhDs8dUW8uNtHXk3I= =DhiR -----END PGP SIGNATURE-----
So would this also apply to older zopes? Like 2.7.5?? Exactly where is that changed and in what increments are safe to increase it by? Thanks Allen Tres Seaver wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Suresh V. wrote:
Tres Seaver wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
- Tune the ZEO disk cache size (the warning sign is seen lots of "ZEO cache flip" entries in the event log).
Can you explain this some more?
1. Do we increase the cache size when we see these ZEO cache flips?
Yes In general, keep increasing it until they are no longer "noticeable".
2. What is a "good" rate for these cache flips?
I don't have a firm sense, but no oftener than every hour, say: when the cache flips, you lose half the working set (the "oldest" half).
Tres. - -- =================================================================== Tres Seaver +1 540-429-0999 tseaver@palladion.com Palladion Software "Excellence by Design" http://palladion.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHkfTy+gerLs4ltQ4RAsrnAKCpQBnp/eARWtDLbLaVqxU6acd+NwCghkpP oKdWmCIhDs8dUW8uNtHXk3I= =DhiR -----END PGP SIGNATURE-----
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Tres Seaver wrote at 2008-1-18 16:31 -0500:
... - Tune the ZEO disk cache size (the warning sign is seen lots of "ZEO cache flip" entries in the event log).
Modern ZEO versions no longer use a flipping client-cache. The cache is now maintained in a single disk file (and no longer two, with flipping between them). -- Dieter
David Bear wrote at 2008-1-18 10:21 -0700:
are there any compile time optimizations for python that would also help optimize zope? shared libraries? threads?
As an additional hint to save memory: Ensure that the ZODB cache size is tight for the "temporary" database (which contains the session data). The default size is usually far too large. This advice is especially important when you keep large amounts of data in your session objects. -- Dieter
participants (6)
-
Allen Schmidt Sr. -
Andreas Jung -
David Bear -
Dieter Maurer -
Suresh V. -
Tres Seaver