From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id CEBA07F026 for ; Thu, 10 Mar 2016 08:41:46 +0100 (CET) IronPort-PHdr: 9a23:F0WUQhMQeIzJONcPU4Al6mtUPXoX/o7sNwtQ0KIMzox0KPTyrarrMEGX3/hxlliBBdydsKIbzbqJ+Pm5BSQp2tWojjMrSNR0TRgLiMEbzUQLIfWuLgnFFsPsdDEwB89YVVVorDmROElRH9viNRWJ+iXhpQAbFhi3DwdpPOO9QteU1JTokbDtsMSKP01hv3mUX/BbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv+YJa6jxfrw5QLpEF3xmdjltvIy4/SXEGCiG/WMRSC00mxxTGAXD91mufZ7qqibg8Mh03jKBMMvtZbA7Qijk5KBuHkzGkiACYgKn6v/UwuF8k6Nd6EasqwN+xc3RZMSSP/N7eovQYdQAQmkHWMtNAX8SSrigZpcCWrJSdd1TqJPw8h5X9UOz Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=edwin+ml-ocaml@etorok.net; spf=Pass smtp.mailfrom=edwin+ml-ocaml@etorok.net; spf=None smtp.helo=postmaster@mail.etorok.net Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of edwin+ml-ocaml@etorok.net) identity=pra; client-ip=62.210.252.135; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="edwin+ml-ocaml@etorok.net"; x-sender="edwin+ml-ocaml@etorok.net"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of edwin+ml-ocaml@etorok.net designates 62.210.252.135 as permitted sender) identity=mailfrom; client-ip=62.210.252.135; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="edwin+ml-ocaml@etorok.net"; x-sender="edwin+ml-ocaml@etorok.net"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail.etorok.net) identity=helo; client-ip=62.210.252.135; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="edwin+ml-ocaml@etorok.net"; x-sender="postmaster@mail.etorok.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BJBwCuI+FW/4f80j5egztSbYJ1t3CBbSOFaQECAoE4ORMBAQEBAQEBAWMngi2CFQEBBAwXBAsBDRUjAQEBDgkCGAICBRMDCAMCAgkDAgECATQRBg0GAgKIJAqQKZwwZ4RGil0BIgEGfIlehCRCglSBOpdBhWWIDoIvjE+OZCIBP4NmOi6IGYE6AQEB X-IPAS-Result: A0BJBwCuI+FW/4f80j5egztSbYJ1t3CBbSOFaQECAoE4ORMBAQEBAQEBAWMngi2CFQEBBAwXBAsBDRUjAQEBDgkCGAICBRMDCAMCAgkDAgECATQRBg0GAgKIJAqQKZwwZ4RGil0BIgEGfIlehCRCglSBOpdBhWWIDoIvjE+OZCIBP4NmOi6IGYE6AQEB X-IronPort-AV: E=Sophos;i="5.24,314,1454972400"; d="scan'208";a="206950122" Received: from mail.etorok.net ([62.210.252.135]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Mar 2016 08:41:46 +0100 Received: by mail.etorok.net (OpenSMTPD) with ESMTP id d815f08f; Thu, 10 Mar 2016 07:41:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=simple; d=etorok.net; h=subject:to :references:cc:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; s=ml; bh=rJoTT8LeQApuoM Wp4RSaG8/WjMw=; b=hjuWNLCd16cz2Z5eHPCNjpEvougZL2/RRHkuHPMlbR4Nd5 zKAmxKvK6tRq7xval6xLeKVopjQDn+j1nPyYX9cMaPbvJy4ew56c03+P9FY/Zhm5 RSt4jkwtlqqdgL1we30ASDJowsZv4EXb49ft2mQufvpBNYc++TpiPd1/EIcAM= DomainKey-Signature: a=rsa-sha1; c=simple; d=etorok.net; h=subject:to :references:cc:from:message-id:date:mime-version:in-reply-to :content-type:content-transfer-encoding; q=dns; s=ml; b=X1oEZNjE MtEQyXz8K4RsEb/m5fdtvbTVoZS8RjiZkTNWENsdOMpyk7lClZb53IV4k17aC4a2 e+oW+3LAhGJoD0qGrV1BGpaIUErxadw7/e2+dqgDn07z0bTe+OEhfx7zt3UgEFwr NJueyMh6ez8dUggi+FQziigzTrESnWF/2Lo= Received: by mail.etorok.net (OpenSMTPD) with ESMTPSA id 09ca154f TLS version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO; Thu, 10 Mar 2016 07:41:45 +0000 (UTC) To: Kasper Janssens References: <1CF03778-3645-47D9-A713-4341373801F3@HGST.com> Cc: caml-list@inria.fr From: =?UTF-8?B?VMO2csO2ayBFZHdpbg==?= X-Enigmail-Draft-Status: N1110 Message-ID: <56E12538.6040003@etorok.net> Date: Thu, 10 Mar 2016 09:41:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] Profiling ocaml with lwt On 03/09/2016 11:57, Kasper Janssens wrote: > Den 9 mar 2016 9:54 fm skrev "Kasper Janssens" >: > > Hello, > > > I’m trying to profile an ocaml application that has a performance degradation of about 20 %, with quite some code changes between both versions. I tried attaching perf and gprof to it, but to no real avail. Sure, there are slight differences in the running time of functions in the gprof result, but nothing whatsoever that seems to explain that kind of delay. Perf doesn’t seem to indicate a problem neither. > > > The thing is, I think it’s a delay in one of the servers that the application communicates with. Is that communication done over a TCP/UDP socket? You could use wireshark and see if you spot anything (e.g. too many SSL handshakes -> application would benefit from persistent connections, etc.) Depending on the complexity of your application you may try to use a branch of Lwt that reports more tracing information, although this would likely require manual annotations to produce useful output: http://roscidus.com/blog/blog/2014/10/27/visualising-an-asynchronous-monad/ I usually just wrap+log calls and use strace though, as already mentioned in this thread. Best regards, -- Edwin Török | Co-founder and Lead Developer Skylable open-source object storage: reliable, fast, secure http://www.skylable.com