#19116 closed defect (needinfo)
Memory leaks
| Reported by: | skyper | Owned by: | skyper |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core | Version: | |
| Keywords: | Cc: |
Description (last modified by )
I always did forget to report it. So, this is the start. I gonna try to collect more information.
Working for hours on a session I noticed JOSM to use more memory than it was given with -Xmx.
- After closing JOSM there is much more memory freed than JOSM was allowed to use.
- I got a "Out of memory" warning uploading these days.
- Saving the session and restarting did allow me to upload using only half of the assigned memory. Sadly, I did not save the session.
So far I suspect these different regions to look at:
- validator, as I run it quite often, see #17184.
- imagery cache
- relation editor, seems to use quite a lot of memory, especially, opening 10 or more at once.
Attachments (0)
Change History (12)
follow-up: 2 comment:1 by , 6 years ago
comment:2 by , 6 years ago
comment:3 by , 6 years ago
| Description: | modified (diff) |
|---|
comment:4 by , 6 years ago
| Description: | modified (diff) |
|---|
follow-up: 6 comment:5 by , 6 years ago
Ticket #17184 shows what is needed to reproduce a real problem. A cache is typically not a memory leak as long as it doesn't cache unused data. The validator caches the MapCSS rules and also data from the presets, that's why the first execution is much slower.
After closing JOSM there is much more memory freed than JOSM was allowed to use.
How do you measure this?
follow-up: 7 comment:6 by , 6 years ago
Replying to GerdP:
After closing JOSM there is much more memory freed than JOSM was allowed to use.
How do you measure this?
I have "top" run and look at the memory. Also noticed java uses more resistant memory than set with -Xmx with only one JOSM session and no other java program open.
follow-up: 8 comment:7 by , 6 years ago
Replying to skyper:
Replying to GerdP:
After closing JOSM there is much more memory freed than JOSM was allowed to use.
How do you measure this?
I have "top" run and look at the memory. Also noticed java uses more resistant memory than set with
-Xmxwith only one JOSM session and no other java program open.
-Xmx sets the maximum heap available in the JRE. top measures the memory used by the JRE. The meaning of these values is very different.
comment:8 by , 6 years ago
Replying to GerdP:
-Xmx sets the maximum heap available in the JRE. top measures the memory used by the JRE. The meaning of these values is very different.
Is, there an easy way, to get comparable numbers ?
This does not look right:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 20006 user 20 0 4736888 864340 103768 S 0,3 21,9 12:52.73 java
Memory Usage: 352 MB / 768 MB (34 MB allocated, but free)
and closing JOSM freed around 1200 MB.
comment:9 by , 6 years ago
Maybe this link helps: https://plumbr.io/blog/memory-leaks/why-does-my-java-process-consume-more-memory-than-xmx
follow-up: 12 comment:10 by , 6 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → needinfo |
I tried a few things like executing validator multiple times or opening / closing RelationEditor windows. Found no obvious memory leaks. Unless you can give more details how to reproduce we can close this ticket. Did you try VisualVM?
comment:11 by , 6 years ago
| Resolution: | → needinfo |
|---|---|
| Status: | needinfo → closed |
No, had no time to look into it.



see #17184