#1913 closed defect (fixed)
high memory usage
Reported by: | Antoine Martin | Owned by: | J. Max Mena |
---|---|---|---|
Priority: | major | Milestone: | 2.4 |
Component: | core | Version: | 2.3.x |
Keywords: | Cc: |
Change History (4)
comment:1 Changed 3 years ago by
Status: | new → assigned |
---|
comment:2 Changed 3 years ago by
Owner: | changed from Antoine Martin to J. Max Mena |
---|---|
Status: | assigned → new |
Helped by r19986, I found that the memory usage is coming from importing websockify. More specifically: websockify imports numpy which is responsible for most of that 128MB memory usage. Follow up ticket: #1926.
r19987 changes some of the xpra codec loading code so we don't import numpy unless we really have to (ie: pycuda requires it).
With this change and turning off websockify with --html=no
, the memory usage is now much lower:
2018-08-01 18:05:02,405 memory usage: pfullmem(rss=89583616, vms=755613696, shared=36974592, text=4096, lib=0, data=78819328, dirty=0, uss=74027008, pss=75572224, swap=0)
The next big chunks of memory come from the video and csc codecs (~40MB), which is to be expected. And also dbus (20MB!).
@maxmylyn: FYI.
comment:3 Changed 3 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Noted and closing.
(Dbus uses far more memory than I thought it would have - 30mb is quite a lot for something so simple)
comment:4 Changed 3 months ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1913
According to how to get "real" process memory and environ in Python, we aren't really using as much memory as previously thought.
The amount of memory which would be freed if the process was terminated right now is only around 200MB for a server, much less for a client.
Caveats: this does not include shared libraries we share with other processes, GPU memory, etc.
With the debug code added in r19985, we use psutil (docs: https://psutil.readthedocs.io/en/latest/ psutil]) to dump memory info at time intervals:
The "data" memory usage goes up by ~128MB around the time we init websockify and the auth modules / file transfer.