Return-Path: X-Original-To: apmail-trafficserver-users-archive@www.apache.org Delivered-To: apmail-trafficserver-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 01B9417D14 for ; Sat, 27 Jun 2015 19:17:06 +0000 (UTC) Received: (qmail 13179 invoked by uid 500); 27 Jun 2015 19:17:05 -0000 Delivered-To: apmail-trafficserver-users-archive@trafficserver.apache.org Received: (qmail 13120 invoked by uid 500); 27 Jun 2015 19:17:05 -0000 Mailing-List: contact users-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@trafficserver.apache.org Delivered-To: mailing list users@trafficserver.apache.org Received: (qmail 13110 invoked by uid 99); 27 Jun 2015 19:17:05 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Jun 2015 19:17:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 3DC45C0337 for ; Sat, 27 Jun 2015 19:17:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.041 X-Spam-Level: ** X-Spam-Status: No, score=2.041 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, HTML_MESSAGE=3, RCVD_IN_MSPIKE_H2=-1.108, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id wHvjYCSeowmE for ; Sat, 27 Jun 2015 19:17:03 +0000 (UTC) Received: from mail-ie0-f182.google.com (mail-ie0-f182.google.com [209.85.223.182]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id D57BE205B7 for ; Sat, 27 Jun 2015 19:17:02 +0000 (UTC) Received: by iebrt9 with SMTP id rt9so93980516ieb.2 for ; Sat, 27 Jun 2015 12:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-type; bh=JY2AtYdnPQ70o0+O8xTGWc9juHJ8WOmsiUujIV5eOZA=; b=suEBif1J+1dwQKBH0NwrQWHyRzMUItoL7KlDorPA90rX2L0ApE6AxxJmauULv3W82b zlRKUIrJ57eywvT+oZAqkJnlgCkYzDq8XYNXqLu3eSknPv4RlZWaCqiDo8wNW0rQYPR/ r0AQhwcJWq17+KAls3coRKaojSZ0jxdO8tPT049E+uSePCQ/hsRydvehSehYaK3M12wT lVF+QQLYOPv+SRwnikFBFfvnBGU9WY4rQKEuuCkFhCxbFy0IcvNoF6c5h1vUJgubdit7 zY9lz7xFlt5uTL9GhUU9WjrhD6IK4laEi4HlJAn2n3GGwMD7tylewrG6tPcyA8qURCQW VtSQ== X-Received: by 10.42.72.194 with SMTP id p2mr7814425icj.33.1435432615866; Sat, 27 Jun 2015 12:16:55 -0700 (PDT) MIME-Version: 1.0 References: <1C83FB7A-3C86-4FF7-A8A2-08851F5CCCDC@apache.org> In-Reply-To: From: "Adam W. Dace" Date: Sat, 27 Jun 2015 19:16:46 +0000 Message-ID: Subject: Re: Quick Question About Linux HugePages To: users@trafficserver.apache.org Content-Type: multipart/alternative; boundary=90e6ba3fcd9f2afa5e051984b3bb --90e6ba3fcd9f2afa5e051984b3bb Content-Type: text/plain; charset=UTF-8 Well, maybe I'm over-exaggerating. The throughput definitely is only up about 20% or so, but before I couldn't quite get ATS to really saturate my home connection...and latency was sort of "okay". Now it seems that the proxy is as fast or faster(latency) than web browsing without it. My setup is a CentOS Linux 7 virtual server, running ATS, working as a forward-only proxy to my home Internet connection via IPv6. Right now I have roughly half the server's memory(496MB) allocated at boot to HugePages. cat /proc/meminfo | grep Huge AnonHugePages: 57344 kB HugePages_Total: 248 HugePages_Free: 17 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB There are a fair amount of other tweaks I've made as well. A lot of them are documented on the Wiki if you want to look. Regards, Adam P.S. My goal here was to avoid general routing/latency problems that come along with a generic Comcast Chicago-based connection. A lot of those are being worked out as the Internet continues to grow, but I'm going to "keep on keeping on" with this approach as it seems most of the major websites out there have a considerable presence in/around New York and this setup seems to help. On Sat, Jun 27, 2015 at 2:00 PM Phil Sorber wrote: > On Sat, Jun 27, 2015 at 11:41 AM Phil Sorber wrote: > >> On Sat, Jun 27, 2015 at 9:22 AM Leif Hedstrom wrote: >> >>> >>> >>> >>> >>> > On Jun 27, 2015, at 6:43 AM, Adam W. Dace >>> wrote: >>> > >>> > First, let me say a big thank you to those who have worked on the >>> reclaimable freelist and HugePages code. >>> >>> Cool! Note that reclaimable freelist is now gone and we will soon >>> introduce a buddy allocation scheme. >>> >>> > >>> > I'm not really sure why, but simply using HugePages has resulted in a >>> 100% speed boost on my ATS instance and it is now happily saturating my >>> 50Mbps home connection. Whoo hoo! :) >>> >>> > I forgot to add in my last email, what is your setup here? Great to hear > such gains, but I would have only expected ~20% in the best case scenario. > > >> >>> Woah that's incredible. Good job Phil Sorber :) >>> > >>> > My quick question is this: What happens if ATS goes to allocate a >>> HugePage and there are simply none left to be had? Will it crash? >>> >>> I believe it will just fall back to normal allocations. >>> >> >> That is correct. It will attempt to alloc huge pages every time and fail >> back to regular malloc if it cannot. >> >> >>> >>> -- Leif >>> >>> > >>> > I haven't had this happen, yet, but I'm trying to balance how much >>> memory I'm willing to give to ATS with other memory left free so I can at >>> least compile ATS on the same system. >>> > >>> > Thanks In Advance, >>> > >>> > Adam >>> > >>> >> --90e6ba3fcd9f2afa5e051984b3bb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Well, maybe I'm over-exaggerating.=C2=A0 The throughpu= t definitely is only up about 20% or so, but before I couldn't quite ge= t ATS to really saturate my home connection...and latency was sort of "= ;okay".=C2=A0 Now it seems that the proxy is as fast or faster(latency= ) than web browsing without it.

My setup is a CentO= S Linux 7 virtual server, running ATS, working as a forward-only proxy to m= y home Internet connection via IPv6.
Right now I have roughly hal= f the server's memory(496MB) allocated at boot to HugePages.
=
<adace@antelope:~> cat /proc/meminfo | grep Huge<= /div>
AnonHugePages: =C2=A0 =C2=A0 57344 kB
HugePages_Total: = =C2=A0 =C2=A0 248
HugePages_Free: =C2=A0 =C2=A0 =C2=A0 17
HugePages_Rsvd: =C2=A0 =C2=A0 =C2=A0 =C2=A00
HugePages_Surp: = =C2=A0 =C2=A0 =C2=A0 =C2=A00
Hugepagesize: =C2=A0 =C2=A0 =C2=A0 2= 048 kB

There are a fair amount of other twea= ks I've made as well.=C2=A0 A lot of them are documented on the Wiki if= you want to look.

Regards,

Adam

P.S.=C2=A0 My goal here was to avoid= general routing/latency problems that come along with a generic Comcast Ch= icago-based connection.
A lot of those are being worked out as th= e Internet continues to grow, but I'm going to "keep on keeping on= " with this
approach as it seems most of the major websites = out there have a considerable presence in/around New York and this setup se= ems to help.


On Sat, Jun 27, 2015 at 2:00 PM Phil Sorber <sorber@apache.org> wrote:
On Sat, Jun 27, 2015 at 11:41 AM Phil Sorber <sorber@apache.org> w= rote:
On Sat, Jun 27, 2015 at 9:22 AM Leif Heds= trom <zwoop@apache= .org> wrote:




> On Jun 27, 2015, at 6:43 AM, Adam W. Dace <colonelforbin74@gmail.com> wr= ote:
>
> First, let me say a big thank you to those who have worked on the recl= aimable freelist and HugePages code.

Cool! Note that reclaimable freelist is now gone and we will soon introduce= a buddy allocation scheme.

>
> I'm not really sure why, but simply using HugePages has resulted i= n a 100% speed boost on my ATS instance and it is now happily saturating my= 50Mbps home connection.=C2=A0 Whoo hoo!=C2=A0 :)


I forgot to add in my last email= , what is your setup here? Great to hear such gains, but I would have only = expected ~20% in the best case scenario.
=
=C2=A0
=

Woah that's incredible. Good job Phil Sorber :)
>
> My quick question is this:=C2=A0 What happens if ATS goes to allocate = a HugePage and there are simply none left to be had?=C2=A0 Will it crash?
I believe it will just fall back to normal allocations.

Th= at is correct. It will attempt to alloc huge pages every time and fail back= to regular malloc if it cannot.
=C2=A0

-- Leif

>
> I haven't had this happen, yet, but I'm trying to balance how = much memory I'm willing to give to ATS with other memory left free so I= can at least compile ATS on the same system.
>
> Thanks In Advance,
>
> Adam
>
--90e6ba3fcd9f2afa5e051984b3bb--