From: Xavier Leroy <Xavier.Leroy@inria.fr>
To: Edgar Friendly <thelema314@gmail.com>
Cc: caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Problems spawning threads
Date: Tue, 18 Dec 2007 17:22:19 +0100 [thread overview]
Message-ID: <4767F3BB.2030309@inria.fr> (raw)
In-Reply-To: <4767582A.6020202@gmail.com>
> Interestingly enough, the administrator reports that the code works with
> size=16, but fails for size=17. Any ideas what's going on or how to fix
> it? Hopefully I'll have some confirmation soon that the (probably
> useless) ccopts and other optimization options don't affect the error.
>
> We also checked ulimit settings - his max user processes and stack size
> are both higher than mine. (-u 4095, -s 160000k)
Such big stacks could be the source of the problem. Assuming the
underlying POSIX thread implementation uses the "s" limit to determine
how much virtual memory space to allocate for the stack of each thread
(not an unreasonable assumption), 16 threads would eat up 2.5 Gb of
virtual address space, dangerously close to what's typically available
on a 32-bit architecture.
For this benchmark, you want much smaller stacks. Or better yet, run
it with "ocamlc -vmthread": for silly benchmarks like this, it will
run much faster than the ocamlopt-generated code that uses POSIX
threads.
FYI, my 64-bit Linux installation has no problems with size = 10000...
- Xavier Leroy
next prev parent reply other threads:[~2007-12-18 16:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-18 5:18 Edgar Friendly
2007-12-18 5:23 ` Edgar Friendly
2007-12-18 8:03 ` [Caml-list] " Michael Wohlwend
2007-12-18 10:59 ` Zheng Li
2007-12-18 15:57 ` [Caml-list] " Edgar Friendly
2007-12-18 17:05 ` Zheng Li
2007-12-18 17:40 ` [Caml-list] " Edgar Friendly
2007-12-18 16:22 ` Xavier Leroy [this message]
2007-12-18 17:04 ` [Caml-list] " Jon Harrop
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4767F3BB.2030309@inria.fr \
--to=xavier.leroy@inria.fr \
--cc=caml-list@yquem.inria.fr \
--cc=thelema314@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox