-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: adds option to change JVM max heap size #97
Conversation
Hi @stulacy, I've tried this code out but get the same output for max memory before and after setting a Kind regards, |
I've fixed my Java install on my Linux laptop and increasing that heap parameter is working for me. On Windows I can't get it to work at all, which I think is a problem with my Java setup. I haven't tried running the tracking stuff on there before. I'll try and fix it and document it for other Windows users. Are you still testing it on your Mac, or are you using Google Colab? If the latter I suspect that you won't be able to modify the JVM settings. |
Update: still unable to get |
Hi @llwiggins , I've put a fix in place so the PyImageJ integration for Tracking should now also work on Windows. I can also confirm that the |
Weird! I'm using it on my Mac rather than through Google Collab. For me, the statement below returns a value of 3
|
I also have a default 3GB heap on my laptop (16GB RAM total), so that sounds reasonable (and also relatively low so it's understandable how it runs out of memory on large datasets). But it's still not changing when you try to increase it with the
|
That's really strange. I thought it might be a Jupyter problem, but on both Windows and Linux I can change the max heap in Jupyter. Can you try 2 things? First try setting Then try running this in a cell and pasting the output here:
I'm wondering if you're using a 32-bit JVM which limits you to a 3GB heap. |
Here's my output:
|
Ah that kills that theory. And did setting |
Hmmm this might be another M1 Mac specific issue. I'll see if I can reproduce it on another machine. |
I've had a go on someone's MacBook Pro 2021 in the office and annoyingly I can't reproduce this at all. What Mac are you on? A few things to try (clutching at straws now):
I'm mostly convinced now that this PR will work for the majority of users, and we're now just trouble shooting why it doesn't work for you, and if it there might be others it doesn't work for. |
Huh, that's strange... At least it works now! Yep it staying the same until the kernel/Python is restarted is expected behaviour. The JVM is only started once at the start of the program and the heap size is set on JVM start. I'll make that change go live then. |
Addresses #94
@llwiggins I've added the option to change the default max heap size in the JVM, which should help with processing large
datasets. I haven't been able to test it though as my java install is currently not working.
Before launching into a full dataset process, can you try the following to see if it works?
Create a Python script with the below and then run it, it should tell you the max memory available to your system by default (should do, I can't check this until I fix my java).
Then try run it again but passing in the max amount of memory you want, which should be then displayed in the output message.
By the way, were you on your laptop or Google Colab when you had this issue before?