Support for method cache optimization

Bug #486198 reported by Yoshinori K. Okuji on 2009-11-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ZODB
Wishlist
Jim Fulton

Bug Description

Python 2.6 has method cache optimization:

  http://bugs.python.org/issue1700288

but it is not enabled automatically in extensions:

  http://bugs.python.org/issue1878

So I attach a patch for the support in ZODB. The patch is made against the trunk (r105930). All the unit tests run successfully both before and after my modification.

Yoshinori K. Okuji (okuji) wrote :

On Sat, Nov 21, 2009 at 4:06 AM, Yoshinori K. Okuji <email address hidden> wrote:
> Public bug reported:
>
> Python 2.6 has method cache optimization:
>
>  http://bugs.python.org/issue1700288
>
> but it is not enabled automatically in extensions:
>
>  http://bugs.python.org/issue1878
>
> So I attach a patch for the support in ZODB. The patch is made against
> the trunk (r105930). All the unit tests run successfully both before and
> after my modification.

Thanks. Have you done any benchmarking of this?

Jim

--
Jim Fulton

Yoshinori K. Okuji (okuji) wrote :

I ran ZODB's speed.py (a little modified, since cache_deactivate_after doesn't exist any longer) and collective.zodbbench, but they were affected by noise of disk I/O very much, so I didn't see much difference, although I am sure that my changes didn't decrease the performance.

I would like to see a bit more realistic test, if any. Do you have any recommendation?

On Mon, Nov 23, 2009 at 5:50 AM, Yoshinori K. Okuji <email address hidden> wrote:
> I ran ZODB's speed.py (a little modified, since cache_deactivate_after
> doesn't exist any longer) and collective.zodbbench, but they were
> affected by noise of disk I/O very much, so I didn't see much
> difference, although I am sure that my changes didn't decrease the
> performance.
>
> I would like to see a bit more realistic test, if any. Do you have any
> recommendation?

I have a realistic benchmark that involves actual database data.
It uses an experimental branch, replay, of zc.zeoinputlog. This is a work
in progress, so only especially hardy souls should try to use this package
themselves. :)

When I get a chance, I'll use my setup to evaluate your patches.

Jim

--
Jim Fulton

Changed in zodb:
importance: Undecided → Wishlist
status: New → Confirmed
assignee: nobody → Jim Fulton (jim-zope)
Hanno Schlichting (hannosch) wrote :

We enabled the method cache optimization in all the "Zope 2 C extensions" like ExtensionClass and Acquisition and used the code for some months now.

There was no measurable performance difference with this change, but also no ill side effects. The claims in the original Python tracker issue of speedups between 5% and 20% are only true for synthetic benchmarks.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.