RE: [Caml-list] Re: Optimizing garbage collection

2010-11-23 Thread Jon Harrop
I would increase the default minor heap size to something closer to today's
common L2 cache sizes. But I see that Damien already did this for us:

 

http://caml.inria.fr/cgi-bin/viewcvs.cgi/ocaml/version/3.12/byterun/config.h
?rev=10787
http://caml.inria.fr/cgi-bin/viewcvs.cgi/ocaml/version/3.12/byterun/config.
h?rev=10787r1=10496r2=10787 r1=10496r2=10787

 

Cheers,

Jon.

 

From: Eray Ozkural [mailto:examach...@gmail.com] 
Sent: 22 November 2010 23:14
To: Jon Harrop
Cc: Sylvain Le Gall; caml-l...@inria.fr
Subject: Re: [Caml-list] Re: Optimizing garbage collection

 

On Mon, Nov 22, 2010 at 11:14 PM, Jon Harrop
jonathandeanhar...@googlemail.com wrote:

What happens if you just increase the default size?

  

 

Well we don't want to be a memory hog like Java do we? It's something that
kind of depends on the app, what would you set it to?

Cheers,

 

-- 
Eray Ozkural, PhD candidate.  Comp. Sci. Dept., Bilkent University, Ankara
http://groups.yahoo.com/group/ai-philosophy
http://myspace.com/arizanesil http://myspace.com/malfunct

___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Re: Optimizing garbage collection

2010-11-22 Thread Eray Ozkural
On Mon, Nov 22, 2010 at 6:42 PM, Sylvain Le Gall sylv...@le-gall.netwrote:

 On 22-11-2010, Damien Doligez damien.doli...@inria.fr wrote:
 
  On 2010-11-21, at 20:26, Eray Ozkural wrote:
 
  I've been thinking whether some kind of doubling strategy would work for
 the minor heap size. What do you think?
 
  Sounds like an interesting idea, but what heuristic would you use?
  When everything is smooth, the running time decreases something like
  exponentially with the minor heap size, so you'd always want to
  increase the size.  How do you tell when to stop?  And then, if the
  program is not behaving uniformly, when do you decide to reduce
  the size?
 

 How do you tell when to stop?
 -

 Maybe you can stop when you reach (the size of the L2/L3 cache of the
 processor) / number of core.

 Both information are quite straight to read from /proc/cpuinfo.



Yeah that's what I had in mind, determine a kind of sensible upper bound to
grow to. Cache size makes some sense, though I think as recently mentioned
working set size is relevant. If the garbage collector could deduce that
it could be used, the other suggestion is also sensible. You could also set
it to something like 1/4 of physical RAM. That kind of logic is used in some
out-of-core data mining algorithms.

The objective here is to amortize the cost of copying until the working set
size is reached, otherwise there will be disk thrashing anyway!

Best,

-- 
Eray Ozkural, PhD candidate.  Comp. Sci. Dept., Bilkent University, Ankara
http://groups.yahoo.com/group/ai-philosophy
http://myspace.com/arizanesil http://myspace.com/malfunct
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


RE: [Caml-list] Re: Optimizing garbage collection

2010-11-22 Thread Jon Harrop
What happens if you just increase the default size?


___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


Re: [Caml-list] Re: Optimizing garbage collection

2010-11-22 Thread Eray Ozkural
On Mon, Nov 22, 2010 at 11:14 PM, Jon Harrop 
jonathandeanhar...@googlemail.com wrote:

 What happens if you just increase the default size?



Well we don't want to be a memory hog like Java do we? It's something that
kind of depends on the app, what would you set it to?

Cheers,

-- 
Eray Ozkural, PhD candidate.  Comp. Sci. Dept., Bilkent University, Ankara
http://groups.yahoo.com/group/ai-philosophy
http://myspace.com/arizanesil http://myspace.com/malfunct
___
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs