From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.0 required=5.0 tests=AWL,DNS_FROM_RFC_POST, HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 601AEBB84 for ; Mon, 16 Feb 2009 17:47:29 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsIDAMsnmUnRVd0Vimdsb2JhbACCQi+KHIcVPwEBAQoJDAcPBa1KCIEAjVQBAwEDhBkGg2s X-IronPort-AV: E=Sophos;i="4.38,217,1233529200"; d="scan'208";a="24159694" Received: from mail-qy0-f21.google.com ([209.85.221.21]) by mail1-smtp-roc.national.inria.fr with ESMTP; 16 Feb 2009 17:47:28 +0100 Received: by qyk14 with SMTP id 14so2968043qyk.3 for ; Mon, 16 Feb 2009 08:47:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=7fbqSaD8ufnyFcsxVz8tV2Aj/ZE06C7F3WRqNY00Tt0=; b=la7M97RUAwBCYL5HOmy/GsHdTvtGvvKnluRT2rTaEIUNB+L5BA6LN4tC365NEdc/Ck iPesi4OCrJd4MRG8TdFVBKd9KxhlYvkfifTe2vNHMJ4xThxuctPnk/ktAQH+KPPUwMX/ ysFMReTt+XB2Pq1ZHqDaAa5In23tyxTzMZaFc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=eWjKx6PLCtFs2yticHMYgmXrgnTTpNLuXH5qFELtj3Apf7HP2p3b4wU/tY4Qob0v97 AAv5F6EjatvnOKD+DqmZLmbFthDAlO4Zfm3m7SH+K0bOFCIyp2w+YqmnCWnmKjI+LxM0 J1h4yMoJpXQGHcgP+8FnD/JYc6N4JJnpTDLAc= MIME-Version: 1.0 Received: by 10.229.79.17 with SMTP id n17mr442695qck.82.1234802847798; Mon, 16 Feb 2009 08:47:27 -0800 (PST) Reply-To: yminsky@gmail.com In-Reply-To: <2184b2340902160715y1f935b5ehc0e6195b3f75b66b@mail.gmail.com> References: <2184b2340902160715y1f935b5ehc0e6195b3f75b66b@mail.gmail.com> Date: Mon, 16 Feb 2009 11:47:27 -0500 Message-ID: <891bd3390902160847p25ad3bf1pe59da620dfc667f2@mail.gmail.com> Subject: Re: [Caml-list] Threads performance issue. From: Yaron Minsky To: =?ISO-8859-1?Q?R=E9mi_Dewitte?= Cc: caml-list@yquem.inria.fr Content-Type: multipart/alternative; boundary=0016364ee4a81c559304630bf1a7 X-Spam: no; 0.00; yaron:01 minsky:01 yminsky:01 pcre:01 ocaml:01 pointers:01 beginner's:01 ocaml:01 bug:01 pcre:01 pointers:01 beginner's:01 bug:01 2009:98 2009:98 --0016364ee4a81c559304630bf1a7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2009/2/16 R=E9mi Dewitte > Hello, > > I would like to read two files in two different threads. > > I have made a first version reading the first then the second and it take= s > 2.8s (native). > > I decided to make a threaded version and before any use of thread I > realized that just linking no even using it to the threads library makes = my > first version of the program to run in 12s ! Do you have a short benchmark you can post? The idea that the thread-overhead would make a difference like that, particularly for IO-boun= d code (which I'm guessing this is) is pretty surprising. y > > I use pcre, extlib, csv libraries as well. > > I guess it might come from GC slowing down thinks here, doesn't it ? Wher= e > can it come from otherwise ? Is there a workaround or something I should > know ? > > Can ocaml use multiple cores ? > > Do you have few pointers on libraries to make parallel I/Os ? > > Thanks, > R=E9mi > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > > --0016364ee4a81c559304630bf1a7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2009/2/16 R=E9mi Dewitte <remi@gide.net>
Hello,

I would like to read two files in two different threads.
<= br>I have made a first version reading the first then the second and it tak= es 2.8s (native).

I decided to make a threaded version and before an= y use of thread I realized that just linking no even using it to the thread= s library makes my first version of the program to run in 12s !

Do you have a short benchmark you can post?  The idea that th= e thread-overhead would make a difference like that, particularly for IO-bo= und code (which I'm guessing this is) is pretty surprising.

y  

I= use pcre, extlib, csv libraries as well.

I guess it might come from= GC slowing down thinks here, doesn't it ? Where can it come from other= wise ? Is there a workaround or something I should know ?

Can ocaml use multiple cores ?

Do you have few pointers on libraries= to make parallel I/Os ?

Thanks,
R=E9mi
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.in= ria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


--0016364ee4a81c559304630bf1a7--