Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 72E44200CB0 for ; Fri, 23 Jun 2017 20:43:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 71B7C160BE5; Fri, 23 Jun 2017 18:43:15 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B8929160BE2 for ; Fri, 23 Jun 2017 20:43:14 +0200 (CEST) Received: (qmail 99014 invoked by uid 500); 23 Jun 2017 18:43:13 -0000 Mailing-List: contact dev-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list dev@camel.apache.org Received: (qmail 98986 invoked by uid 99); 23 Jun 2017 18:43:11 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Jun 2017 18:43:11 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 9042DC002D for ; Fri, 23 Jun 2017 18:43:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.101 X-Spam-Level: X-Spam-Status: No, score=-0.101 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id xGyt1fEVvnjr for ; Fri, 23 Jun 2017 18:43:07 +0000 (UTC) Received: from mail-qk0-f179.google.com (mail-qk0-f179.google.com [209.85.220.179]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 18E145FC12 for ; Fri, 23 Jun 2017 18:43:07 +0000 (UTC) Received: by mail-qk0-f179.google.com with SMTP id 16so42432646qkg.2 for ; Fri, 23 Jun 2017 11:43:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=SfyNBBZcl3qHkhB17C8emKyJ+/qpXLYGQCNxWawuMgw=; b=hGceWnRHQ8Vyf5OLhXCjlcB05uLxmCEQcbBpZa73nM64H8HnaIjJuI0cJAkSM0Vetw t2Zy0D7mcyQu9OaohaiIF5jAi1FGvVCbo/SA2RA3aLOWo2K5FRxZZwYqbdE/w3WEFvbR 7cdBwq/jRF+MYJd1eyOlqNkNm5gwO1rftlLTioOuCyAfa+gdtp35kBfPr3dkzwR3/nck MrZx5Y/WPmW6k9r6ubXH7N0iUfCOjAgvdYVF6I0dO7KZ3nb/1dbAM0I95G8sO6LbKZZx dcgwUkGldDHy69+ddM+V6LVteGxVocFN3j4Q+rxSvPZBNnbVWmgIpMUqJxewWFLLTAnT +N/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=SfyNBBZcl3qHkhB17C8emKyJ+/qpXLYGQCNxWawuMgw=; b=jClkaZEaf6o6IAVP7FDytqr5Rr9jiK7UCi4BeyAmZjd7plpW4twqkE8j3nWmx2ewtk mQ31xB8pTMoADF5IQU1E34hW/YFX31AyatnJNTa3ThAfeFpKuJLYcSJ9zLGAfzAc9Rxd YuvUm76XWrly59Oice8bCniMPInSbAPolX/aOPZjzRRSpLfZkgFTsyz6TrQsl3A3p5Se P501bOVtW/bOvhCXNSzEA1lEeNJcJobQbpRMrJqF0YIkH/8h2PWB1PXcgw/fW02/wb+V mTr/bdBVCNojlwl+1UmvxIQWxMNJIs6yb2ePHecJUZQUiLv7+QmKnkTKkUeLU6WPxzdS oIOQ== X-Gm-Message-State: AKS2vOwZ4SXTB4Bs1/Zq6BacHNUeSxAxKvqr3DK3s2WNqg1qZ7oJbvgQ F/z/u3/dEnLEkmv1LA0bK6qJ1RHIeTsx X-Received: by 10.55.42.203 with SMTP id q72mr10924039qkq.12.1498243385339; Fri, 23 Jun 2017 11:43:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.237.63.237 with HTTP; Fri, 23 Jun 2017 11:42:44 -0700 (PDT) In-Reply-To: References: From: Claus Ibsen Date: Fri, 23 Jun 2017 20:42:44 +0200 Message-ID: Subject: Re: [HELP] - Profile camel-core for optimization and faster startup To: dev Content-Type: text/plain; charset="UTF-8" archived-at: Fri, 23 Jun 2017 18:43:15 -0000 Hi Just a little status update, that after a bunch of different optimisations, then the YourKit profiler is now down to showing that the type converter registry and the uuid generator is potential hot-spots, where the former is used a lot and we can optimise the conversions for the core converters which I have logged a ticket about. And the latter generates an string uuid for each exchange which is a little bit long. As its sequencer based and have a fixed prefix, then maybe there is some clever optimisation (essentially only the sequence is different as they share the same prefix/seed). But its already optimise as much by adding two strings together via StringBuilder. On Fri, May 26, 2017 at 3:59 PM, Claus Ibsen wrote: > Hi > > We have found a few spots to optimize the camel-core source code for > thread contention and something else. > > You can use a profile tool such as YourKit which is excellent at > identifying spots and visualizing what goes on in the JVM. > > We have used it in the past to optimise stuff. However recently Luca > asked about making Camel startup faster: > https://issues.apache.org/jira/browse/CAMEL-11321 > > And although fast startup is not excatly the same as runtime > performance then they are still related. A profile can help identify > places for improvements. > > I have pushed a sample project at > https://github.com/davsclaus/camel-profile-sample > > You can then run this via > > mvn spring-boot:run > > And then attach YourKit profiler. > > However if you use IDEA then you can start YourKit, then from YourKit > you can choose Integrate with IDE ... and then chose IDEA and then say > ok even if IDEA is also running. > > In IDEA you should see a YourKit icon if you right-click on the > SampleCamelApplication to run this application, then you can chose > that to profile, and it run the app with profiler. > > You then switch to YourKit and you should start see data. > To check for thread contention, then select the "Monitor Usage" tab, > and then click the gear button with the play icon "Start Monitor > Profile" which then starts capture data. > > For YourKit you can request a trial license that works for 2 weeks. > > > -- > Claus Ibsen > ----------------- > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2