Increase memory in SpringToolSuite v4.0.1 - spring-tools-4

I'm unable to increase the memory for the app, and app keeps its default 1Gb of heap.
Seems the settings in SpringToolSuite4.ini (what used to be STS.ini) are being ignored.

Putting the "-Xmx" configuration BEFORE the "-startup" seems to resolve the problem.

Related

Can't increase heap size IntelliJ Mac – changed idea.vmoptions+restarted

I'm on MacOs 10.13.4 (High Sierra)
Using IntelliJ 2020.3.1 (Community Edition)
I've tried increasing the heap size but failed. I've tried these two things:
Changing through the dialog box Help->Change Memory Settings. But I get stuck with the spinning cursor and have to force quit IntelliJ. However when I restart IntelliJ the memory is increased. But when I run something that requires a lot of heap size I get "OutOfMemoryError: Java heap space".
Changing directly in the idea.vmoptions file. Changing "-Xmx750m" to e.g. "-Xmx8096m". But after restart of IntelliJ I still get: "OutOfMemoryError: Java heap space".
IntelliJ->Help->Edit Custom VM Options...
I have run the exact same files in Eclipse after increasing the heap size there to 4096 mb. Therefore I know the problem isn't that the program I run need more heap space than that. To me it seems like there's no effect from the increase.
Hope you guys can help me!
You can try the following:
File->Settings->Build,Execution,Deployment->Compiler->Shared build process heap size (Mbytes)

Xamarin.Forms Java.exe exited with code 1

I've seen a few people encounter this issue with the heap size, which seems to be the issue in my case:
2> Could not reserve enough space for 1048576KB object heap (TaskId:336)
I tried manually setting it to 1G:
Got the same error, realised the space required is actually greater than 1G (it's about 1.04GB), so I set it to 2G. But this just escalated the error:
1> Could not reserve enough space for 2097152KB object heap (TaskId:305)
I thought I'd go nuclear and just set it to 10G, but then I got a different error saying it failed to create the Java VM.
In all honesty, I don't actually know what these mean, I'm just following along based on research of other SO and Xamarin Forums posts. Can anyone explain to me why I'm seeing these errors and how I can fix them?
Notes based on other questions: It's on debug, not release, and I don't have ProGuard ticked.
Steps to fix:
Select 64-bit Java SDK (as per instructions)
Set heap size to 5G (as per screenshot in question)
Built and ran successfully after this.

Redis: Free used_memory_rss without restarting redis

Over time the used_memory_rss keeps increasing. I understand the reason behind it getting filled (its how memory allocators work). However I need a solution to free it without restarting redis.
Is there any way to do the same?
in redis 4.0 there is a new command
MEMORY PURGE
that will defragment memory and release it to the OS.
also see
MEMORY HELP
You may reference to this issue compact memory use online

Setting ES_HEAP_SIZE in windows

I'm using Windows 2012 R2 machine.
I have set my Heap Size in Environment variable as follows
ES_HEAP_SIZE
4g
After setting the heap size, i have installed Elasticsearch as windows service using command
service.bat install
When i started the service, Elasticsearch services has taken 4GB properly (Checked in Taskmanger.exe)
After some time, the memory used by elasticsearch service is came down to 1 GB.
Is this expected?
This is apparently an issue of ES under Windows.
Quoting from the link:
The 4gb committed heap size that you see in the node stats API is the amount of virtual memory that's reserved by setting ES_HEAP_SIZE (Xms), which is expected, even with bootstrap.mlockall disabled.
By enabling bootstrap.mlockall, we expect the call to VirtualLock() to lock the working set into physical memory, which happens initially (this is the memory you see in task manager), but eventually drops off.
I don't have a solid explanation for this yet, but I have observed that the more memory pressure the system is under (i.e. less free space available), the quicker the "drop off" occurs. It's as though Windows doesn't respect the fact that the pages in the working set are locked, and will release them when resources become low.
There's a lot of info out there that seems to indicate that VirtualLock doesn't guarantee pages won't be swapped, only reduces the odds, however the documentation says nothing about this.
1Gb is default heap size for Elasticsearch. So when you set the env.variable, you set maximum amount of memory it's allowed to use. If you don't issue any queries, the memory usage may drop to the default

JWrapper How Does The Memory Work?

I'm after a bit of info on how JWrapper uses memory on the client. We've got a 3rd party app that we're running through JWrapper. Before moving to JWrapper we had issues with memory leaks so we previously set the runtime memory parameter to Xmx256m in the deployment file. Can I specify how much memory to use in JWrapper?
I genuinely have tried to find this out myself but I can't find anything on the web. I didn't have any choice about getting JWrapper; it just happened to me one day hence I haven't really got much of an idea about it.
Thanks, :)
You can set the jvm options in your jwrapper XML config file including -Xmx256m etc, the following sample XML file has an example -Xmx option:
http://www.jwrapper.com/sample-app-xml.html

Resources