-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
Consider dropping -Xss from launcher #3741
Comments
I seem to recall this being a problem on TorqueBox for some reason as well. It's possible TorqueBox handles it by setting an option on its own. Or I could just be making all of this up. @bbrowning Does any of this sound familiar? |
And now that I've commented this quickly, I realize this is in the launcher and TorqueBox has its own. Sorry for the noise. |
@bbrowning If there's a test case that would fail if stack is too small, it might be interesting to try it with default stack size again. I'm less gun-ho on this one because the worst it does now is make threads twice as large in memory, to the tune of a measly 1MB per. Unless you're running some 100-way machine that's not likely to matter much. It would just be nice to trim the fat in our launchers. |
How much does our stack depth change once we turn this off? I am sure that depends on inlining and stuff like that but we did have some simple how deep script committed somewhere. |
I ran some numbers. All on Java 8u60, with the following code:
Here's interpreter. In 9.1 it is only the simple interpreter.
And with normal jit settings:
This difference in 9.1 is a bit of a worry. The interpreter seems about the same (I'd hope it would be better, even though this is a simple AST). The compiler is significantly worse. A general reason for this may be additional frames around our IR interpreted and compiled paths that could be collapsed. The compiler may suffer from invokedynamic "lambda forms" bloating the stack for early calls. In any case, I don't think we're going to be able to drop the flag any time soon. I will open a separate bug for the poor stack depths in 9.1. |
Some years ago, we force the default minimum stack size for JVM threads to 2048k, because the default (on 64-bit) of 1024k was too small for some recursion-heavy tools like Bundler. We blew out that stack a lot also because our AST was a recursive interpreter. Since then, bundler has been made iterative and we now interpret a flat structure...so it may be possible for us to drop our stack size tweaking too.
Relates to #3739.
The text was updated successfully, but these errors were encountered: