#Is there a way to make java app use disk instead of memory?
1 messages ยท Page 1 of 1 (latest)
Here is an AI assisted attempt to answer your question ๐ค. Maybe it helps! In any case, a human is on the way ๐. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.
Java applications typically use memory for storing data and executing code. However, if your Java application is running out of memory, you can adjust the memory settings to allocate more memory to the application.
You can do this by using the "-Xmx" flag in the startup arguments to specify the maximum amount of memory that the Java Virtual Machine (JVM) can use. For example, you can set the maximum heap size to 1 gigabyte by adding "-Xmx1g" to your startup arguments.
Alternatively, if you want to reduce memory usage and store data on disk instead, you can consider implementing a caching mechanism that stores data on disk when it exceeds a certain size limit in memory. This way, you can free up memory while still retaining access to the data when needed.
It's important to note that using disk storage as a replacement for memory can impact performance due to slower read and write speeds compared to RAM. Therefore, it's recommended to optimize your application's memory usage first before resorting to disk storage as an alternative.
Overall, adjusting memory settings and implementing efficient data handling techniques can help address memory issues in your Java application without resorting to using disk storage as a primary solution.
first of, ssd is like 10 times slower than ram and hdd is 100 times slower than ram
second, did you actually ran out of memory or did java run out of memory that you allocated for it ?
why do you even need that much ram lol
then your computer should automarically swap to the disk
and why do you need that much ?
isnt there a limit value by default for swap as well?
but yeah I wouldnt mess with something like that
that doesnt explain the ram usage
I uploaded your attachments as Gist. This makes them more accessible, for example to mobile users.
did you actually read the error?
well but you said you checked the ram usage and it shouldnt be that high for such a task
yeah thats what I said
there might be an ram issue in the application itself
https://github.com/Querz/mcaselector/pull/417 this seems interesting, but maybe not realted at all
but the repository is kinda dead