Thread overview
Re: GC performance: collection frequency
Sep 14, 2015
H. S. Teoh
Sep 15, 2015
Daniel Kozák
Sep 16, 2015
H. S. Teoh
Sep 17, 2015
H. S. Teoh
September 14, 2015
On Mon, Sep 14, 2015 at 07:19:53PM +0000, Jonathan M Davis via Digitalmars-d wrote: [...]
> Isn't there some amount of configuration that can currently be done via environment variables? Or was that just something that someone had done in one of the GC-related dconf talks that never made it into druntime proper?  It definitely seemed like a good idea in any case.
[...]

If it's undocumented, it's as good as not existing as far as end users are concerned. :-) I didn't see anything mentioned in core.memory's docs, nor in dlang.org's page on the GC, nor on the wiki's GC page.


T

-- 
Programming is not just an act of telling a computer what to do: it is also an act of telling other programmers what you wished the computer to do. Both are important, and the latter deserves care. -- Andrew Morton
September 15, 2015
http://dlang.org/changelog/2.067.0.html#gc-options

On Mon, 14 Sep 2015 12:25:06 -0700
"H. S. Teoh via Digitalmars-d" <digitalmars-d@puremagic.com> wrote:

> On Mon, Sep 14, 2015 at 07:19:53PM +0000, Jonathan M Davis via Digitalmars-d wrote: [...]
> > Isn't there some amount of configuration that can currently be done via environment variables? Or was that just something that someone had done in one of the GC-related dconf talks that never made it into druntime proper?  It definitely seemed like a good idea in any case.
> [...]
> 
> If it's undocumented, it's as good as not existing as far as end users are concerned. :-) I didn't see anything mentioned in core.memory's docs, nor in dlang.org's page on the GC, nor on the wiki's GC page.
> 
> 
> T
> 
September 16, 2015
On Tue, Sep 15, 2015 at 07:08:01AM +0200, Daniel Kozák via Digitalmars-d wrote:
> 
> http://dlang.org/changelog/2.067.0.html#gc-options
[...]

Wow that is obscure.  This really needs to go into the main docs so that it can actually be found...


T

-- 
People demand freedom of speech to make up for the freedom of thought which they avoid. -- Soren Aabye Kierkegaard (1813-1855)
September 17, 2015
On Thu, Sep 17, 2015 at 11:26:17AM +0300, Dmitry Olshansky via Digitalmars-d wrote:
> On 14-Sep-2015 21:47, H. S. Teoh via Digitalmars-d wrote:
> >Over in the d.learn forum, somebody posted a question about poor
> >performance in a text-parsing program. After a bit of profiling I
> >discovered that reducing GC collection frequency (i.e., GC.disable()
> >then manually call GC.collect() at some interval) improved program
> >performance by about 20%.
> >
> 
> One thing that any remotely production-quality GC does is analyze the result of collection with respect to minimal headroom - X % (typically 30-50%). If we freed Y % of heap where Y < X, then the GC should extend the heap so that it get within X % mark of free space in the extended heap.
[...]

Excellent idea. Sounds reasonably simple to implement, though I'm not exactly familiar with the current GC so I don't know if I'll be able to implement this myself...


T

-- 
Gone Chopin. Bach in a minuet.