Re: [Caml-list] Storing ocaml values outside ocaml's heap

2011-12-08 Thread Goswin von Brederlow
oliver writes: > On Thu, Dec 08, 2011 at 09:04:50AM +, Anil Madhavapeddy wrote: >> I think Ancient is exactly what you're looking for. >> >> Just disable swap (which you should do anyway on a big modern server), and it >> will let you keep in-memory, out-of-heap OCaml values that don't get s

Re: [Caml-list] Storing ocaml values outside ocaml's heap

2011-12-08 Thread oliver
On Thu, Dec 08, 2011 at 09:04:50AM +, Anil Madhavapeddy wrote: > I think Ancient is exactly what you're looking for. > > Just disable swap (which you should do anyway on a big modern server), and it > will let you keep in-memory, out-of-heap OCaml values that don't get scanned > by > the GC.

Re: [Caml-list] Storing ocaml values outside ocaml's heap

2011-12-08 Thread Goswin von Brederlow
William Le Ferrand writes: > Dear list,  > > We are building a cache in ocaml and we're wondering if it would make sense to > store ocaml values outside the reach of the gc. (gc on a 20GB cache hangs the > process for a second or so). > > To run some experiments, we wrote a small library (https:/

Re: [Caml-list] Storing ocaml values outside ocaml's heap

2011-12-08 Thread Gaius Hammond
: William Le Ferrand Cc: caml users Subject: Re: [Caml-list] Storing ocaml values outside ocaml's heap Le 08/12/2011 05:35, William Le Ferrand a écrit : > We are building a cache in ocaml and we're wondering if it would make > sense to store ocaml values outside the reach of the g

Re: [Caml-list] Storing ocaml values outside ocaml's heap

2011-12-08 Thread Anders Fugmann
On 12/08/2011 09:56 AM, William Le Ferrand wrote: Hi Anders! How're you doing ? Thanks for the suggestion. We actually have a solution in production right now (www.besport.com ) that relies on netshm. Unfortunately, the serialization / deserialization is killing the perf

Re: [Caml-list] Storing ocaml values outside ocaml's heap

2011-12-08 Thread Gerd Stolpmann
Hi William, this can be made working, and there is already a lot of support in Ocamlnet (module Netsys_mem, espeically init_value). I'm now using this all the time for populating shared memory blocks (which need to be outside the ocaml heap) with normal ocaml values. In Ocamlnet I'm using simply

Re: [Caml-list] Storing ocaml values outside ocaml's heap

2011-12-08 Thread William Le Ferrand
Ok thanks. I'll have a very close look at it very soon and hopefully integrate it on www.besport.com backend then :) Many thanks to all of you Best William On Thu, Dec 8, 2011 at 1:04 AM, Anil Madhavapeddy wrote: > I think Ancient is exactly what you're looking for. > > Just disable swap (whi

Re: [Caml-list] Storing ocaml values outside ocaml's heap

2011-12-08 Thread Anil Madhavapeddy
I think Ancient is exactly what you're looking for. Just disable swap (which you should do anyway on a big modern server), and it will let you keep in-memory, out-of-heap OCaml values that don't get scanned by the GC. Anil On 8 Dec 2011, at 08:19, William Le Ferrand wrote: > hi Stephane > >

Re: [Caml-list] Storing ocaml values outside ocaml's heap

2011-12-08 Thread William Le Ferrand
Hi Anders! How're you doing ? Thanks for the suggestion. We actually have a solution in production right now (www.besport.com) that relies on netshm. Unfortunately, the serialization / deserialization is killing the performance : about 200ms for a full request against 7ms for a simple Hashtbl loo

Re: [Caml-list] Storing ocaml values outside ocaml's heap

2011-12-08 Thread Anders Fugmann
Hi William, Have you tried netshm from ocamlnet library? It seems that it would fit your requirements by placing memory outside the reach of the garbage collector. Using netshm would require a lot of serialization / deserilization and memory copying, which might not be that efficient if you

Re: [Caml-list] Storing ocaml values outside ocaml's heap

2011-12-08 Thread William Le Ferrand
hi Stephane Yes, but it's not exactly what we're looking for : we plan to access the data at a (very) high rate, so swapping/unswapping would probably kill the performance .. On Wed, Dec 7, 2011 at 10:04 PM, Stéphane Glondu wrote: > Le 08/12/2011 05:35, William Le Ferrand a écrit : > > We are

Re: [Caml-list] Storing ocaml values outside ocaml's heap

2011-12-07 Thread Stéphane Glondu
Le 08/12/2011 05:35, William Le Ferrand a écrit : > We are building a cache in ocaml and we're wondering if it would make > sense to store ocaml values outside the reach of the gc. (gc on a 20GB > cache hangs the process for a second or so). Have you heard of the ancient [1] library? [1] http://g

[Caml-list] Storing ocaml values outside ocaml's heap

2011-12-07 Thread William Le Ferrand
Dear list, We are building a cache in ocaml and we're wondering if it would make sense to store ocaml values outside the reach of the gc. (gc on a 20GB cache hangs the process for a second or so). To run some experiments, we wrote a small library ( https://github.com/besport/ocaml-everlasting) th