Francesco Romani has uploaded a new change for review.
Change subject: profiling: Add support for memory profiling ......................................................................
profiling: Add support for memory profiling
There are many python memory profilers, but most of them are tailored for interactive usage, so they are poorly suited for a daemon, like VDSM.
This patch adds support for dowser: http://www.aminus.net/wiki/Dowser https://pypi.python.org/pypi/dowser/0.2
which has the following benefits which makes it ina better position to be used with VDSM: + self contained, includes WEB UI + allows live monitoring + tailored for cherrypy usage, so friendly towards server applications. + easily portable (pure package)
It must be noted that dowser has some drawbacks as well - significat dependencies, both in number and in size (with respect to VDSM standards): cherrypy, PIL - based on gc module
As per the cpu profile already added, this code is meant to be used only as debug aid or in development environments. The feature is controlled by a config tunable and disabled by default; the feature disable itself if any dependency is missed.
Change-Id: Ib56b65513e0118b68cd43791bf655c928d6a26e2 Signed-off-by: Francesco Romani fromani@redhat.com --- M debian/vdsm-python.install M lib/vdsm/Makefile.am A lib/vdsm/profile_mem.py M vdsm.spec.in M vdsm/vdsm 5 files changed, 89 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/19/32019/1
diff --git a/debian/vdsm-python.install b/debian/vdsm-python.install index 8d11bfc..f429a91 100644 --- a/debian/vdsm-python.install +++ b/debian/vdsm-python.install @@ -15,6 +15,7 @@ ./usr/lib/python2.7/dist-packages/vdsm/netlink/link.py ./usr/lib/python2.7/dist-packages/vdsm/netlink/route.py ./usr/lib/python2.7/dist-packages/vdsm/profile.py +./usr/lib/python2.7/dist-packages/vdsm/profile_mem.py ./usr/lib/python2.7/dist-packages/vdsm/qemuimg.py ./usr/lib/python2.7/dist-packages/vdsm/sslutils.py ./usr/lib/python2.7/dist-packages/vdsm/tool/__init__.py diff --git a/lib/vdsm/Makefile.am b/lib/vdsm/Makefile.am index 4bebf28..04c8018 100644 --- a/lib/vdsm/Makefile.am +++ b/lib/vdsm/Makefile.am @@ -31,6 +31,7 @@ netconfpersistence.py \ netinfo.py \ profile.py \ + profile_mem.py \ qemuimg.py \ sslutils.py \ utils.py \ diff --git a/lib/vdsm/profile_mem.py b/lib/vdsm/profile_mem.py new file mode 100755 index 0000000..a60a833 --- /dev/null +++ b/lib/vdsm/profile_mem.py @@ -0,0 +1,83 @@ +# +# Copyright 2014 Red Hat, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# +# Refer to the README and COPYING files for full details of the license +# + +""" +This module provides memory profiling. +""" + +import threading + +from vdsm.config import config + +try: + # dowser dependencies + import cherrypy + from PIL import Image, ImageDraw + # dowser profiler itself + import dowser +except IOError: + _SUPPORTED = False +else: + _SUPPORTED = True + +Image # makes pyflakes happy +ImageDraw # same + + +_thread = None + + +def memory_usage_server(port=None): + cherrypy.tree.mount(dowser.Root()) + + port = (config.getint('vars', 'profile_memory_port') + if port is None else port) + + cherrypy.config.update({ + 'environment': 'embedded', + 'server.socket_port': port}) + + cherrypy.engine.start() + + +def start(): + """ Starts application memory profiling """ + if _SUPPORTED and is_enabled(): + _start_profiling() + + +def stop(): + """ Stops application memory profiling """ + pass # not yet needed + + +def is_enabled(): + return config.getboolean('vars', 'profile_memory_enable') + + +def is_running(): + return _thread is not None and _thread.is_alive() + + +def _start_profiling(): + global _thread + _thread = threading.Thread(name='memprofile', target=memory_usage_server) + _thread.daemon = True + _thread.start() diff --git a/vdsm.spec.in b/vdsm.spec.in index 5f9488c..233eee6 100644 --- a/vdsm.spec.in +++ b/vdsm.spec.in @@ -1184,6 +1184,7 @@ %{python_sitearch}/%{vdsm_name}/netlink/link.py* %{python_sitearch}/%{vdsm_name}/netlink/route.py* %{python_sitearch}/%{vdsm_name}/profile.py* +%{python_sitearch}/%{vdsm_name}/profile_mem.py* %{python_sitearch}/%{vdsm_name}/qemuimg.py* %{python_sitearch}/%{vdsm_name}/netconfpersistence.py* %{python_sitearch}/%{vdsm_name}/sslutils.py* diff --git a/vdsm/vdsm b/vdsm/vdsm index e575295..619e57e 100755 --- a/vdsm/vdsm +++ b/vdsm/vdsm @@ -34,6 +34,7 @@ from vdsm.config import config from vdsm import libvirtconnection from vdsm import profile +from vdsm import profile_mem
from storage.dispatcher import Dispatcher from storage.hsm import HSM @@ -69,6 +70,7 @@ zombiereaper.registerSignalHandler()
profile.start() + profile_mem.start()
libvirtconnection.start_event_loop()
@@ -85,6 +87,7 @@ while running[0]: signal.pause()
+ profile_mem.stop() profile.stop() finally: cif.prepareForShutdown()
Francesco Romani has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 1:
I did some experiments (albeit in great hurry and in a hackish way) with objgraph and guppy/heapy. Both are nice packages and somehow complement each other.
But I'm under the impression that most of those packages lean toward interactive usage, which makes them quite unfit for VDSM.
Let's see if dowser serves us better.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 1:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11162/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/280... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12104/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc19_created/314... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/11951/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/295/ : SUCCESS
Antoni Segura Puimedon has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 1: Code-Review+1
Thanks Francesco!!!
Francesco Romani has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 2:
this version fixes some glitches, most notably the lack of config tunables and the handling of missing imports.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 2:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11163/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/281... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12105/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc19_created/315... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/11952/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/296/ : FAILURE
Antoni Segura Puimedon has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 2: Code-Review+1
Francesco Romani has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 2: Verified+1
Verified running on RHEL7. Helped pinpointing the possible cause of https://bugzilla.redhat.com/show_bug.cgi?id=1130045
Yeela Kaplan has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 2:
(1 comment)
http://gerrit.ovirt.org/#/c/32019/2/lib/vdsm/profile_mem.py File lib/vdsm/profile_mem.py:
Line 52: Line 53: Line 54: def stop(): Line 55: """ Stops application memory profiling """ Line 56: pass # not yet needed Why is this not needed?
Wouldn't we want to stop the thread once the profiling is stopped? Line 57: Line 58: Line 59: def is_enabled(): Line 60: return config.getboolean('vars', 'profile_memory_enable')
Nir Soffer has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 2:
(1 comment)
http://gerrit.ovirt.org/#/c/32019/2/lib/vdsm/profile_mem.py File lib/vdsm/profile_mem.py:
Line 28: Line 29: try: Line 30: # dowser dependencies Line 31: import cherrypy Line 32: from PIL import Image, ImageDraw Why do you import these here? they are not used in this module. Line 33: # dowser profiler itself Line 34: import dowser Line 35: except ImportError: Line 36: _SUPPORTED = False
Nir Soffer has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 2:
(1 comment)
http://gerrit.ovirt.org/#/c/32019/2/lib/vdsm/profile_mem.py File lib/vdsm/profile_mem.py:
Line 28: Line 29: try: Line 30: # dowser dependencies Line 31: import cherrypy Line 32: from PIL import Image, ImageDraw
Why do you import these here? they are not used in this module.
If indeed needed, it must be documented here. Line 33: # dowser profiler itself Line 34: import dowser Line 35: except ImportError: Line 36: _SUPPORTED = False
Francesco Romani has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 3:
addressed comments; initial 'stop' implementation; better rationale in commit message. The reorganization of the profiling, as per Nir comments on IRC, will be done on a different patchset; then I'll rebase this patch on that.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 3:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12343/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11399/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/326... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/342/ : ABORTED
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/12188/ : SUCCESS
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 4:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12344/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11400/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/327... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/343/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/12189/ : SUCCESS
Francesco Romani has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 4:
cleanup patchset started on this topic branch:
http://gerrit.ovirt.org/#/q/status:open+project:vdsm+branch:master+topic:cle...
Nir Soffer has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 4: Code-Review-1
(10 comments)
http://gerrit.ovirt.org/#/c/32019/4/lib/vdsm/profile_mem.py File lib/vdsm/profile_mem.py:
Line 45: Line 46: _thread = None Line 47: Line 48: Line 49: def start(): This will be called when vdsm starts without checking anything. Line 50: """ Starts application memory profiling """ Line 51: if _SUPPORTED and is_enabled(): Line 52: _start_profiling() Line 53:
Line 47: Line 48: Line 49: def start(): Line 50: """ Starts application memory profiling """ Line 51: if _SUPPORTED and is_enabled(): Only now we know that we can run the memory profiler - so only at this point we are allowed to import stuff such as cherrypy and PIL.
We don't want to modify vdsm runtime environment in any way if the profiler is not needed.
So we can do: - Defer the import like cpu profiler does - Or add another layer, checking the configuration and then importing and starting all enabled profiles.
I think the first option is the simplest one.
We can do this:
if enabled(): import ...
And let the import failure crash the process. This is the simplest way, making it easy to understand why the profiler does not work when you have missing dependency, and requires not code
Or:
if enabled(): try: import ... except ImportError as e: logging.warning("Error strarting memory profiler: %s", e)
This will not crash vdsm and provide good error message.
If you go with the second way please also modify the cpu profiler to work in the same way. Line 52: _start_profiling() Line 53: Line 54: Line 55: def stop():
Line 48: Line 49: def start(): Line 50: """ Starts application memory profiling """ Line 51: if _SUPPORTED and is_enabled(): Line 52: _start_profiling() This also must raise if already started, the caller should be punished for this. Line 53: Line 54: Line 55: def stop(): Line 56: """ Stops application memory profiling """
Line 54: Line 55: def stop(): Line 56: """ Stops application memory profiling """ Line 57: if is_running(): Line 58: _stop_profiling() I think we should inline _stop_profiling here:
def stop(): if _thread is not None: stop cherrypy... _thread.join() _thread = None
And of course we need a lock for this - otherwise if two thread try to stop this at the same time, both may enter the function, and then one of them will fail trying to invoke None.join() Line 59: Line 60: Line 61: def is_enabled(): Line 62: return config.getboolean('vars', 'profile_memory_enable')
Line 62: return config.getboolean('vars', 'profile_memory_enable') Line 63: Line 64: Line 65: def is_running(): Line 66: return _thread is not None and _thread.is_alive() What if thread was created but is not running yet? Should be simply:
_thread is not None Line 67: Line 68: Line 69: def _memory_viewer(port=None): Line 70: cherrypy.tree.mount(dowser.Root())
Line 65: def is_running(): Line 66: return _thread is not None and _thread.is_alive() Line 67: Line 68: Line 69: def _memory_viewer(port=None): Why do we need configurable port? we have configuration for this.
Also it is much clear to do:
if port is None: port = config.getint(...)
Instead of the "modern" if .. else dance.
And of course do this first thing in the function. Why do you want to keep the port argument in a half baked state until the middle of the function?
It is good practice to define arguments just before you need them, so accessing them before they are defined fails. It is worst practice to have an argument defined at the start, and initialized only later. Line 70: cherrypy.tree.mount(dowser.Root()) Line 71: Line 72: port = (config.getint('vars', 'profile_memory_port') Line 73: if port is None else port)
Line 79: cherrypy.engine.start() Line 80: Line 81: Line 82: def _start_profiling(): Line 83: global _thread Raise if already running Line 84: _thread = threading.Thread(name='memprofile', target=_memory_viewer) Line 85: _thread.daemon = True Line 86: _thread.start() Line 87:
Line 82: def _start_profiling(): Line 83: global _thread Line 84: _thread = threading.Thread(name='memprofile', target=_memory_viewer) Line 85: _thread.daemon = True Line 86: _thread.start() Can be inlined into start(), or renamed to _start_profiling_thread Line 87: Line 88: Line 89: def _stop_profiling(): Line 90: global _thread
Line 89: def _stop_profiling(): Line 90: global _thread Line 91: cherrypy.engine.exit() Line 92: cherrypy.engine.block() Line 93: _thread.join() _thread may be None - this force the caller to invoke is_running.
Line 90: global _thread Line 91: cherrypy.engine.exit() Line 92: cherrypy.engine.block() Line 93: _thread.join() Line 94: del _thread Now is_running will fail with NameError. Should be:
_thread = None
Nir Soffer has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 4:
(1 comment)
I think we should move this into the new profiling package:
lib/vdsm/profiling/mem.py
http://gerrit.ovirt.org/#/c/32019/4/vdsm/vdsm File vdsm/vdsm:
Line 69: signal.signal(signal.SIGUSR1, sigusr1Handler) Line 70: zombiereaper.registerSignalHandler() Line 71: Line 72: profile.start() Line 73: profile_mem.start() Lets replace this with:
from vdsm import profiling ... profiling.start()
An let the profiling package start all profilers. I don't like to modify vdsm again when we add new profilers. Line 74: Line 75: libvirtconnection.start_event_loop() Line 76: Line 77: if config.getboolean('irs', 'irs_enable'):
Francesco Romani has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 4:
(10 comments)
http://gerrit.ovirt.org/#/c/32019/4/lib/vdsm/profile_mem.py File lib/vdsm/profile_mem.py:
Line 47: Line 48: Line 49: def start(): Line 50: """ Starts application memory profiling """ Line 51: if _SUPPORTED and is_enabled():
Only now we know that we can run the memory profiler - so only at this poin
Done Line 52: _start_profiling() Line 53: Line 54: Line 55: def stop():
Line 48: Line 49: def start(): Line 50: """ Starts application memory profiling """ Line 51: if _SUPPORTED and is_enabled(): Line 52: _start_profiling()
This also must raise if already started, the caller should be punished for
Done Line 53: Line 54: Line 55: def stop(): Line 56: """ Stops application memory profiling """
Line 54: Line 55: def stop(): Line 56: """ Stops application memory profiling """ Line 57: if is_running(): Line 58: _stop_profiling()
I think we should inline _stop_profiling here:
Good point. Rearranged code to use lock and to fix this issue. Line 59: Line 60: Line 61: def is_enabled(): Line 62: return config.getboolean('vars', 'profile_memory_enable')
Line 62: return config.getboolean('vars', 'profile_memory_enable') Line 63: Line 64: Line 65: def is_running(): Line 66: return _thread is not None and _thread.is_alive()
What if thread was created but is not running yet? Should be simply:
Done Line 67: Line 68: Line 69: def _memory_viewer(port=None): Line 70: cherrypy.tree.mount(dowser.Root())
Line 65: def is_running(): Line 66: return _thread is not None and _thread.is_alive() Line 67: Line 68: Line 69: def _memory_viewer(port=None):
Why do we need configurable port? we have configuration for this.
Good point. Reorganized code to fix this and remove unneeded 'port' argument: configuration item is good enough. Line 70: cherrypy.tree.mount(dowser.Root()) Line 71: Line 72: port = (config.getint('vars', 'profile_memory_port') Line 73: if port is None else port)
Line 79: cherrypy.engine.start() Line 80: Line 81: Line 82: def _start_profiling(): Line 83: global _thread
Raise if already running
Done - but with new code flow. Line 84: _thread = threading.Thread(name='memprofile', target=_memory_viewer) Line 85: _thread.daemon = True Line 86: _thread.start() Line 87:
Line 82: def _start_profiling(): Line 83: global _thread Line 84: _thread = threading.Thread(name='memprofile', target=_memory_viewer) Line 85: _thread.daemon = True Line 86: _thread.start()
Can be inlined into start(), or renamed to _start_profiling_thread
Done in a different way. Line 87: Line 88: Line 89: def _stop_profiling(): Line 90: global _thread
Line 89: def _stop_profiling(): Line 90: global _thread Line 91: cherrypy.engine.exit() Line 92: cherrypy.engine.block() Line 93: _thread.join()
_thread may be None - this force the caller to invoke is_running.
Done
Line 90: global _thread Line 91: cherrypy.engine.exit() Line 92: cherrypy.engine.block() Line 93: _thread.join() Line 94: del _thread
Now is_running will fail with NameError. Should be:
Done
http://gerrit.ovirt.org/#/c/32019/4/vdsm/vdsm File vdsm/vdsm:
Line 69: signal.signal(signal.SIGUSR1, sigusr1Handler) Line 70: zombiereaper.registerSignalHandler() Line 71: Line 72: profile.start() Line 73: profile_mem.start()
Lets replace this with:
Done Line 74: Line 75: libvirtconnection.start_event_loop() Line 76: Line 77: if config.getboolean('irs', 'irs_enable'):
Francesco Romani has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 5:
this version rebases on top of profiling_subpkg topic branch. Address Nir's comments.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 5:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/160... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/725/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/14051/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/707... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/165/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/13262/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/14219/ : FAILURE
Francesco Romani has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 6:
rebased
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 6:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/167... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/732/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/14086/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/714... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/172/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/13297/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/14254/ : FAILURE
Francesco Romani has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 7: Verified+1
Verified together: 36010 36011 36012 36013 32019 Verification: - code reacts properly to missing dowser packages: it does, prints a log message and continues to run - dowser module starts OK - dowser module is accessible outside localhost
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: Add support for memory profiling ......................................................................
Patch Set 7:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/195... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/200/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/13550/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/14507/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/760/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/14339/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/743... : FAILURE
automation@ovirt.org has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 8:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Francesco Romani has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 8:
removed import protection. Protection was needed (or at least was useful) with cherrypy 2.x, but we use (and should use) cherrypy 3.x noawadays.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 8:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/259... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/264/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/14778/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/824/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/14610/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/13822/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/807... : FAILURE
automation@ovirt.org has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 9:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 9:
Build Successful
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/321... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/15170/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/886/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/15001/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/14213/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/869... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/328/ : SUCCESS
automation@ovirt.org has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 10:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Francesco Romani has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 10:
rebased
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 10:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/383... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/15476/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/15307/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/14519/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/930... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/390/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/948/ : SUCCESS
Dan Kenigsberg has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 10: Code-Review+1
Nir Soffer has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 10:
(4 comments)
http://gerrit.ovirt.org/#/c/32019/10/lib/vdsm/profiling/memory.py File lib/vdsm/profiling/memory.py:
Line 45: Line 46: Line 47: def stop(): Line 48: """ Stops application memory profiling """ Line 49: if is_running(): We don't need this check, and its racy. Line 50: _stop_profiling() Line 51: Line 52: Line 53: def is_enabled():
Line 54: return config.getboolean('devel', 'memory_profile_enable') Line 55: Line 56: Line 57: def _is_alive(): Line 58: return _thread is not None I think that checking _thread is good enough. We don't need both is_running and is_alive. Line 59: Line 60: Line 61: def is_running(): Line 62: with _lock:
Line 79: global _thread Line 80: logging.debug("Starting memory profiling") Line 81: with _lock: Line 82: import cherrypy Line 83: import dowser Importing stuff under a lock may lead to deadlocks - I would do the import before taking the lock. This does not change anything in the semantics since importing existing module is just a dict lookup in sys.modules. Line 84: if _is_alive(): Line 85: raise UsageError('Memory profiler is already running') Line 86: _thread = threading.Thread(name='memprofile', Line 87: target=_memory_viewer)
http://gerrit.ovirt.org/#/c/32019/10/lib/vdsm/profiling/profile.py File lib/vdsm/profiling/profile.py:
Line 40: return cpu.is_enabled() or memory.is_enabled() Line 41: Line 42: Line 43: def is_running(): Line 44: return cpu.is_running() or memory.is_running() Since we have multiple profilers that may be in different states, if we want to get their status, a more useful way can be:
def status(): d = {} for profiler in (cpu, memory): d[profiler.NAME] = { "enabled": profiler.is_enabled(), "running": profiler.is_running() } return d
Francesco Romani has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 10:
(4 comments)
http://gerrit.ovirt.org/#/c/32019/10/lib/vdsm/profiling/memory.py File lib/vdsm/profiling/memory.py:
Line 45: Line 46: Line 47: def stop(): Line 48: """ Stops application memory profiling """ Line 49: if is_running():
We don't need this check, and its racy.
will remove. Line 50: _stop_profiling() Line 51: Line 52: Line 53: def is_enabled():
Line 54: return config.getboolean('devel', 'memory_profile_enable') Line 55: Line 56: Line 57: def _is_alive(): Line 58: return _thread is not None
I think that checking _thread is good enough. We don't need both is_running
will rename is_alive as is_running Line 59: Line 60: Line 61: def is_running(): Line 62: with _lock:
Line 79: global _thread Line 80: logging.debug("Starting memory profiling") Line 81: with _lock: Line 82: import cherrypy Line 83: import dowser
Importing stuff under a lock may lead to deadlocks - I would do the import
Oops. Thanks for pointing this out. Will fix. Line 84: if _is_alive(): Line 85: raise UsageError('Memory profiler is already running') Line 86: _thread = threading.Thread(name='memprofile', Line 87: target=_memory_viewer)
http://gerrit.ovirt.org/#/c/32019/10/lib/vdsm/profiling/profile.py File lib/vdsm/profiling/profile.py:
Line 40: return cpu.is_enabled() or memory.is_enabled() Line 41: Line 42: Line 43: def is_running(): Line 44: return cpu.is_running() or memory.is_running()
Since we have multiple profilers that may be in different states, if we wan
Good point, will add.
automation@ovirt.org has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 11:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Francesco Romani has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 11:
version 11 addresses comments from Nir and adds the status() facade function.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 11:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/464/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/456... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/15814/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/1022... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/15013/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/15984/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created_staging/790/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/100... : FAILURE
automation@ovirt.org has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 12:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 12:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/468/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/460... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/15824/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/1026... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/15023/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/15994/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created_staging/800/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/100... : SUCCESS
automation@ovirt.org has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 13:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 13:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/473/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/465... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/15855/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/1031... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/15054/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/16025/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created_staging/831/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/101... : SUCCESS
automation@ovirt.org has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 14:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Francesco Romani has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 14:
rebased. Moved here the missing bit to let the status() facade work.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 14:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/486/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/478... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/15905/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/1044... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/15104/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/16075/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created_staging/881/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/102... : SUCCESS
automation@ovirt.org has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 15:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Francesco Romani has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 15:
rebased with no changes whatsoever
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 15:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/488/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/480... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/15946/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/1046... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/15145/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/16116/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created_staging/922/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/102... : FAILURE
Francesco Romani has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 15: Code-Review-1
(1 comment)
https://gerrit.ovirt.org/#/c/32019/15/lib/vdsm/profiling/memory.py File lib/vdsm/profiling/memory.py:
Line 41: NAME = "memory" Line 42: Line 43: Line 44: def start(): Line 45: """ Starts application memory profiling """ should be:
if is_enabled(): _start_profiling() Line 46: _start_profiling() Line 47: Line 48: Line 49: def stop():
automation@ovirt.org has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 16:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
Francesco Romani has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 16:
version 16 restores the missing is_enabled() calls in top-level functions.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 16:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/530/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/522... : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/16243/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/1088... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/15443/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/16413/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/107... : SUCCESS
automation@ovirt.org has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 17:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 17:
Build Started (1/6) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/16935/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 17:
Build Started (2/6) -> http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/118...
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 17:
Build Started (3/6) -> http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/646/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 17:
Build Started (4/6) -> http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/1205...
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 17:
Build Started (5/6) -> http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/638...
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 17:
Build Started (6/6) -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17108/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 17:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/646/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/638... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/16935/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el6_created/1205... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/17108/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/118... : FAILURE
automation@ovirt.org has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 18:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 18:
Build Started (1/6) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18232/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 18:
Build Started (2/6) -> http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/857...
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 18:
Build Started (3/6) -> http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/866/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 18:
Build Started (4/6) -> http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/141...
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 18:
Build Started (5/6) -> http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc22_created/96/
Francesco Romani has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 18: Verified+1
re-verified running a patched VDSM and connecting using the browser to dowser.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 18:
Build Started (6/6)
0 -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1462/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 18: Verified-1
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/857... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/866/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/141... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc22_created/96/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18232/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1462/ : 0
automation@ovirt.org has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 19:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 19:
Build Started (1/5) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18288/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 19:
Build Started (2/5) -> http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/863...
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 19:
Build Started (3/5) -> http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/872/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 19:
Build Started (4/5) -> http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/141...
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 19:
Build Started (5/5)
0 -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1518/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 19:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/863... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/872/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/141... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18288/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1518/ : 0
automation@ovirt.org has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 20:
* Update tracker::IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 20:
Build Started (1/5) -> http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18292/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 20:
Build Started (2/5)
0 -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1522/
Francesco Romani has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 20: Verified+1
we now use the __name__ python already provides for modules.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 20:
Build Started (3/5) -> http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/864...
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 20:
Build Started (4/5) -> http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/873/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 20:
Build Started (5/5) -> http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/141...
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 20: Verified-1
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc21_created/864... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-el7_created/873/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master_install-rpm-sanity-fc20_created/141... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/18292/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/1522/ : 0
David Caro has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 20:
It got stuck on one of the tests (running for more than 4 hours), please check
Dan Kenigsberg has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 20: Code-Review+2
jenkins failure seems unrelated to the patch.
(11:56:30 AM) fromani_: danken: and failed apparently because: DEBUG util.py:388: Error: Package: kernel-3.10.0-229.1.2.el7.x86_64 (el-updates) (11:56:30 AM) fromani_: DEBUG util.py:388: Requires: linux-firmware >= 20140911 (11:56:30 AM) fromani_: DEBUG util.py:388: Available: linux-firmware-20140213-0.3.git4164c23.el7.noarch (el) (11:56:30 AM) fromani_: DEBUG util.py:388: linux-firmware = 20140213-0.3.git4164c23.el7 (11:56:30 AM) fromani_: DEBUG util.py:388: You could try using --skip-broken to work around the problem
Dan Kenigsberg has submitted this change and it was merged.
Change subject: profiling: add support for memory profiling ......................................................................
profiling: add support for memory profiling
There are many python memory profilers, but most of them are tailored for interactive usage, so additional integration work is needed to use them in a daemon, like VDSM.
This patch adds support for dowser: http://www.aminus.net/wiki/Dowser https://pypi.python.org/pypi/dowser/0.2
which has the following benefits which makes it in a better position to be used with VDSM: + self contained, includes WEB UI + allows live monitoring + tailored for cherrypy usage, so friendly towards server applications. + easily portable (pure package)
It must be noted that dowser has some drawbacks as well - significat dependencies, both in number and in size (with respect to VDSM standards): cherrypy, PIL - based on gc module
As per the cpu profile already added, this code is meant to be used only as debug aid or in development environments. The feature is controlled by a config tunable and disabled by default; the feature disable itself if any dependency is missed.
Change-Id: Ib56b65513e0118b68cd43791bf655c928d6a26e2 Signed-off-by: Francesco Romani fromani@redhat.com Reviewed-on: https://gerrit.ovirt.org/32019 Reviewed-by: Dan Kenigsberg danken@redhat.com --- M debian/vdsm-python.install M lib/vdsm/config.py.in M lib/vdsm/profiling/Makefile.am A lib/vdsm/profiling/memory.py M lib/vdsm/profiling/profile.py M vdsm.spec.in 6 files changed, 124 insertions(+), 0 deletions(-)
Approvals: Dan Kenigsberg: Looks good to me, approved Francesco Romani: Verified
automation@ovirt.org has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 21:
* Update tracker::IGNORE, no Bug-Url found * Set MODIFIED::IGNORE, no Bug-Url found.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 21:
Build Started (1/9) -> http://jenkins.ovirt.org/job/vdsm_master-libgfapi_create-rpms-fc21-x86_64_me...
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 21:
Build Started (2/9) -> http://jenkins.ovirt.org/job/vdsm_master_create-rpms-fc21-x86_64_merged/935/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 21:
Build Started (3/9) -> http://jenkins.ovirt.org/job/vdsm_master_create-rpms-el7-x86_64_merged/972/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 21:
Build Started (4/9) -> http://jenkins.ovirt.org/job/vdsm_master-libgfapi_create-rpms-fc20-x86_64_me...
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 21:
Build Started (5/9) -> http://jenkins.ovirt.org/job/vdsm_master_create-rpms-fc20-x86_64_merged/970/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 21:
Build Started (6/9) -> http://jenkins.ovirt.org/job/vdsm_master-libgfapi_create-rpms-el7-x86_64_mer...
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 21:
Build Started (7/9) -> http://jenkins.ovirt.org/job/vdsm_master-libgfapi_create-rpms-fc22-x86_64_me...
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 21:
Build Started (8/9) -> http://jenkins.ovirt.org/job/vdsm_master_create-rpms-fc22-x86_64_merged/112/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 21:
Build Started (9/9)
0 -> http://jenkins.ovirt.org/job/vdsm_master_unit-tests_merged/44/
oVirt Jenkins CI Server has posted comments on this change.
Change subject: profiling: add support for memory profiling ......................................................................
Patch Set 21:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master-libgfapi_create-rpms-fc21-x86_64_me... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-fc21-x86_64_merged/935/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-el7-x86_64_merged/972/ : FAILURE
http://jenkins.ovirt.org/job/vdsm_master-libgfapi_create-rpms-fc20-x86_64_me... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-fc20-x86_64_merged/970/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master-libgfapi_create-rpms-el7-x86_64_mer... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master-libgfapi_create-rpms-fc22-x86_64_me... : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_create-rpms-fc22-x86_64_merged/112/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_merged/44/ : 0
vdsm-patches@lists.fedorahosted.org