Mailing List Archive

[issue4093] add gc/memory management tests to pybench
New submission from Antoine Pitrou <pitrou@free.fr>:

Issue #4074 suggests to me that maybe pybench should have some gc and/or
memory management tests. Marc-Andre, what do you think?

----------
components: Demos and Tools
messages: 74599
nosy: lemburg, pitrou
priority: normal
severity: normal
status: open
title: add gc/memory management tests to pybench
type: feature request
versions: Python 2.7, Python 3.1

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4093>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4093] add gc/memory management tests to pybench [ In reply to ]
Marc-Andre Lemburg <mal@egenix.com> added the comment:

I'm not sure whether pybench is the right tool for this.

Note that pybench disables GC per default for exactly the reasons
causing #4074 :-)

pybench already has a --with-gc switch, so it's possible to benchmark
with or without GC and see the differences.

Regarding memory management: The exact amount of used memory is hard to
determine from within a process due to the way e.g. Linux or other
modern OSes manage memory. We'd have to use special low-level system
APIs to access the true amount of allocated memory on each platform.

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4093>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4093] add gc/memory management tests to pybench [ In reply to ]
Antoine Pitrou <pitrou@free.fr> added the comment:

> Note that pybench disables GC per default for exactly the reasons
> causing #4074 :-)

I know, I was thinking to enable the GC only in the GC-specific test of
course. The idea is to have a test stressing the GC heavily, such as the
example code in #4074.

The reason I suggest doing it in pybench is that it offers existing
facilities for measuring execution times, agregating results etc.

> Regarding memory management: The exact amount of used memory is hard to
> determine from within a process due to the way e.g. Linux or other
> modern OSes manage memory.

I was not thinking about measuring the amount of used memory but rather
the time spent in specific tests which would focus on the CPU cost of
memory allocation rather than computation or control flow. Something
like allocating lots of strings or tuples of various sizes, then
releasing them in various orders.

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4093>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com
[issue4093] add gc/memory management tests to pybench [ In reply to ]
Marc-Andre Lemburg <mal@egenix.com> added the comment:

I'll follow up on this next week.

_______________________________________
Python tracker <report@bugs.python.org>
<http://bugs.python.org/issue4093>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com