Re: [Caml-list] Optimizing garbage collection

2010-11-23 Thread Christophe Raffalli
Le 23/11/2010 14:40, Christophe Raffalli a écrit : Hello, May be running a minimisation algorithm to minimize (promoted_words per minor collection / minor_heap_size) Could be good ? This was stupid has it converges toward zero when we increase minor_heap_size. However, the following

Re: [Caml-list] Optimizing garbage collection

2010-11-22 Thread Damien Doligez
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

Re: [Caml-list] Optimizing garbage collection

2010-11-22 Thread Mauricio Fernandez
On Mon, Nov 22, 2010 at 04:10:49PM +0100, Damien Doligez 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

Re: [Caml-list] Optimizing garbage collection

2010-11-22 Thread John Carr
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? I don't

Re: [Caml-list] Optimizing garbage collection

2010-11-21 Thread Alexandre Pilkiewicz
Hi 2010/11/20 Eray Ozkural examach...@gmail.com: Yes, the default minor heap size was indeed too low, I've been trying to set it to a higher value, now testing with the OCAMLRUNPARAM settings you recommended. It did result in some speedup, but not an awful lot, it's important to profile it as

Re: [Caml-list] Optimizing garbage collection

2010-11-19 Thread Michael Ekstrand
On 11/18/2010 09:51 AM, Eray Ozkural wrote: A program I wrote constructs a lot of small lists, and strings and discards them. It's a search algorithm. I profiled this code and saw that garbage collection takes significant time. In C++, we can write custom allocators to optimize the data

Re: [Caml-list] Optimizing garbage collection

2010-11-19 Thread Eray Ozkural
Thanks a lot for the suggestions Michael. Much appreciated. 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 ___

Re: [Caml-list] Optimizing garbage collection

2010-11-19 Thread Eray Ozkural
The program I am testing it on is basically a DFS algorithm so it doesn't use much heap memory really. Just a lot of transient objects. Looking at the top the RSIZE looks to be not over 11M under OSX. Yes, the default minor heap size was indeed too low, I've been trying to set it to a higher

[Caml-list] Optimizing garbage collection

2010-11-18 Thread Eray Ozkural
A program I wrote constructs a lot of small lists, and strings and discards them. It's a search algorithm. I profiled this code and saw that garbage collection takes significant time. In C++, we can write custom allocators to optimize the data structures that cause such slowdowns. Any recommended