From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA04214; Sat, 5 Apr 2003 22:21:39 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA04555 for caml-list@pauillac.inria.fr; Sat, 5 Apr 2003 22:21:38 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA12863 for ; Fri, 4 Apr 2003 22:52:19 +0200 (MET DST) Received: from postfix4-1.free.fr (postfix4-1.free.fr [213.228.0.62]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h34KqI900160 for ; Fri, 4 Apr 2003 22:52:19 +0200 (MET DST) Received: from univ-savoie.fr (grenoble-1-a7-62-147-74-218.dial.proxad.net [62.147.74.218]) by postfix4-1.free.fr (Postfix) with ESMTP id 8E4441A0F3; Fri, 4 Apr 2003 22:52:15 +0200 (CEST) Message-ID: <3E8CA29F.5070303@univ-savoie.fr> Date: Thu, 03 Apr 2003 23:07:43 +0200 From: Christophe Raffalli User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Shivkumar Chandrasekaran Cc: caml-list@inria.fr Subject: Re: [Caml-list] Slow GC problem References: <3C821F52-66D5-11D7-A265-000393942C76@ece.ucsb.edu> In-Reply-To: <3C821F52-66D5-11D7-A265-000393942C76@ece.ucsb.edu> X-Enigmail-Version: 0.73.1.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigE7A292C89942F72ADF175343" Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; raffalli:01 univ-savoie:01 caml-list:01 openpgp:01 2440:01 3156:01 shivkumar:01 solver:01 slower:01 vectors:01 chunks:01 847:99 --shiv--:01 bug:01 faq:01 X-Attachments: type="application/pgp-signature" X-Spam: no; 0.00; raffalli:01 univ-savoie:01 caml-list:01 openpgp:01 2440:01 3156:01 shivkumar:01 solver:01 slower:01 vectors:01 chunks:01 847:99 --shiv--:01 bug:01 faq:01 X-Attachments: type="application/pgp-signature" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE7A292C89942F72ADF175343 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Shivkumar Chandrasekaran wrote: > I have a gc efficiency problem for which I require some advice. I have > read both the O'Reilly book and the manual on gc. > > I am implementing a fast direct matrix solver for 2D PDEs. So it uses > the Bigarray module a lot. I have two versions of my algorithm. On is an > in-core algorithm and the other is the same solver, except that it is > out-of-core (most of the matrices are stored in disk files). > Unfortunately the out-of-core solver is *faster* than the in-core > solver for the identical problem! I was expecting the out-of-core solver > to be 10 times slower. If your in-core version is swapping, your out-core is faster because you optimize yourself the disk access compared to the swapping which knows nothing about your data and algorithm. Moreover, at GC time all the matrices/vectors need to be accessed and this produces more swapping ... I am concluding that gc is to blame. Below I give > the gc stats just before and after the solver routine is called in the > in-core solver: > > "Just before" "Just after" > minor_words: 46243376 139259767 > promoted_words: 928267 2595523 > major_words: 2883087 39489766 > minor_collections: 1412 4591 > major_collections: 18 52 > heap_words: 2150400 1044480 > heap_chunks: 35 17 > top_heap_words: 2150400 5038080 > live_words: 1842373 840037 > live_blocks: 253926 116816 > free_words: 307180 204440 > free_blocks: 47368 17 > largest_free: 10928 61440 > fragments: 847 3 > compactions: 0 2 > > I tried changing some parameters using Gc.set but it did not make a > significant difference. Does anybody see any obvious gc problems from > the above data? Thanks, > > --shiv-- > > > PS: I wrote the out-of-core solver in just 3 days once the in-core > solver was done, all in O'Caml. This would have have taken much longer > in Fortran/C. Thanks to the O'Caml team. > > ------------------- > To unsubscribe, mail caml-list-request@inria.fr Archives: > http://caml.inria.fr > Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: > http://caml.inria.fr/FAQ/ > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners -- Christophe Raffalli Université de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tél: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution can check this signature --------------------------------------------- --------------enigE7A292C89942F72ADF175343 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+jKKlSQDyWB/+xBwRAkTxAJ9S1p49HeUxkF0oH8dIl1VG/+gl5ACeMr9a AfqK9ytxvaVtzsrYdkzwUgs= =UCtz -----END PGP SIGNATURE----- --------------enigE7A292C89942F72ADF175343-- ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners