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
12311 auto memory #2595
12311 auto memory #2595
Conversation
So each strategy can make decisions based on what type of service it's responsible for, the first ctor argument is now 'name'.
All memory settings from templates.xml have now been removed in favor of a single `${omero.mem.NAME.option}` property which is set during the `start(async)` and `deploy` commands by calling memory.adjust_settings.
This required passing a complete Settings object to the Strategy constructor so that we could use the default property resolution before creating the instance.
If available psutil will be used to check the free and total physical memory for the system. Otherwise, a call will be made to Java which uses the JMX OS bean to get the same values. These are then used by the `PercentStrategy`.
For use in the templates.xml file, all of our properties must also be available as variables before loading the templates.
This reverts commit 16cf293.
Opening for discussion, but this will need 1-2 more commits. |
The `<option/>` element does not handle splitting on whitespace, so there must be a number of properties rather than one large one.
With the last commits, this now works, but is less pretty than I would like:
I could try to hide these if that would be preferable. |
Exclude removed. I haven't done any configuration on octopus for tomorrow. Probably best to get this in to start testing performance, but review might should wait on a documentation PR. @sbesson has suggested we might should run this via the |
Docs PR opened to help explain what's going on here: ome/omero-documentation#819 |
http://ci.openmicroscopy.org/view/Failing/job/OMERO-5.0-merge-build/ICE=3.4,label=ome-c6100-1/22/console and http://ci.openmicroscopy.org/job/OMERO-5.0-merge-integration/296/console failed to start with this PR in. Logs copied under
Excluding and rebuilding |
Also test use_total with min_total/max_total
To simplify the logic, AS instances now just scale *up* the percentage of active RAM (as specified by `use_total` and `max_total`) when more memory is available.
To simplify the use of `AdaptiveStrategy`, the total memory is used rather than the min/max'd "active" memory. In order to modify the value, set `use_total`. Scaling, however, cuts off at 24000.
What am I missing?
df94a59 should limit 32000 to 24000, and use 2*perc = 30% for Blitz, which should be |
The call to
😦 I'll likely override another method to short-circuit this. |
About to push a commit. Problem is by removing 'active' from
and with
|
Previous commits removed the "active" memory level from interpolation calculations, but the calculate_heap_size method was still using "active" internally, leading to an early cutoff. With this, the adaptive strategy stops scaling up the percentage of memory that it uses, but it does keep using more memory as more is available. Also improved docs.
Travis failure. |
Travis Guava download failure; restarted |
We should've scoped this before starting ... i.e. who does this need to work for. I reckon it's OK as is for general users, if we accept that we'll need to configure our own limit internally.
|
I'd propose adding back in |
Would the limit only apply to the adaptive strategy? |
In an attempt to get this merged, AdaptiveStrategy has been removed and the permgen logic migrated to the PercentStrategy. In addition, the default max_total for PercentStrategy has been bumped to 48000 which gives a default max for blitz (assuming RAM is sufficient) of 7200MB which is close enough to our production settings to not matter.
@manics, pushed. See description of joshmoore@8de2ae1 |
Good to merge. My only concern (which can be handled later) is the parameter name |
@manics: I do need to open one more naming PR so you'll get a chance for specifically that. Merging so this can get onto latest, etc. Be thinking of suggestions 😄 : |
--rebased-to #2778 |
See: http://trac.openmicroscopy.org.uk/ome/ticket/12311
This PR removes the need to use perl or sed to modify the configuration properties on deploy. In fact, all references to
-Xmx
andMaxPermGen
have been removed fromtemplates.xml
. Instead, theomero.install.memory
module now calculates the appropriate settings on every startup and sets them inconfig.xml
.Things to check:
bin/omero admin memory
command should modifyconfig.xml
and print out what it's doingbin/omero config set
can be used to modify those valuesbin/omero admin start
should make use of those properties.Items that could use work/discussion:
tests for(done)PercentStrategy
addition of min/maxvalues (max done)optimization of default percentsother strategies?(adaptive added; suggestions welcome)/cc @kennethgillen @sbesson @manics @rleigh-dundee @stick @bpindelski