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=3.5 required=5.0 tests=DNS_FROM_RFC_POST,HTML_00_10, 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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 7CA6FBB84 for ; Mon, 16 Feb 2009 16:15:12 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApQEAMMRmUnRVdrQmGdsb2JhbACCPjORMT8BAQEBAQgJDAcRrjSNRwEDAQOEGQaEMg X-IronPort-AV: E=Sophos;i="4.38,216,1233529200"; d="scan'208";a="35266289" Received: from mail-bw0-f208.google.com ([209.85.218.208]) by mail4-smtp-sop.national.inria.fr with ESMTP; 16 Feb 2009 16:15:12 +0100 Received: by bwz4 with SMTP id 4so3299884bwz.3 for ; Mon, 16 Feb 2009 07:15:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=Z5vy/GlXelFsKWZRZHgrgnQVJL4C8uX+fZcmPyR45DQ=; b=fMQvJZK8pWO/eosaP7KsKpO2+qHoKoI63s7FInosU1Ah+1iB5mgan2iDwDM+7ifMfC JVQD9lI67uHgNlCRyXwDYN01InBzKeHnq2mRonxWurFbzCsMECBZ8UZh4rlhS+N+QTN/ ke/pfTuIRSl+xuG1hFs9JLe+6MBml0wn8nHzU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=JV/rwvfoO0+73NTV/10Lm+oilMwxkpm16VeCrZ7GDXLLEsWtxr0QLHWvQH0hKv4LYQ E/As/YZvyfEJi1Dq855feu98ExzpIwAeUfy3TePH+8a12dxq6/bBVprEyRcnA5KNnf/D M5IV1IiHV7fPhcJUNC3zwzQkN/Io5IOSjqBkU= MIME-Version: 1.0 Sender: remidewitte@gmail.com Received: by 10.223.105.139 with SMTP id t11mr21065fao.11.1234797311392; Mon, 16 Feb 2009 07:15:11 -0800 (PST) Date: Mon, 16 Feb 2009 16:15:11 +0100 X-Google-Sender-Auth: 5118fc73683d728f Message-ID: <2184b2340902160715y1f935b5ehc0e6195b3f75b66b@mail.gmail.com> Subject: Threads performance issue. From: =?UTF-8?Q?R=C3=A9mi_Dewitte?= To: caml-list@yquem.inria.fr Content-Type: multipart/alternative; boundary=00504502b0791d7c5b04630aa761 X-Spam: no; 0.00; pcre:01 ocaml:01 pointers:01 pcre:01 ocaml:01 pointers:01 threads:01 threads:01 remi:01 remi:01 linking:02 linking:02 native:03 native:03 workaround:03 X-Attachments: cset="UTF-8" cset="UTF-8" --00504502b0791d7c5b04630aa761 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 takes 2.8s (native). I decided to make a threaded version and before any use of thread I realize= d that just linking no even using it to the threads library makes my first version of the program to run in 12s ! 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 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=C3=A9mi --00504502b0791d7c5b04630aa761 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 !

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 = 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=C3=A9mi
--00504502b0791d7c5b04630aa761--