[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Experience with guile + Boehm GC in SND (Re: New versions of rt-comp

From: Kjetil S. Matheussen
Subject: Re: Experience with guile + Boehm GC in SND (Re: New versions of rt-compiler.scm, rt-examples.scm and rt.tex
Date: Mon, 4 Jun 2007 20:00:07 +0200 (CEST)

On Mon, 4 Jun 2007, Ludovic Courtès wrote:


"Kjetil S. Matheussen" <address@hidden> writes:

libgc (v6.8) was compiled with the --enable-threads=posix only.

So `THREAD_LOCAL_ALLOC' was defined in your libgc build, right?


Running the benchmark program directly in guile gives no
difference. Both spent about 50 seconds running the test.

"Directly in Guile" means that you just run:

 $ ./pre-inst-guile gcbench.scm

Is that correct?

I have to compile snd against libguile and its header files, so I have two guile installed in two different directories, and set LD_LIBRARY_PATH to the right place before running. LD_LIBRARY_PATH is set automatically in
the script that starts snd, and for guile I think you use -rpath? :

ldd -r /usr/bin/guile =>  (0xffffe000) => /usr/lib/ (0xb7ed2000)

ldd -r /home/kjetil/site/bin/guile =>  (0xffffe000) => /home/kjetil/site/lib/ (0xb7ed8000) => /home/kjetil/site/lib/ (0xb7ea8000)

Inside snd is another matter:

          [1]   [2]      [3]
Guile gc  96mb  176mb    54s.
Boehm gc  99mb  107mb   118s.

[1] Memory before running test reported by top.
[2] Memory after running test reported by top
[3] Time to run test in seconds.

What does "inside snd" mean exactly?

Snd has its own REPLs which interacts with libguile.

Is snd multi-threaded?  Does it use `scm_without_guile ()' for instance
(e.g., when a thread blocks for I/O)?

No, not when snd is being run standalone.

Does the second run of `gcbench.scm' within Guile alone (no snd) show
similar performance behavior in the libgc case?  I.e.:

 $ guile-boehm --no-debug
 guile> (load "gcbench.scm")
 ;;; takes 50s. to complete
 guile> (load "gcbench.scm")
 ;;; takes 118s. to complete

No. But I have ran a series of benchmarks now:

(benchmark 20) in Guile:
Guile: 4.4mb / 277s / 149mb
Boehm: 4.4mb / 243s / 148mb


(benchmark 20) in Snd:
Guile: 96mb / 336s / 216mb
Boehm: 99mb / 442s / 257mb [1]


(benchmark) (benchmark), in Snd:
Guile: 96mb /  58s / 174mb / 59s / 174mb
Boehm: 99mb / 105s / 108mb / 99s / 116mb


(benchmark) (benchmark), in Guile:
Guile: 4.4mb / 50s / 78mb / 50s / 80mb
Boehm: 5.2mb / 74s / 55mb / 71s / 63mb [2]

[1] Memory usage flipped over from 182.2 to 256.6 right before the benchmark was finished.

[2] I ran another time, and got 75s. It seems like my previous result of 50s might have been ran with the wrong program.

For libgc, there are a few environment variables that might be
influential, e.g., `GC_MAXIMUM_HEAP_SIZE' (see `README.environment' from
libgc).  Likewise for Guile's GC, but they're undocumented AFAIK (grep
for `scm_getenv_int' in the `libguile' directory).

Any tip about what to try? I did some tweaking with it 7 years ago when I ported it to beos and worked on the amigaos port, but haven't touched it since.
reply via email to

[Prev in Thread] Current Thread [Next in Thread]