Bug 456585 - [IDE] Default heap max (512MB) is too small
Summary: [IDE] Default heap max (512MB) is too small
Status: RESOLVED FIXED
Alias: None
Product: EPP
Classification: Technology
Component: php-package (show other bugs)
Version: 4.4.0   Edit
Hardware: Macintosh Mac OS X
: P3 enhancement (vote)
Target Milestone: 4.16 / 2020-06   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-03 14:45 EST by Toby Thain CLA
Modified: 2020-05-19 13:24 EDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Toby Thain CLA 2015-01-03 14:45:09 EST
I downloaded the 64 bit Luna for OS X.

Installed PDT dev tools. Doing simple editing, almost immediately ran into hangs with all CPUS (8) maxed, apparently doing never-ending gc.

Looked into it and found the default launcher Xmx was only 512MB.

That doesn't seem like an appropriate default for Eclipse, expecially on 64 bit platforms. 1.5-2GB has proven to be a more practical heap limit in my experience.

Strongly recommend increasing this to prevent new user confusion.
Comment 1 Lars Vogel CLA 2015-01-05 05:29:48 EST
With Java 8 the heap size is not needed / used anymore. As Eclipse Mars is planned to be released after the end of life of Java 7 I suggest to mark this bug as invalid.
Comment 2 David Williams CLA 2015-01-05 08:43:33 EST
(In reply to Lars Vogel from comment #1)

> With Java 8 the heap size is not needed / used anymore.

How have I not heard about this before! You not thinking of "maxpergen size" are you? 

(In reply to Toby Thain from comment #0)

> Installed PDT dev tools. Doing simple editing, almost immediately ran into
> hangs with all CPUS (8) maxed, apparently doing never-ending gc.
> 
> Looked into it and found the default launcher Xmx was only 512MB.

I believe PDT has much higher requirements than the SDK alone does, due to the way it does "indexing" with DTLK (I believe) ... so if that's the only known use-case with a problem, I suggest that PDT be the one to increase (and decrease) the max heap during the "configure" (and "unconfigure") stages of p2.
Comment 3 Lars Vogel CLA 2015-01-05 10:09:22 EST
(In reply to David Williams from comment #2)
> (In reply to Lars Vogel from comment #1)
> 
> > With Java 8 the heap size is not needed / used anymore.
> 
> How have I not heard about this before! You not thinking of "maxpergen size"
> are you? 

Thanks for the correction.

> (In reply to Toby Thain from comment #0)
> 
> > Installed PDT dev tools. Doing simple editing, almost immediately ran into
> > hangs with all CPUS (8) maxed, apparently doing never-ending gc.
> > 
> > Looked into it and found the default launcher Xmx was only 512MB.
> 
> I believe PDT has much higher requirements than the SDK alone does, due to
> the way it does "indexing" with DTLK (I believe) ... so if that's the only
> known use-case with a problem, I suggest that PDT be the one to increase
> (and decrease) the max heap during the "configure" (and "unconfigure")
> stages of p2.

Great suggestion, moving to PDT.
Comment 4 Toby Thain CLA 2015-01-05 11:35:33 EST
Thanks for reopening.

I am running JDK 7, as would anyone with a standard OS X install.

As for appropriate heap size, the problem is certainly _not_ limited to PDT! I have long used Eclipse for Java dev (without even PDT installed) and based on that, anything under 1.5GB is likely to cause problems. Many co-workers had the same experience with the same conclusion.

Does anyone have a real justification for a max of 512MB?
Comment 5 David Williams CLA 2015-01-05 14:08:17 EST
Adding Dani and Markus as two people who might have some insight's opinion on this issue (for the Platform, even those is currently in "PDT" after being moved). 

I certainly have no personal issue making it "huge" but I think the reason we've always made it as "small as possible" while still "working for most people" is that if we make it 1G or 1.5G, then those with only 4G on their machine may simply find that it does not start ... assuming OS takes a close to a couple G, and a few other apps running takes to another G ... but ... I may be working with "old information" and maybe things have changed now?
Comment 6 Toby Thain CLA 2015-01-05 14:59:47 EST
While I am very sympathetic to users on small machines, I believe this could be addressed by clearly announcing the increase in default Mx - in line with typical machines in use today - and at the same time making it clearer how to adjust the setting if someone is using a machine < 4GB.

As a data point, the large Java shop I worked at (where everyone found < 1.5GB Eclipse heap was impractical) currently standardises on 16GB RAM in all developer desktops.

I do think there is something anachronistic in the existing size (how LONG has it been 512MB? was it *ever* smaller than that??) especially for people specifically downloading a 64 bit build. Though the user experience will likely still be poor for those on 32 bit.

Thanks for considering this issue!
Comment 7 Dawid Pakula CLA 2015-01-09 16:46:20 EST
(In reply to Toby Thain from comment #0)
> I downloaded the 64 bit Luna for OS X.
> 
> Installed PDT dev tools. Doing simple editing, almost immediately ran into
> hangs with all CPUS (8) maxed, apparently doing never-ending gc.
> 
> Looked into it and found the default launcher Xmx was only 512MB.
> 
> That doesn't seem like an appropriate default for Eclipse, expecially on 64
> bit platforms. 1.5-2GB has proven to be a more practical heap limit in my
> experience.
> 
> Strongly recommend increasing this to prevent new user confusion.

We are working on memory issues (sometimes together with DLTK team). Main issue is a DLTK H2Index which will be reduced in new version.
 
Since PDT 3.4 + DLTK 5.1.1 -Xmx512m should be enough even on larger workspaces.
Comment 8 Toby Thain CLA 2015-01-09 19:51:42 EST
(In reply to Dawid Pakula from comment #7)
> (In reply to Toby Thain from comment #0)
> > I downloaded the 64 bit Luna for OS X.
> > 
> > Installed PDT dev tools. Doing simple editing, almost immediately ran into
> > hangs with all CPUS (8) maxed, apparently doing never-ending gc.
> > ...
> 
> We are working on memory issues (sometimes together with DLTK team). Main
> issue is a DLTK H2Index which will be reduced in new version.
>  
> Since PDT 3.4 + DLTK 5.1.1 -Xmx512m should be enough even on larger
> workspaces.

My system has PDT 3.3.1 + DLTK 5.0.0, for the record.
Comment 9 David Williams CLA 2015-01-11 13:18:45 EST
(In reply to Toby Thain from comment #6)
> While I am very sympathetic to users on small machines, I believe this could
> be addressed by clearly announcing the increase in default Mx - in line with
> typical machines in use today - and at the same time making it clearer how
> to adjust the setting if someone is using a machine < 4GB.

I think one problem with this idea is that people with machines with 4GB, are probably less able/likely to know about "setting mx values" (you know, since probably "casual uses"). Plus, don't forget, some people end up with a number of instances of Eclipse running ... some perhaps as "rcp apps", some as having several IDEs running at once. 

> As a data point, the large Java shop I worked at (where everyone found <
> 1.5GB Eclipse heap was impractical) currently standardises on 16GB RAM in
> all developer desktops.

Tody, 
There are some other approaches you could take, for "your shop". 
1) If you typically download an "EPP package", you might open a bug under EPP (under Technology top level component). I know they sometimes have their own "mx values" ... such as, I believe for JEE Package they set it at 786m? 
2) There are ways you can define a special IU, just for setting eclipse.ini values. See Paul Webster's blog post at 
http://pweclipse.blogspot.com/2012_02_01_archive.html
This would allow "your shop" to have a small "local repo" that all your developers could use to have a consistent value. I know not as easy as an "out of box" solution, but it is a good solution if your shop has needs that are not typical (average) -- and I suspect, the Platform wants to set these values as 
"minimal", not "average", just to avoid people running out of memory immediately, especially if running many instances of Eclipse. [Though, admit, 
I *think* most VMs do better these days at "returning" memory to the OS, if they are not really using all of mx (that is, they do not "reserve" all that memory and hang on to it, like they used to) ... but, I do not know enough about it, to say for sure. 
3) There is a project call Oomph, that will help "standardize" a set of preferences that can be shared among many instances of Eclipse installs. I am not actually positive it covers "mx" values, but you might check it out, and if nothing else, it might help "your shop" all get setup more easily and quickly and consistently over many preference values. I know there is work being done to make this part of (nearly) every EPP package, so I am sure they'd appreciate early feedback and feature requests. 

> I do think there is something anachronistic in the existing size (how LONG
> has it been 512MB? was it *ever* smaller than that??) especially for people
> specifically downloading a 64 bit build. Though the user experience will
> likely still be poor for those on 32 bit.
> 

I think the last time is was increased was in 2009, according to bug 265525.
Comment 10 Toby Thain CLA 2015-01-11 13:46:59 EST
Six years without an (In reply to David Williams from comment #9)
> (In reply to Toby Thain from comment #6)
> > While I am very sympathetic to users on small machines, I believe this could
> > be addressed by clearly announcing the increase in default Mx - in line with
> > typical machines in use today - and at the same time making it clearer how
> > to adjust the setting if someone is using a machine < 4GB.
> 
> I think one problem with this idea is that people with machines with 4GB,
> are probably less able/likely to know about "setting mx values" (you know,
> since probably "casual uses"). Plus, don't forget, some people end up with a
> number of instances of Eclipse running ... some perhaps as "rcp apps", some
> as having several IDEs running at once. 
> 
> > As a data point, the large Java shop I worked at (where everyone found <
> > 1.5GB Eclipse heap was impractical) currently standardises on 16GB RAM in
> > all developer desktops.
> 
> Tody, 
> There are some other approaches you could take, for "your shop". 
> 1) If you typically download an "EPP package", you might open a bug under
> EPP (under Technology top level component). I know they sometimes have their
> own "mx values" ... such as, I believe for JEE Package they set it at 786m? 
> 2) There are ways you can define a special IU, just for setting eclipse.ini
> values. See Paul Webster's blog post at 
> http://pweclipse.blogspot.com/2012_02_01_archive.html
> This would allow "your shop" to have a small "local repo" that all your
> developers could use to have a consistent value. I know not as easy as an
> "out of box" solution, but it is a good solution if your shop has needs that
> are not typical (average) -- and I suspect, the Platform wants to set these
> values as 
> "minimal", not "average", just to avoid people running out of memory
> immediately, especially if running many instances of Eclipse. [Though,
> admit, 
> I *think* most VMs do better these days at "returning" memory to the OS, if
> they are not really using all of mx (that is, they do not "reserve" all that
> memory and hang on to it, like they used to) ... but, I do not know enough
> about it, to say for sure. 
> 3) There is a project call Oomph, that will help "standardize" a set of
> preferences that can be shared among many instances of Eclipse installs. I
> am not actually positive it covers "mx" values, but you might check it out,
> and if nothing else, it might help "your shop" all get setup more easily and
> quickly and consistently over many preference values. I know there is work
> being done to make this part of (nearly) every EPP package, so I am sure
> they'd appreciate early feedback and feature requests. 
> 
> > I do think there is something anachronistic in the existing size (how LONG
> > has it been 512MB? was it *ever* smaller than that??) especially for people
> > specifically downloading a 64 bit build. Though the user experience will
> > likely still be poor for those on 32 bit.
> > 
> 
> I think the last time is was increased was in 2009, according to bug 265525.

Six years without an increase does not seem to reflect the rate at which workstation configurations have changed, especially in commercial development environments (I mentioned the 64 bit + 16GB standard that was in place last year where I worked).

The fact that it's arcane to change -Xmx hurts everyone, so I don't think it's an argument for leaving the configuration at a setting that's designed for the lowest percentile of users. User survey data should be able to guide this decision effectively?

As for "our shop", the need to increase it was "tribal knowledge" that was obtained through fairly costly trial and error. The standard environment should certainly have included this change, but that doesn't help those who opt for a 3P download (perhaps to get a current version).
Comment 11 David Williams CLA 2015-01-14 13:44:01 EST
Note, I did open a new "Platform bug", bug 457489, to cover this topic at the platform level. I do think EPP packages need to make their own informed decisions ... I'm sure if we in Platform make any changes, it might still not be suitable for EPP packages. But, it was just thought Toby raises some good points, that deserve more research, investigation, and discussion.
Comment 12 Dawid Pakula CLA 2015-04-04 09:24:46 EDT
Moving to php epp
Comment 13 Markus Knauer CLA 2015-05-07 06:21:42 EDT
See bug 459596 for the current status (Mars/4.5): The EPP packages are using now at least these settings:

  -Xms256m
  -Xmx1024m

If this still doesn't satisfy the needs of the PHP package users, I would suggest to increase the values of this package.
Comment 14 Dawid Pakula CLA 2020-05-19 13:24:29 EDT
PHP package no longer need so much ram. Also 2019-12 has upgraded values to Xmx=2048