From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id pB894xpL013638 for ; Thu, 8 Dec 2011 10:04:59 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvgCAFV94E5ZELGagWdsb2JhbABAAw6aXYdkAYg2AQEWJiWBcgEBBAF5BQsLBBQuVwYTiAcCBrcCiB6COmMElGuRbzc X-IronPort-AV: E=Sophos;i="4.71,319,1320620400"; d="scan'208,217";a="122545558" Received: from recoil.dh.bytemark.co.uk (HELO dark.recoil.org) ([89.16.177.154]) by mail4-smtp-sop.national.inria.fr with SMTP; 08 Dec 2011 10:04:53 +0100 Received: (qmail 3652 invoked by uid 634); 8 Dec 2011 09:04:53 -0000 X-Spam-Level: * X-Spam-Check-By: dark.recoil.org Received: from cpc7-cmbg14-2-0-cust238.5-4.cable.virginmedia.com (HELO [192.168.1.33]) (86.30.244.239) (smtp-auth username remote@recoil.org, mechanism cram-md5) by dark.recoil.org (qpsmtpd/0.83) with ESMTPA; Thu, 08 Dec 2011 09:04:52 +0000 Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: multipart/alternative; boundary="Apple-Mail=_B369989A-A7DA-4099-89DB-214B3B5874C0" From: Anil Madhavapeddy In-Reply-To: Date: Thu, 8 Dec 2011 09:04:50 +0000 Cc: =?iso-8859-1?Q?St=E9phane_Glondu?= , caml users Message-Id: <18AE17A3-A732-4F7D-954E-58C7A1D538B4@recoil.org> References: <4EE05363.8080102@glondu.net> To: William Le Ferrand X-Mailer: Apple Mail (2.1251.1) X-Virus-Checked: Checked by ClamAV on dark.recoil.org Subject: Re: [Caml-list] Storing ocaml values outside ocaml's heap --Apple-Mail=_B369989A-A7DA-4099-89DB-214B3B5874C0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 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 sca= nned by the GC. Anil On 8 Dec 2011, at 08:19, William Le Ferrand wrote: > hi Stephane >=20 > 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 ..=20 >=20 >=20 > On Wed, Dec 7, 2011 at 10:04 PM, St=E9phane Glondu wro= te: > Le 08/12/2011 05:35, William Le Ferrand a =E9crit : > > 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). >=20 > Have you heard of the ancient [1] library? >=20 > [1] http://git.annexia.org/?p=3Docaml-ancient.git;a=3Dsummary >=20 >=20 > Cheers, >=20 > -- > St=E9phane >=20 >=20 >=20 >=20 > --=20 > William Le Ferrand >=20 > Mobile : (+1) (415) 683-1484 > Web : http://williamleferrand.github.com/ >=20 --Apple-Mail=_B369989A-A7DA-4099-89DB-214B3B5874C0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 I think Ancient is exactly= what you're looking for.

Just disable swap (which you s= hould 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 Ferra= nd wrote:

hi Stephane

Yes, but it's not exactly what we're l= ooking for : we plan to access the data at a (very) high rate, so swapping/= unswapping would probably kill the performance .. 


<= div class=3D"gmail_quote"> On Wed, Dec 7, 2011 at 10:04 PM, St=E9phane Glondu <steph@glondu.net>= ; wrote:
Le 08/12/2011 05:35, William Le Ferrand a = =E9crit :
> 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://git.annexia.org/?p=3Docaml-ancient.git;a=3Dsummary<= /a>


Cheers,

--
St=E9phane




--
Willi= am Le Ferrand



= --Apple-Mail=_B369989A-A7DA-4099-89DB-214B3B5874C0--