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 3ACEA7FE53 for ; Wed, 9 Mar 2016 10:49:06 +0100 (CET) IronPort-PHdr: 9a23:px+aGxb7MEIS9FneOEq4erL/LSx+4OfEezUN459isYplN5qZpcS+bnLW6fgltlLVR4KTs6sC0LqJ9fC+EjRfqb+681k8M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJPK/jvHcaK1oLsh7/0q8OYO1oArQH+SI0xBS3+lR/WuMgSjNkqAYcK4TyNnEF1ff9Lz3hjP1OZkkW0zM6x+Jl+73YY4Kp5pIZoGJ/3dKUgTLFeEC9ucyVsvJWq5lH/Sl6s72AEX39esBNOGBPI6gqyCrT4qTP3rKxf0S+BJsDwVpg0Vi++qaxsTUm7pj0AMmsc+WXcjch1xIdSvBulpBU3l4vRaZ2cMPl3VqzYdNIeA2FGW5ACBGR6HoqgYt5XXKI6NuFCoty4/gNWoA== Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=mmatalka@gmail.com; spf=Pass smtp.mailfrom=mmatalka@gmail.com; spf=None smtp.helo=postmaster@mail-vk0-f54.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of mmatalka@gmail.com) identity=pra; client-ip=209.85.213.54; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of mmatalka@gmail.com designates 209.85.213.54 as permitted sender) identity=mailfrom; client-ip=209.85.213.54; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@gmail.com"; 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-vk0-f54.google.com) identity=helo; client-ip=209.85.213.54; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="postmaster@mail-vk0-f54.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CwAgDp8N9WizbVVdFcgm5qgSEGqEiHIIpxgWmGDwKBPwc5EwEBAQEBAQEBEAEBAQgLCwkfMYItghUBAQMBEhEdARsdAQMBCwYFBAc3AgIiAREBBQEcBhMIGodsAQMKCKI+gTE+MYs2gWqCV4VUChknDVGDeAEBAQEBAQQBAQEBAQEBARIBBQoEhgmEQoc6gToFjTyJc4s6gjeBZBaELohTjRwRHoEPIQGCNh6BUTsuiVMBAQE X-IPAS-Result: A0CwAgDp8N9WizbVVdFcgm5qgSEGqEiHIIpxgWmGDwKBPwc5EwEBAQEBAQEBEAEBAQgLCwkfMYItghUBAQMBEhEdARsdAQMBCwYFBAc3AgIiAREBBQEcBhMIGodsAQMKCKI+gTE+MYs2gWqCV4VUChknDVGDeAEBAQEBAQQBAQEBAQEBARIBBQoEhgmEQoc6gToFjTyJc4s6gjeBZBaELohTjRwRHoEPIQGCNh6BUTsuiVMBAQE X-IronPort-AV: E=Sophos;i="5.24,310,1454972400"; d="scan'208,217";a="206766341" Received: from mail-vk0-f54.google.com ([209.85.213.54]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 09 Mar 2016 10:49:05 +0100 Received: by mail-vk0-f54.google.com with SMTP id e6so49293702vkh.2 for ; Wed, 09 Mar 2016 01:49:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=RIB6EU9Z9TVR1lro52727n7Nq1VMe2uzW9ZQHh/eYlQ=; b=p2wDK16OxY1lqN1kJirGdbrmt/7DQYfZXEjBKdLPsztgtXVVT6XMGugi0wtg7owMYn HfI6FSoylnZTojkYRRpe82Uo2NdETmdK7kylCGfGjZczp8UkJQc1Nc21m/cTtr8E3OIq 0u0ECFfgiq+3orE5ZQSZk83an71mdltTxnNtcNucKCxQl/ydngmryBStd0t0Ly3WxFJ8 b/fPO/Ogl59UP+97fNR8Y7Jgx4YWuHn3pGtq6ODDoxq3qUmnAaN5f7CuG64JOoK3kxiK 3vaeTCrtgDJwFhAjSmvlTGyGH3Cl17MXKZDqebN2mV2uuHp0b3LNFUhWLK1oDgoTN7lz sK0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=RIB6EU9Z9TVR1lro52727n7Nq1VMe2uzW9ZQHh/eYlQ=; b=YyF3SzVuDkTxXyVliF0pcYljUNOkXzOA4ylwxl7EIwt9fTcW9LfPHCGrYrN7l/F0bH zi5O6jVIEDtYawJbcSOH5OUBAyTUs8MqhBqvftc3QjN8/8uAp2aMFqpWpHAkjw7WsCZT QOj2sI7DNHNfX1tZBNMEWS3OMSqy6+4/2OEeysLJ5lZrqtqXEZ+NH6Sd/nexLEEJEC51 j04wIdQcEY8XBKlfoVdMoAv91ElABb8W0xVwrnsVipzhD+TbFryTEWohBu93VdAao3Ho ReQ0gR+LcXRvoQGy8Q9d985+TiMVN4BKLBRgZMpIROwh/BlhDGp/L/81sfznBWa2/eDW caIg== X-Gm-Message-State: AD7BkJICdwJwgB0KjwY4oGp4TRWg7fuABNTeBa3KoT+s+owI7xP3EdLH1e37aXJeNOixG81lAooKEjnT5AxPRA== MIME-Version: 1.0 X-Received: by 10.31.14.195 with SMTP id 186mr30359254vko.2.1457516944411; Wed, 09 Mar 2016 01:49:04 -0800 (PST) Received: by 10.31.10.78 with HTTP; Wed, 9 Mar 2016 01:49:04 -0800 (PST) Received: by 10.31.10.78 with HTTP; Wed, 9 Mar 2016 01:49:04 -0800 (PST) In-Reply-To: <1CF03778-3645-47D9-A713-4341373801F3@HGST.com> References: <1CF03778-3645-47D9-A713-4341373801F3@HGST.com> Date: Wed, 9 Mar 2016 10:49:04 +0100 Message-ID: From: Malcolm Matalka To: Kasper Janssens Cc: caml-list Content-Type: multipart/alternative; boundary=001a1143d312b9d252052d9a9be7 Subject: Re: [Caml-list] Profiling ocaml with lwt --001a1143d312b9d252052d9a9be7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Generally I wrap external calls in something that gets that gets the wall time of an external service call and logs it somewhere. Den 9 mar 2016 9:54 fm skrev "Kasper Janssens" : > Hello, > > > I=E2=80=99m 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=E2=80=99t seem to indicate a problem neither. > > > The thing is, I think it=E2=80=99s a delay in one of the servers that the > application communicates with. The communication to those servers is done > asynchronously, through lwt (epoll). I suspect that is the reason why > delays in that communication don=E2=80=99t show up in the gprof result, b= ut I=E2=80=99m not > really sure. > > > Does anybody know of a way to profile lwt applications in a way that these > kinds of delays might show up so I know which backend system I have to > focus on? > > > Kasper > > *Western Digital Corporation (and its subsidiaries) E-mail Confidentiality > Notice & Disclaimer:* > > This e-mail and any files transmitted with it may contain confidential or > legally privileged information of WDC and/or its affiliates, and are > intended solely for the use of the individual or entity to which they are > addressed. If you are not the intended recipient, any disclosure, copying, > distribution or any action taken or omitted to be taken in reliance on it, > is prohibited. If you have received this e-mail in error, please notify t= he > sender immediately and delete the e-mail in its entirety from your system. > --001a1143d312b9d252052d9a9be7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Generally I wrap external calls in something that gets that = gets the wall time of an external service call and logs it somewhere.

Den 9 mar 2016 9:54 fm skrev "Kasper Jansse= ns" <Kasper.Janssens@hg= st.com>:

Hello,


I=E2=80=99m trying to profile an ocaml application that has a performance d= egradation of about 20 %, with quite some code changes between both version= s. I tried attaching perf and gprof to it, but to no real avail. Sure, ther= e are slight differences in the running time of functions in the gprof result, but nothing whatsoever that seems t= o explain that kind of delay.=C2=A0Perf doesn=E2=80=99t seem to indicate a = problem neither.


The thing is, I think it=E2=80=99s a delay in one of the servers that the a= pplication communicates with. The communication to those servers is done as= ynchronously, through lwt (epoll). I suspect that is the reason why delays = in that communication don=E2=80=99t show up in the gprof result, but I=E2=80=99m not really sure.


Does anybody know of a way to profile lwt applications in a way that these = kinds of delays might show up so I know which backend system I have to focu= s on?


Kasper

Western Digital Corporation (and its subsidiaries) E-mail = Confidentiality Notice & Disclaimer:

This e-mail and any files transmitted with it may contain conf= idential or legally privileged information of WDC and/or its affiliates, an= d are intended solely for the use of the individual or entity to which they= are addressed. If you are not the intended recipient, any disclosure, copy= ing, distribution or any action taken or omitted to be taken in reliance on= it, is prohibited. If you have received this e-mail in error, please notif= y the sender immediately and delete the e-mail in its entirety from your sy= stem.

--001a1143d312b9d252052d9a9be7--