-
Notifications
You must be signed in to change notification settings - Fork 234
High memory usage with docker #1473
Comments
Because -Xmx1536m is specified(Maximum size of memory allocation pool), you could try a slightly smaller value. Configure Airsonic running standalone It is written in |
I tried smaller values, but airsonic crashes. |
Probably, answering that question is not easy for everyone. We recommend that you describe your environment according to the issues template, especially if your question is highly environment-dependent. Apart from Docker configuration, it is also effective to try it out from a stand-alone. |
It's just an airsonic/airsonic:latest docker running on an Ubuntu (18.04) server. Nothing special about it but configuration against traefik as reverse proxy. DB is the standard setting. I set the Java memory value in the beginning as airsonic failed with its standard setting of 256MB. I can surely provide a log of just running with standards... but the memory usage should be explainable from a design point of view, shouldn't it? |
Does it crash when scanning or at first startup? I'm going to pull numbers from my head here : 800GB / 10MB per MP3 song is approx. 80k songs, times a guess of 2k per row in the Yup, this could probably be optimized in some way. |
Java memory usage is not simple, so you need a profiler tool. It seems that 512m is exemplified in Docoment.
If it does n’t work very well ... |
Thx for the calculations ;) Why does airsonic needs to keep data in memory? |
I don't have a definite idea, only hunches in this case. I haven't been able to test it on a very large library like yours yet, but I wonder if switching to |
Can you try this build here: https://github.com/fxthomas/airsonic/releases/tag/10.6-snapshot-hsqldb-2.5 and let me know what happens? It's better if you create a new Airsonic instance for this, as this will render your database unusable on previous versions. |
I'll see to find time to test! |
Hm, I'm used to run airsonic with docker... 🤔 |
Ah, yes, sorry, I don't use Docker that much during development... Let me know if you're having trouble modifying the base image! |
my docker version used 1.5 Gb of ram. Before I moved to docker it was quite similar. It feels like it's correlated with the size of the library imo. |
I just did a clean install of airsonic standalone (Win7, Java 1.8), there's nothing on my library yet, I simply ran it for the first time, setup admin password, shut it down and started it again: 1.05GB of memory usage. it's even using more while idle than my Chromium with 5 tabs open. why? |
@lbesnard @cairobraga "airsonic-advanced" is a subproject with a name that includes the original product name, which is prohibited in many projects. Please refrain from introducing the issues at Airsonic, as it is a completely separate project that may involve experimentation and risk. The bugs in "airsonic-advanced" may originate from Airsonic, but they may not. Especially for scanning, verification should be done as a completely different thing. |
@tesshucom this was a newbie mistake, it was not my intention that the issue I opened there would end up here because I used a link to here as an example. I'm sorry and it won't happen again. |
OK, don’t take it seriously. At least what you can say is that Java 11 or later should be used if you want to perform validation with Docker. We should use post Java 10 to support Docker's memory configuration lookups, but it's better to use Java 11 from LTS. Simply put, the old JVM does not have proper control because it refers to the memory configuration of the host machine, not Docker. (As a result, there are cases where problems occur depending on the environment and cases where problems do not occur. It will depend on how many services are running concurrently on your machine.) |
I'm running airsonic/airsonic docker with the following docker-compose.yml:
So far, so good.
Problem is, it's using up over 1GB of memory!
Even on another system with only 1 album as media-source, it's up to 400MB.
Is there anything I can do to reduce the memory usage?
The text was updated successfully, but these errors were encountered: