Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D01AB10ECC for ; Mon, 20 Apr 2015 00:06:46 +0000 (UTC) Received: (qmail 89810 invoked by uid 500); 20 Apr 2015 00:06:46 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 89768 invoked by uid 500); 20 Apr 2015 00:06:46 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 89756 invoked by uid 99); 20 Apr 2015 00:06:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Apr 2015 00:06:46 +0000 X-ASF-Spam-Status: No, hits=3.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_IMAGE_ONLY_24,HTML_MESSAGE,SPF_PASS,T_REMOTE_IMAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: message received from 54.164.171.186 which is an MX secondary for users@activemq.apache.org) Received: from [54.164.171.186] (HELO mx1-us-east.apache.org) (54.164.171.186) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Apr 2015 00:06:41 +0000 Received: from mail-ob0-f181.google.com (mail-ob0-f181.google.com [209.85.214.181]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id C75F843E4F for ; Mon, 20 Apr 2015 00:06:20 +0000 (UTC) Received: by obbeb7 with SMTP id eb7so106696386obb.3 for ; Sun, 19 Apr 2015 17:06:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=kR9VkDsY73+7+DPlKeLP+NazgtUr05qY/tcQ4vywaIY=; b=MNwznyLxPVAt3KMFpIGHVkV1jIkmXWrrax1+bZZT/1Pje3byeHXe/PPrcHcfZM1+8s Fp7chEwpAKZ6KwFsO52hZ7MpcnvrPmePdhqfxof1j/KKCMFhYauXr35YwvrT0kH5X/en CP+919W5pUKOVtl2EaECWpKjCOPyIvi0NfIF9rh1OBE1dsyWco2Rf+nMo0zKBEObctgA 2tGm5diwP+4hFWjL71KGjYYfR1GCeONfFn8xtAossF0oCczQXjKtmIJFEnBTS77mHI4r /KNbaL4is1H8xp0qhfY8LM6IrQ2onqbsDg1t/Rdq9xxvfac49M+rjcGiiFEc0qBkZS0B tE4A== X-Received: by 10.202.45.65 with SMTP id t62mr11497936oit.34.1429488374339; Sun, 19 Apr 2015 17:06:14 -0700 (PDT) MIME-Version: 1.0 Sender: burtonator2011@gmail.com Received: by 10.183.6.233 with HTTP; Sun, 19 Apr 2015 17:05:54 -0700 (PDT) From: Kevin Burton Date: Sun, 19 Apr 2015 17:05:54 -0700 X-Google-Sender-Auth: h1f1pksgO3R-jyk_SMCclTXHCvE Message-ID: Subject: Storing message off heap, message compression, and storing the whole message as headers. To: users@activemq.apache.org Content-Type: multipart/alternative; boundary=001a1138e442c35b9105141cb2ca X-Virus-Checked: Checked by ClamAV on apache.org --001a1138e442c35b9105141cb2ca Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I=E2=80=99ve been thinking about how messages are stored in the broker and = ways to improve the storage in memory. First, right now, messages are stored in the same heap, and if you=E2=80=99= re using the memory store, like, that=E2=80=99s going to add up. This will increase= GC latency , and you actually need 2x more memory because you have to have temp memory set aside for GCs. I was thinking about using Chronicle to store the messages off heap using direct buffers. The downside to this is that the messages need to be serialized/deserialized with each access. But realistically that=E2=80=99s = probably acceptable because you can do something like 1M message deserializations per second. Which is normally more than the throughput of the broker. Additionally, chronicle supports zlib or snappy compression on the message bodies. So, while the broker supports message compression now, it doesn=E2= =80=99t support this feature on headers. This would give us header compression! The broker would transparently decompress the headers when reading the message. This then begs the question, why use message bodies at all? Why not just store an entire message as a set of headers? If you need hierarchy you can do foo.bar.cat.dog style header names. --=20 Founder/CEO Spinn3r.com Location: *San Francisco, CA* blog: http://burtonator.wordpress.com =E2=80=A6 or check out my Google+ profile --001a1138e442c35b9105141cb2ca--