-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[CP] [ CLI ] Fix DART_VM_OPTIONS usage only resulting in printing of help message #55818
Comments
@a-siva could you review this cherry-pick request? |
SGTM |
Cherry-pick approved, please merge once the CL is reviewed @bkonyi |
Not reviewed or landed, yet. |
… of help message Fixes #55767 TEST=pkg/dartdev/test/commands/compile_test.dart Change-Id: I6a773acbd9fc21c086fc459c7cb983ea1ff11fcd Cherry-pick: https://dart-review.googlesource.com/c/sdk/+/367720 Cherry-pick-request: #55818 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367721 Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed and landed. |
FYI: Tested in production: working very well, the GC works much better when a limit is defined. export DART_VM_OPTIONS=--verbose_gc,--old_gen_heap_size=1500
./bin/server.exe
|
@gmpassos glad that it worked for you, can you give us some stats or log information about how GC works better |
A Dart self-executable uses much less memory since it doesn't need to parse, analyze, or compile any code. Our project in the Dart VM uses 800MB just to start, whereas in a self-executable it uses only 80MB. We use multiple server nodes with only 2GB of RAM. We detected two main changes in the GC for self-executables (which are known in the GC domain):
Note: These behaviors are not simple to see in a simple log, as they depend on an analysis of multiple GC info (GC in verbose mode) and an understanding of the benchmark operations and objects. Essentially, our application is a backend that manipulates a DB and loads everything using ORM abstractions (without any memory leaks, all proven by these benchmarks: after a forced full GC, the number of objects per class returns to the initial count). |
Commit(s) to merge
https://dart-review.googlesource.com/c/sdk/+/367720
Target
stable
Prepared changelist for beta/stable
https://dart-review.googlesource.com/c/sdk/+/367721
Issue Description
The
DART_VM_OPTIONS
environment variable is meant to allow for users to specify Dart VM flags to precompiled Dart executables generated bydart compile exe
. Currently, if any flags are provided through this variable, the VM's help message is printed rather than setting flags based on the provided options. Since testing was relying on--help
and--verbose
to deterministically test parsing ofDART_VM_OPTIONS
, this bug slipped through.What is the fix
Fixed the argument parsing logic in the VM to correctly handle lists of VM flags without a terminating script path or CLI command.
Why cherry-pick
This feature was explicitly called out in the 3.4
CHANGELOG
. In its current state, this feature is completely broken and is preventing some customers from configuring heap size related flags for use in container environments.Risk
Low.
Issue link(s)
#55767
Extra Info
No response
The text was updated successfully, but these errors were encountered: