fossasia / visdom

A flexible tool for creating, organizing, and sharing visualizations of live, rich data. Supports Torch and Numpy.
Apache License 2.0
10.05k stars 1.13k forks source link

Increased CPU usage of visdom server over time #695

Open pyscorcher opened 4 years ago

pyscorcher commented 4 years ago

Bug Description The CPU usage when starting the visdom server on my computer starts out at about 10%, but when I run a program that just adds data to a line plot the CPU usage slowly climbs. (I stopped it at about 70%)

Reproduction Steps Enter steps to reproduce the behavior: Create a loop that does about 6 iterations per second, with

vis.line(Y=y, X=x, win="data", update='append', opts=dict(title="title", legend=["a","b","c","d","e","f"]))

where y contains 6 entries and x contains one entry. After e.g. an hour or so the CPU usage of visdom will be significantly higher.

Expected behavior After one hour we just logged about 130k values, and I don't expect that to take up so much more of the CPUs capacity.

Server logs: The look completely normal, following two lines are repeated. INFO:tornado.access:200 POST /update (127.0.0.1) 11.42ms INFO:tornado.access:200 POST /win_exists (127.0.0.1) 0.89ms

JackUrb commented 4 years ago

This is definitely still related to #640 - but I've been pulled a little too thin to investigate deeply. The test script is definitely a good starting point - if you run it with a python memory profiler it should point out where something is going astray.