* setting an optimal value of gc-cons-threshold
@ 2007-06-02 14:31 Leo
[not found] ` <200708280535.l7S5Zen9013844@localhost.localdomain>
[not found] ` <mailman.5435.1188280107.32220.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 13+ messages in thread
From: Leo @ 2007-06-02 14:31 UTC (permalink / raw)
To: help-gnu-emacs
Hi list,
I found quite a few people in their .emacs setting gc-cons-threshold to
a different value than the default 400000.
I wonder if there is a guidance for setting this value.
Thanks,
--
Leo <sdl.web AT gmail.com> (GPG Key: 9283AA3F)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: setting an optimal value of gc-cons-threshold
[not found] <mailman.1498.1180794791.32220.help-gnu-emacs@gnu.org>
@ 2007-06-10 1:04 ` Stefan Monnier
2007-06-10 8:10 ` Leo
2007-06-10 10:14 ` Stephen Berman
0 siblings, 2 replies; 13+ messages in thread
From: Stefan Monnier @ 2007-06-10 1:04 UTC (permalink / raw)
To: help-gnu-emacs
> I found quite a few people in their .emacs setting gc-cons-threshold to
> a different value than the default 400000.
> I wonder if there is a guidance for setting this value.
Better not touch it. In Emacs-22 we introduced gc-cons-percentage which
provides the same benefit as increasing gc-cons-threshold but without
the drawbacks. And without having to fiddle with it.
I.e. I'd recommend users to remove any gc-cons-threshold settings from their
.emacs.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: setting an optimal value of gc-cons-threshold
2007-06-10 1:04 ` setting an optimal value of gc-cons-threshold Stefan Monnier
@ 2007-06-10 8:10 ` Leo
2007-06-10 10:14 ` Stephen Berman
1 sibling, 0 replies; 13+ messages in thread
From: Leo @ 2007-06-10 8:10 UTC (permalink / raw)
To: help-gnu-emacs
----- Stefan Monnier (2007-06-10) wrote:-----
>> I found quite a few people in their .emacs setting gc-cons-threshold to
>> a different value than the default 400000.
>
>> I wonder if there is a guidance for setting this value.
>
> Better not touch it. In Emacs-22 we introduced gc-cons-percentage which
> provides the same benefit as increasing gc-cons-threshold but without
> the drawbacks. And without having to fiddle with it.
>
> I.e. I'd recommend users to remove any gc-cons-threshold settings from their
> .emacs.
Many thanks.
--
Leo <sdl.web AT gmail.com> (GPG Key: 9283AA3F)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: setting an optimal value of gc-cons-threshold
2007-06-10 1:04 ` setting an optimal value of gc-cons-threshold Stefan Monnier
2007-06-10 8:10 ` Leo
@ 2007-06-10 10:14 ` Stephen Berman
2007-06-10 10:59 ` Leo
[not found] ` <mailman.1861.1181473317.32220.help-gnu-emacs@gnu.org>
1 sibling, 2 replies; 13+ messages in thread
From: Stephen Berman @ 2007-06-10 10:14 UTC (permalink / raw)
To: help-gnu-emacs
On Sat, 09 Jun 2007 21:04:01 -0400 Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>> I found quite a few people in their .emacs setting gc-cons-threshold to
>> a different value than the default 400000.
>
>> I wonder if there is a guidance for setting this value.
>
> Better not touch it. In Emacs-22 we introduced gc-cons-percentage which
> provides the same benefit as increasing gc-cons-threshold but without
> the drawbacks. And without having to fiddle with it.
>
> I.e. I'd recommend users to remove any gc-cons-threshold settings from their
> .emacs.
Perhaps this recommendation should be mentioned in the manual and
docstrings.
Steve Berman
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: setting an optimal value of gc-cons-threshold
2007-06-10 10:14 ` Stephen Berman
@ 2007-06-10 10:59 ` Leo
[not found] ` <mailman.1861.1181473317.32220.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 13+ messages in thread
From: Leo @ 2007-06-10 10:59 UTC (permalink / raw)
To: help-gnu-emacs
----- Stephen Berman (2007-06-10) wrote:-----
> On Sat, 09 Jun 2007 21:04:01 -0400 Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
>>> I found quite a few people in their .emacs setting gc-cons-threshold to
>>> a different value than the default 400000.
>>
>>> I wonder if there is a guidance for setting this value.
>>
>> Better not touch it. In Emacs-22 we introduced gc-cons-percentage which
>> provides the same benefit as increasing gc-cons-threshold but without
>> the drawbacks. And without having to fiddle with it.
>>
>> I.e. I'd recommend users to remove any gc-cons-threshold settings from their
>> .emacs.
>
> Perhaps this recommendation should be mentioned in the manual and
> docstrings.
I second this.
--
Leo <sdl.web AT gmail.com> (GPG Key: 9283AA3F)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: setting an optimal value of gc-cons-threshold
[not found] ` <mailman.1861.1181473317.32220.help-gnu-emacs@gnu.org>
@ 2007-06-12 14:20 ` Stefan Monnier
2007-06-12 15:00 ` Leo
[not found] ` <mailman.2024.1181660588.32220.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 13+ messages in thread
From: Stefan Monnier @ 2007-06-12 14:20 UTC (permalink / raw)
To: help-gnu-emacs
>> Perhaps this recommendation should be mentioned in the manual and
>> docstrings.
Not worth the trouble. It's not like such a setting is really harmful.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: setting an optimal value of gc-cons-threshold
2007-06-12 14:20 ` Stefan Monnier
@ 2007-06-12 15:00 ` Leo
[not found] ` <mailman.2024.1181660588.32220.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 13+ messages in thread
From: Leo @ 2007-06-12 15:00 UTC (permalink / raw)
To: help-gnu-emacs
----- Stefan Monnier (2007-06-12) wrote:-----
>>> Perhaps this recommendation should be mentioned in the manual and
>>> docstrings.
>
> Not worth the trouble. It's not like such a setting is really harmful.
>
>
> Stefan
I think it needs clarification.
There is a 'customization' link in the doc string which I guess suggests
user to customize the variable.
Regards,
--
Leo <sdl.web AT gmail.com> (GPG Key: 9283AA3F)
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: setting an optimal value of gc-cons-threshold
[not found] ` <mailman.2024.1181660588.32220.help-gnu-emacs@gnu.org>
@ 2007-06-12 19:52 ` Stefan Monnier
0 siblings, 0 replies; 13+ messages in thread
From: Stefan Monnier @ 2007-06-12 19:52 UTC (permalink / raw)
To: help-gnu-emacs
> There is a 'customization' link in the doc string which I guess suggests
> user to customize the variable.
It just indicates that it can be customized, which it can indeed.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: setting an optimal value of gc-cons-threshold
[not found] ` <u4pijcvph.fsf@gnu.org>
@ 2007-08-29 23:41 ` Xavier Maillard
2007-08-30 3:19 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Xavier Maillard @ 2007-08-29 23:41 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Hi Eli,
> I wonder if there is a guidance for setting this value.
>
> So do I. I remember increasing it after several Gnus crashes but
> I did it without reflexion on what value to put here :)
>
> If you manage to get a valid answer here, I am really interested
> in reading it.
The answer, based on experience in both increasing and decreasing the
value, is to use the default. It is tuned quite well to strike the
balance between too frequent GCs and ones that are far apart, but take
an annoyingly long time.
Although I think you are right, I remember having been advised to
do so after having encountered errors such as with
`max-specpdl-size' being too small/high (depending on the case).
Does it sound possible to you ?
Xavier
--
http://www.gnu.org
http://www.april.org
http://www.lolica.org
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: setting an optimal value of gc-cons-threshold
2007-08-29 23:41 ` Xavier Maillard
@ 2007-08-30 3:19 ` Eli Zaretskii
2007-09-03 1:00 ` Xavier Maillard
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2007-08-30 3:19 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Thu, 30 Aug 2007 01:41:59 +0200
> From: Xavier Maillard <xma@gnu.org>
> CC: help-gnu-emacs@gnu.org
> Jabber-ID: xma01@jabber.fr
>
> The answer, based on experience in both increasing and decreasing the
> value, is to use the default. It is tuned quite well to strike the
> balance between too frequent GCs and ones that are far apart, but take
> an annoyingly long time.
>
> Although I think you are right, I remember having been advised to
> do so
To do what?
> after having encountered errors such as with `max-specpdl-size'
> being too small/high (depending on the case). Does it sound
> possible to you ?
If you are asking whether it would make sense to change the GC limit
after max-specpdl-size errors, then no, I don't see any connection
between those two.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: setting an optimal value of gc-cons-threshold
2007-08-30 3:19 ` Eli Zaretskii
@ 2007-09-03 1:00 ` Xavier Maillard
0 siblings, 0 replies; 13+ messages in thread
From: Xavier Maillard @ 2007-09-03 1:00 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: help-gnu-emacs
Hi Eli,
> after having encountered errors such as with `max-specpdl-size'
> being too small/high (depending on the case). Does it sound
> possible to you ?
If you are asking whether it would make sense to change the GC limit
after max-specpdl-size errors, then no, I don't see any connection
between those two.
Then, I will revert such a change into my .emacs.
Thank you very much.
Xavier
--
http://www.gnu.org
http://www.april.org
http://www.lolica.org
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: setting an optimal value of gc-cons-threshold
[not found] ` <mailman.5435.1188280107.32220.help-gnu-emacs@gnu.org>
@ 2007-09-07 4:58 ` Stefan Monnier
2007-09-10 1:00 ` Xavier Maillard
0 siblings, 1 reply; 13+ messages in thread
From: Stefan Monnier @ 2007-09-07 4:58 UTC (permalink / raw)
To: help-gnu-emacs
> I found quite a few people in their .emacs setting gc-cons-threshold to
> a different value than the default 400000.
> I did.
> I wonder if there is a guidance for setting this value.
> So do I. I remember increasing it after several Gnus crashes but
> I did it without reflexion on what value to put here :)
There used to be some benefit to setting it higher for large Emacs sessions
(where GC can take a long time) since it would reduce the frequency of those
GCs. In Emacs-22, this is not needed any more because of the new
`gc-cons-percentage' variable which automatically causes the limit to grow
as the Emacs process grows, thus preserving a more or less constant
GC overhead.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: setting an optimal value of gc-cons-threshold
2007-09-07 4:58 ` Stefan Monnier
@ 2007-09-10 1:00 ` Xavier Maillard
0 siblings, 0 replies; 13+ messages in thread
From: Xavier Maillard @ 2007-09-10 1:00 UTC (permalink / raw)
To: Stefan Monnier; +Cc: help-gnu-emacs
> I found quite a few people in their .emacs setting gc-cons-threshold to
> a different value than the default 400000.
> I did.
> I wonder if there is a guidance for setting this value.
> So do I. I remember increasing it after several Gnus crashes but
> I did it without reflexion on what value to put here :)
There used to be some benefit to setting it higher for large Emacs sessions
(where GC can take a long time) since it would reduce the frequency of those
GCs. In Emacs-22, this is not needed any more because of the new
`gc-cons-percentage' variable which automatically causes the limit to grow
as the Emacs process grows, thus preserving a more or less constant
GC overhead.
Thank you Stefan for your clarifications.
Xavier
--
http://www.gnu.org
http://www.april.org
http://www.lolica.org
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2007-09-10 1:00 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.1498.1180794791.32220.help-gnu-emacs@gnu.org>
2007-06-10 1:04 ` setting an optimal value of gc-cons-threshold Stefan Monnier
2007-06-10 8:10 ` Leo
2007-06-10 10:14 ` Stephen Berman
2007-06-10 10:59 ` Leo
[not found] ` <mailman.1861.1181473317.32220.help-gnu-emacs@gnu.org>
2007-06-12 14:20 ` Stefan Monnier
2007-06-12 15:00 ` Leo
[not found] ` <mailman.2024.1181660588.32220.help-gnu-emacs@gnu.org>
2007-06-12 19:52 ` Stefan Monnier
2007-06-02 14:31 Leo
[not found] ` <200708280535.l7S5Zen9013844@localhost.localdomain>
[not found] ` <u4pijcvph.fsf@gnu.org>
2007-08-29 23:41 ` Xavier Maillard
2007-08-30 3:19 ` Eli Zaretskii
2007-09-03 1:00 ` Xavier Maillard
[not found] ` <mailman.5435.1188280107.32220.help-gnu-emacs@gnu.org>
2007-09-07 4:58 ` Stefan Monnier
2007-09-10 1:00 ` Xavier Maillard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).