From owner-freebsd-pf@freebsd.org Fri Mar 18 16:38:46 2016 Return-Path: Delivered-To: freebsd-pf@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A64AAD4ECE for ; Fri, 18 Mar 2016 16:38:46 +0000 (UTC) (envelope-from david@zeromail.us) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1041163D for ; Fri, 18 Mar 2016 16:38:45 +0000 (UTC) (envelope-from david@zeromail.us) Received: by mail-io0-x236.google.com with SMTP id o5so59836363iod.2 for ; Fri, 18 Mar 2016 09:38:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zeromail-us.20150623.gappssmtp.com; s=20150623; h=mime-version:date:message-id:subject:from:to; bh=yGfV53kVxZmD4CimIDF17PQ600m5+U0YgsaW/WCnglQ=; b=PXnSwYJcEftuz904LknFKFzEgJM8KNzndtOHXsAkOOs7r5Z+EChvmna8/IA1cFFWol m2TjqFpZTSxplGZsUhqxg3UmXp5kUt8hCMlx9vzLUpa//PXc16oA33EfejRG9qcQZHoP AcDbLNrw4tDSrmAh1aflp2HaWffvcOn2fZ0e1ckWn+ni7M4ksM3trSr9dgYkzeu2eiFz pFluALwSmS/0BNiMWHZrdOPpcMx+jySfyk6UYVZgQcFGmetwE8L3hwFKbGu46PUJPBgL TQ8ZY+GQKGwgXrGiDALem7p5aUo4NRbinmCnlkvKUWie4IUPfynCbfsvKw8+RiJGMDpv +OWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=yGfV53kVxZmD4CimIDF17PQ600m5+U0YgsaW/WCnglQ=; b=mQ2abpbAM52qDUhwaFcUKRGGNqxNYv2by4s4Z4Td+Q8xwt5nopXJCWREG5inQPFS2J Nfaqiw/ZVC7NZNWzEUKhyW/7gR5KX6RaO6FikDeyIbfMYDrNj+idcxRN4Bjvc4NXzmU0 z/asPgxqjW8+h4MWSP65Gmmt3YhC3nN4/mwIDmYP0M594R3cjuYDc3JhWHYlQ4ft3HPd H1s2ywQGO3LvUM/UFWet3GH2HTkbhfaphesQu5O2s8hZn1F+FORAgDCNxM93f51+14FW 1Ovcnicu6835uz+OgGEUZ3r7cCB+XQUmKogyi5cEq2FqFJVjD1JBdGhBmx4LRnSQZ7Pb +6aQ== X-Gm-Message-State: AD7BkJLYzaULNJ3IAEdHBuewuU1Qcbp5o3E75R74sdxdQMJU1JNX8aG9UKvM8kTJhN7oO4asCJERvhMEtcLf/A== MIME-Version: 1.0 X-Received: by 10.107.135.15 with SMTP id j15mr17695986iod.28.1458319125081; Fri, 18 Mar 2016 09:38:45 -0700 (PDT) Received: by 10.64.123.2 with HTTP; Fri, 18 Mar 2016 09:38:45 -0700 (PDT) X-Originating-IP: [103.234.208.134] Date: Fri, 18 Mar 2016 23:38:45 +0700 Message-ID: Subject: Invalid queue upload statistic From: "David S." To: freebsd-pf@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Mar 2016 16:38:46 -0000 Dear All, This is my first post, my name is David and I'm currently developing FreeBSD as a BGP router and traffic shaper for my network. I already setup PF + ALTQ and working great, the bandwidth speed is match with my queue rule but the problem is the queue upload statistic. Before continuing the story please review my pf.conf below: === #/etc/pf.conf set limit states 10000000 set limit frags 10000000 set limit src-nodes 5000000 set limit table-entries 20000000 coba_net="{ 103.1.1.0/29, 103.1.2.0/28 }" altq on igb0 hfsc bandwidth 1000Mb queue {default_up,coba_up} altq on igb1 hfsc bandwidth 1000Mb queue {default_down,coba_down} queue coba_up bandwidth 2Mb qlimit 900 hfsc (realtime 2Mb, upperlimit 3Mb) queue coba_down bandwidth 2Mb qlimit 900 hfsc (realtime 2Mb, upperlimit 3Mb) pass quick on igb1.100 from $coba_net to any queue coba_down pass quick on igb0 from $coba_net to any queue coba_up === The problem is queue upload statistic is invalid and the queue download statistic is normal or match with my real bandwidth usage. I already do test using speedtest.net or upload and download file from my server to my another server on AWS and the bandwidth is match with my queue setup. For an example, I try to upload some file to my server on AWS and the real bandwidth usage is 4.5Mbps and here is the result from the iftop comparing to pfctl -s queue -vv: qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq TX: cum: 10.9MB peak: 6.13Mb rates: 4.59Mb 5.10Mb 4.83Mb RX: 180KB 100Kb 75.3Kb 84.3Kb 80.0Kb TOTAL: 11.0MB 6.23Mb 4.66Mb 5.18Mb 4.91Mb queue coba_up on igb0 bandwidth 2Mb qlimit 900 hfsc( realtime 2Mb upperlimit 3Mb ) [ pkts: 1606 bytes: 242657 dropped pkts: 0 bytes: 0 ] [ qlength: 0/900 ] [ measured: 8.8 packets/s, 9.38Kb/s ] But the download queue statistic is normal, please see below: qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq TX: cum: 770MB peak: 79.2Kb rates: 61.5Kb 59.6Kb 62.0Kb RX: 36.8MB 2.84Mb 2.83Mb 2.83Mb 2.83Mb TOTAL: 806MB 2.91Mb 2.89Mb 2.89Mb 2.89Mb queue coba_down on igb1 bandwidth 2Mb qlimit 900 hfsc( realtime 2Mb upperlimit 3Mb ) [ pkts: 37847 bytes: 30114656 dropped pkts: 0 bytes: 0 ] [ qlength: 32/900 ] [ measured: 248.4 packets/s, 3Mb/s ] Please help or give me some information to fix this problem, if any information need please let me know. Best regards, David Suhendrik. ------------------------------------------------ e. david@zeromail.us w. http://pnyet.web.id