Reducing usage of resources during precompilation

Hello, I am trying to set up a Julia kernel in mybinder.org with a few packages. Here is the GitHub repo for the kernel. I find the precompilation failing due to the process overrunning the maximum amount of RAM (2GB) provided by the Binder.

How can I reduce the usage of memory during the precompilation process?

2 Likes

2GB is ridiculously little. I doubt that mybinder container could be useful with so little memory. Get a bit more, perhaps?

I’m not sure but maybe this flag

 --heap-size-hint=<size>    Forces garbage collection if memory usage is higher than that value.
                            The memory hint might be specified in megabytes(500M) or gigabytes(1G)

when starting Julia can help?

Thanks a lot! May I please know how much memory would be recommended?

I find that 8GB is a decent lower bound.

1 Like

On Linux you can use zram to get 50% more RAM for free… And you can always use a swap file if you are patient…

1 Like

I would try requesting mybinder for memory limit increase, but I am doubtful they will support it. What would be the recommended alternative? A private BinderHub deployment?

@ufechner7 Since mybinder is a public cloud service, I am not sure if I can fiddle with the configuration myself. I will give @Tortar’s solution a try!

I eventually made up a postBuild file for binder to precompile the required packages with “heap-size-hint=1G” , and made a minimal Julia environment to begin with! This seems to help! Thanks everyone !