Return-Path: Delivered-To: apmail-incubator-esme-dev-archive@minotaur.apache.org Received: (qmail 39482 invoked from network); 8 Dec 2009 10:31:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Dec 2009 10:31:07 -0000 Received: (qmail 32782 invoked by uid 500); 8 Dec 2009 10:31:07 -0000 Delivered-To: apmail-incubator-esme-dev-archive@incubator.apache.org Received: (qmail 32723 invoked by uid 500); 8 Dec 2009 10:31:06 -0000 Mailing-List: contact esme-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: esme-dev@incubator.apache.org Delivered-To: mailing list esme-dev@incubator.apache.org Received: (qmail 32706 invoked by uid 99); 8 Dec 2009 10:31:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Dec 2009 10:31:06 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of hirsch.dick@gmail.com designates 209.85.220.216 as permitted sender) Received: from [209.85.220.216] (HELO mail-fx0-f216.google.com) (209.85.220.216) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Dec 2009 10:30:58 +0000 Received: by fxm8 with SMTP id 8so4372076fxm.27 for ; Tue, 08 Dec 2009 02:30:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=zgCLokpPAPBJhUzOTmLWLcloA30qO5+CIZKzNS2VT1U=; b=SwpIjPhvIC8B67/qvkdpkxYt0rx62SNsb5jMlGVRuqrFxwJDzIgUuO+wbx7qHM8rSR 9dWMETxyRycEojRZDgq9XIVFW+MnuXIXAXa75zTlDqwUS39psH7HcteS5I6+sRdNp5Et kXWJYceDq+4aDfzM4WwYJ7FgZMZYzaF3RI1H8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=XiJb4e2orDjEv+DhJyqxk5OfG03cSTcfDsUedX99ak4BT9v/aFZJcc9JvM17W33kAG tU/AbJdsjvozXdkzCrfvGK0Ga9KzlTOeUYkU8lg1AULZYtCYt0FgLdAnreORRyiJZLBz R1aJ5kRe8w3VPHn3oHZyz04mfZbexOrXleyKA= MIME-Version: 1.0 Received: by 10.103.53.17 with SMTP id f17mr848412muk.87.1260268238153; Tue, 08 Dec 2009 02:30:38 -0800 (PST) In-Reply-To: <771905290912071603y73cd4bbevd2ec7b2fd7284e54@mail.gmail.com> References: <771905290912071603y73cd4bbevd2ec7b2fd7284e54@mail.gmail.com> Date: Tue, 8 Dec 2009 11:30:38 +0100 Message-ID: Subject: Re: Performance update: Message size in memory From: Richard Hirsch To: esme-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org org.tartarus.snowball.ext.PorterStemmer is from the compass search. Maybe we can configure it, so that it is not retained after usage. D. On Tue, Dec 8, 2009 at 1:03 AM, Markus Kohler wro= te: > Hi all, > I've been busy otherwise, and therefore didn't find much time for ESME la= st > week. > I tried a few things with regards to performance. > As you all noticed the performance on the performance instance is current= ly > excellent. > I tried various approaches to measure it, but most failed due to the come= nt > requests, which the tools I usually use don't like. > The best I could get are some numbers from the Firebug Firefox plugin. = =A0It > seems that the response time for entering a message until it appears in t= he > users timeline is around 350ms, which is really excellent. It will be eve= n > harder to measure (using the browser) how long it takes for a message fro= m > one user to the user. I'm not sure how to do that yet. I tested manually > sending messages from chrome to firefox and it' s really fast. > > I also let one of the 300+x Users send 1000 messages and did some heap > dumps. > I'm not yet fully through it but it's already clear that messages take up > too much space. > Around 1400 messages would need =A09,3 Million bytes which means that in > average one messages needs 6Kbyte! > Ok there were probably also a lot of relatively long update status messag= es, > but still I think this is too much. > > The reason seems to be that The messages still retain an instance to the > Stemmer (org.tartarus.snowball.ext.PorterStemmer) which alone takes 2 Kby= te. > Do we really need this Stemmer after we ran it? > > Another reason is that scala.xml.Elem is referenced in the toXML field. I > guess this is the result of parsing XML. Not sure whether this is still > needed after it's done, but storing DOM like structures is for sure not > memory efficient. originialXML looks similiar. > > It would be important to get these numbers down, otherwise we will be kil= led > by memory usage as soon as we get a lot of messages send. > > I also asked on the Scala list about the loadXML function accessing the > filesystem, but someone claimed this would not be the case in trunk and > asked for the version. So maybe they can backport =A0a fix for this. > I seem to remember during some profiling that this function is still used= . > > Haven't had any time to draft a blog, but I hope I can start with that on > Wednesday or Thursday. > > Regards, > Markus > > > "The best way to predict the future is to invent it" -- Alan Kay >