Can I change the heap size for Groovy in Beaker notebook? - beaker-notebook

When I am launching Beaker notebook, can I change the heap size for Groovy? I'd like to customize this if possible.

Yes. To customize the heap size, launch Beaker like this:
beaker.command --plugin-option Groovy:-Xmx8g
Or you can edit your beaker.pref.json file, and get that configuration every time you run Beaker.

Related

Increase JavaScript Heap Memory in Electron Renderer Process

My Electron application needs a huge amount of memory in the renderer process. Yes, that's intended and no, there's no way around it. (At least none that would make any sense.)
Using performance.memory in the renderer process gives: jsHeapSizeLimit: 3760000000. And I can indeed allocate memory up to about 3.5 GB, then the process will crash.
Now, there's the --max-old-space-size command line parameter to control the available JS heap size of the renderer process in an Electron app. I set it in main.js like this:
app.commandLine.appendSwitch('js-flags', '--max-old-space-size=1024')
Using performance.memory now shows: jsHeapSizeLimit: 1130000000, which is just a little bit more than 1GB, so decreasing the JS heap size works. But I cannot increase it to more than the 3,760,000,000 bytes.
Trying to set it to 8 GB doesn't increase the JS heap size limit:
app.commandLine.appendSwitch('js-flags', '--max-old-space-size=8192')
performance.memory still says: jsHeapSizeLimit: 3760000000
What am I missing? Is max-old-space-size only able to reduce available memory and not to increase it? Or do I have to set another parameter so that the renderer process can utilize the available old space?
The important parts of process.versions:
{
node: '14.16.0',
v8: '8.9.255.24-electron.0',
electron: '12.0.4',
chrome: '89.0.4389.114'
}
This happens on my Macbook with 16GB as well as on my Windows desktop with 64 GB.
I hope you found the answer to your question.
However there is this Github thread that gave an answer :
https://github.com/electron/electron/issues/2056
What work for me (electron 11.5.0) is to add --js-flags=--max-old-space-size=8192 in the packge.json script :
{
"scripts": {
"start": "electron --js-flags=--max-old-space-size=8192 main.js"
}
}

How to symbolize chrome browser heap dump to analyze memory leak

I'm trying to analyze a memory leak in our web application. So, I am trying to follow the steps mentioned in the link https://chromium.googlesource.com/chromium/src/+/master/docs/memory-infra/heap_profiler.md to generate heap dump of chrome and analyze it.
I'm stuck at step 4 of 'How to obtain a heap dump (M66+, Linux, macOS, Windows)' section where I have to symbolize the trace/dump. I'm trying out the 'Windows only' option of Step 4. Does anybody know what does the statement 'For subsequent commands, add the flag --addr2line-executable=' mean?

Recording Heap Allocations in 2018 Chrome Dev Tools?

Google's documentation on how to do this is now out of date: https://developers.google.com/web/tools/chrome-devtools/memory-problems/allocation-profiler
The dev tools UI has changed since this was written (I'm using v66), and I can't figure out how to get to a heap allocation bar graph which looks like this:
Can anyone walk me through this? I've gone to Settings and checked Record heap allocation stack traces which I believe is one step that is required to do this. In the performance tab I've checked the memory box and have recorded some actions, but once that's done I get more of a line graph for heap, rather than a bar graph:
Halp?
Memory profilers are moved to Memory panel. The one you're looking for is called "Allocation instrumentation on timeline".

Chrome timeline slow GC events

This screenshot is from my chrome extension. I'm just scrolling the screen up and down, and it keeps freezing. Looks like it's caused by garbage collection. How can I figure out why this is happening?
No code is running as far as I'm aware. I'm just scrolling the page. Why would it keep dumping 27MB of memory every second!?
I can't take a heap snapshot because it takes forever, then actually crashes the plugin.
Once it invokes GC, that means you are having something allocated on JS heap.
You can use heap profiler to find out what's that. Go to Profiles panel and use Record Heap Allocations tool.

how to boot kernel image in u-boot without 'bootm' command

I am working on a simple OS for arm using qemu and uboot. I can load uboot fine and can load the image with using the 'bootm' command followed by the corresponding address. I want the kernel image to load automatically without having to call bootm. I added "#define CONFIG_BOOTCOMMAND "bootm 0x28124"" to the versatile.h file and it loads automatically, but the issue is that this address can change. I am using versatilepb and I thought it was strange that uboot is missing a lot of the commands that the documentations says it should have.
u-boot copy compressed kernel image onto memory and then jump to this kernel image's entry point. Then the kernel decompress and put kernel onto proper location at memory.
As the offset of kernel entry to kernel image is fixed, and the location of compressed kernel is determined by u-boot and usually fixed.
You wont need to change your bootm address when kernel size changes