Skip to content

Discussion: Integrate our fork #11

@jonashaag

Description

@jonashaag

Intro and motivation

As already noted here vmprof/vmprof-python#90 (comment), we have implemented our own vmprof server, for the following reasons:

  • At that time, vmprof-server was very slow on large profiles (multiple hours of runtime) as it stored the profiles in the SQL database. (I'm not sure how the current implementation compares to ours.)
  • We wanted to have a good memory profile viewer in the server
  • We don't really need user accounts etc.

Features of our implementation

I can't share the source code of our server just yet, for bureaucratic reasons, but I can share some information and a few screenshots here.

Properties and differences to vmprof-server:

  • About 1000 LOC
  • Uses vmprof-server CPU viewer (no jitlog integration yet)
  • Much improved memory viewer based on Plotly:
    • Shows time and date on X axis
    • Data points aren't simply sampled from the complete data, but binned (mean), so that you don't miss spikes due to too-low sampling interval
    • Show memory usage mean, max or both
    • Nice interaction with the graph due to Plotly
    • Shows absolute or relative runtime on X axis
  • Allows to search for projects and functions/callables
  • Stores profiles as gzipped msgpack files, no decoding done in the server whatsoever: Data is encoded to .msgpack.gz in the client once, and delivered to the browser UI as-is. The only exception to this is for memory profile resampling.

We have also implemented a new client:

  • About 100 LOC

  • Interface isn't a script runner like python -m vmprof yourscript.py but a decorator that is applied to to-be-profiled callables, like

    @profile
    def somefunc():
        ...
  • Allows to tag your submissions with a project name

  • Automatically tags your submissions with the top-level function/callable name (somefunc)

  • Client can upload normal vmprof profile files

  • Client protocol not compatible to the vmprof-python protocol (but very similar)

Screenshots

bildschirmfoto vom 2016-08-04 12 40 08
Landing page with project names and top-level function names (in red). Search filters may be shared using the arrow on the right

bildschirmfoto vom 2016-08-04 12 41 36
Integration of vmprof-server CPU viewer

bildschirmfoto vom 2016-08-04 12 41 04
The memory viewer, showing max memory usage for each bin (no hidden spikes!). On the right: Upper stacktrace shows the largest common denominator of all stack traces of the bin. Lower stacktrace extends the upper one by the most common stack trace of the bin (28% of the stack traces in the bin were equal to the "concatenation" of the two stack trace parts).

bildschirmfoto vom 2016-08-04 12 41 19
Memory viewer showing mean + max of each bin

Future of our server, integration in vmprof-server

I think our server has some nice properties, mainly the memory viewer and the storage system (although I'm not sure how it compares to the current vmprof-server JSON/Gzip storage system in terms of performance). We'd love the contribute most of it back to vmprof-server proper.

Possibility A: Integrate vmprof-server into our server

  • Integrate jitlog into our server
  • Maybe integrate user accounts into our server
  • Make our server the new official server

Possibility B: Integrate our memory viewer into vmprof-server

  • Add memory view to vmprof-server
  • Change protocol accordingly

What do you guys think?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions