From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ye0-f177.google.com (mail-ye0-f177.google.com [209.85.213.177]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id 219C521F1D7 for ; Sat, 9 Mar 2013 17:27:00 -0800 (PST) Received: by mail-ye0-f177.google.com with SMTP id m12so471272yen.22 for ; Sat, 09 Mar 2013 17:26:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=xbsaC528eMj737rTPlmwUAh2qSccaFP1S/vOM5J7bXk=; b=YZ68SoFXefe4nGN8dlksnva7nlPEOknzZlqVl/HNwdRxKuvFlwESII0Js5VdD8M84f 3LPAC4PyvqlfUGLKPx8yI86+zQUutaUk9f8hQTLuIk6XURCeSqVM/dlo03QfZOPeRChG ts7G1eI7ED2FvxcQMpKL1aZH6kbilBBKzLAOcJIpLqdVna9198Kb4aYNp2TKBsjsJV6n ylS02m+oLgcqBxQzfiIoexOfdb0XNywk8yrO5CxNONz/69GOY2NWiNI4vD6LplchKh0J CUrKXuu5OrEcVGSZZ14JGUKhrv+QCVLIo/rC0CJByS8bj009N9f69VMXp2WuFf2aGrFl 9Ovw== X-Received: by 10.236.65.101 with SMTP id e65mr5681624yhd.133.1362878819088; Sat, 09 Mar 2013 17:26:59 -0800 (PST) Received: from [10.0.0.2] (201-88-35-17.bsace702.dsl.brasiltelecom.net.br. [201.88.35.17]) by mx.google.com with ESMTPS id v43sm16333490yhm.11.2013.03.09.17.26.56 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 09 Mar 2013 17:26:58 -0800 (PST) Message-ID: <513BE15F.6090507@gmail.com> Date: Sat, 09 Mar 2013 22:26:55 -0300 From: =?ISO-8859-1?Q?M=E1rio_S=E9rgio_Fujikawa_Ferreira?= User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: Dave Taht References: <512EF471.4080109@gmail.com> <513BE004.9080409@gmail.com> In-Reply-To: <513BE004.9080409@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: bloat Subject: Re: [Bloat] Testing fq_codel on Android Galaxy Nexus AK kernel X-BeenThere: bloat@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: General list for discussing Bufferbloat List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2013 01:27:00 -0000 On 09/03/2013 22:21, Mário Sérgio Fujikawa Ferreira wrote: > Further information gathering. I won't procced with any further > testing. I am neither sure how to interpret the data I already have > for wlan0 nor that I am using the proper tools for the job. > > I look forward to your input. I would like to be able to gather good > values for both quantum and limit. I want to set them appropriately > for the radio and wifi connections. Since we don't have the properly > patched tc command, I'll probably be hard coding this on the fq_codel > module itself. > > Are there recommendations? If a guideline is available/suggested, > I'll try to find good average values for this particular phone. > > The data I gathered currently follows: > > - Android phone Samsung Galaxy Nexus GSM I9250 running stock Yakju > 4.2.2 with AK kernel > - WIFI connected to LAN, ADSL 512KiB U, Phone Google Drive upload at > full speed. No other traffic on the network > - The drivers are available in binary form from > https://developers.google.com/android/nexus/drivers > - Quick look on the Galaxy Nexus > http://wiki.rootzwiki.com/Samsung_Galaxy_Nexus > - There is a teardown of all components on > http://www.ifixit.com/Teardown/Samsung+Galaxy+Nexus+Teardown/7182/1 > - Radio: Intel XG626 Baseband Modem > - WiFi / Bluetooth module: Broadcom BCM4330 > - Samsung SWB-B42 BT 4.0 Dual Band Wlan FM Tx/Rx. Chipworks > says the module is actually manufactured by Murata, and houses a > Broadcom BCM4330 die inside. > > # uname -a > Linux localhost 3.0.67+~ak.710.422.Cylon #1 SMP PREEMPT Wed Feb 27 > 06:54:36 CET 2013 armv7l GNU/Linux > # netcfg > lo UP 127.0.0.1/8 0x00000049 > ifb0 DOWN 0.0.0.0/0 0x00000082 > ifb1 DOWN 0.0.0.0/0 0x00000082 > tunl0 DOWN 0.0.0.0/0 0x00000080 > sit0 DOWN 0.0.0.0/0 0x00000080 > ip6tnl0 DOWN 0.0.0.0/0 0x00000080 > rmnet0 DOWN 0.0.0.0/0 0x00001090 > rmnet1 DOWN 0.0.0.0/0 0x00001090 > rmnet2 DOWN 0.0.0.0/0 0x00001090 > p2p0 UP 0.0.0.0/0 0x00001003 > wlan0 UP 10.0.0.101/25 0x00001043 > # ls -l /sys/class/net/p2p0/ > -r--r--r-- root root 4096 2013-03-02 21:33 addr_assign_type > -r--r--r-- root root 4096 2013-03-02 21:33 addr_len > -r--r--r-- root root 4096 2013-03-02 21:33 address > -r--r--r-- root root 4096 2013-03-02 21:33 broadcast > -r--r--r-- root root 4096 2013-03-02 21:33 carrier > -r--r--r-- root root 4096 2013-03-02 21:33 dev_id > lrwxrwxrwx root root 2013-03-02 21:33 device -> > ../../../mmc1:0001:2 > -r--r--r-- root root 4096 2013-03-02 21:33 dormant > -r--r--r-- root root 4096 2013-03-02 21:33 duplex > -r--r--r-- root root 4096 2013-03-02 21:33 features > -rw-r--r-- root root 4096 2013-03-02 21:33 flags > -rw-r--r-- root root 4096 2013-03-02 21:33 ifalias > -r--r--r-- root root 4096 2013-03-02 21:33 ifindex > -r--r--r-- root root 4096 2013-03-02 21:33 iflink > -r--r--r-- root root 4096 2013-03-02 21:33 link_mode > -rw-r--r-- root root 4096 2013-03-02 21:33 mtu > -rw-r--r-- root root 4096 2013-03-02 21:33 netdev_group > -r--r--r-- root root 4096 2013-03-02 21:33 operstate > lrwxrwxrwx root root 2013-03-02 21:33 phy80211 -> > ../../ieee80211/phy0 > drwxr-xr-x root root 2013-03-02 21:33 power > drwxr-xr-x root root 2013-03-02 21:33 queues > -r--r--r-- root root 4096 2013-03-02 21:33 speed > drwxr-xr-x root root 2013-03-02 21:33 statistics > lrwxrwxrwx root root 2013-03-02 21:33 subsystem -> > ../../../../../../../../../../class/net > -rw-r--r-- root root 4096 2013-03-02 21:33 tx_queue_len > -r--r--r-- root root 4096 2013-03-02 21:33 type > -rw-r--r-- root root 4096 2013-03-02 21:33 uevent > > # ls -l /sys/class/net/wlan0/ > -r--r--r-- root root 4096 2013-03-02 21:38 addr_assign_type > -r--r--r-- root root 4096 2013-03-02 21:38 addr_len > -r--r--r-- root root 4096 2013-03-02 21:38 address > -r--r--r-- root root 4096 2013-03-02 21:38 broadcast > -r--r--r-- root root 4096 2013-03-02 21:38 carrier > -r--r--r-- root root 4096 2013-03-02 21:38 dev_id > lrwxrwxrwx root root 2013-03-02 21:38 device -> > ../../../mmc1:0 > 001:2 > -r--r--r-- root root 4096 2013-03-02 21:38 dormant > -r--r--r-- root root 4096 2013-03-02 21:38 duplex > -r--r--r-- root root 4096 2013-03-02 21:38 features > -rw-r--r-- root root 4096 2013-03-02 21:38 flags > -rw-r--r-- root root 4096 2013-03-02 21:38 ifalias > -r--r--r-- root root 4096 2013-03-02 21:38 ifindex > -r--r--r-- root root 4096 2013-03-02 21:38 iflink > -r--r--r-- root root 4096 2013-03-02 21:38 link_mode > -rw-r--r-- root root 4096 2013-03-02 21:38 mtu > -rw-r--r-- root root 4096 2013-03-02 21:38 netdev_group > -r--r--r-- root root 4096 2013-03-02 21:38 operstate > lrwxrwxrwx root root 2013-03-02 21:38 phy80211 -> > ../../ieee80211/phy0 > drwxr-xr-x root root 2013-03-02 21:38 power > drwxr-xr-x root root 2013-03-02 21:38 queues > -r--r--r-- root root 4096 2013-03-02 21:38 speed > drwxr-xr-x root root 2013-03-02 21:31 statistics > lrwxrwxrwx root root 2013-03-02 21:38 subsystem -> > ../../../../../../../../../../class/net > -rw-r--r-- root root 4096 2013-03-02 21:38 tx_queue_len > -r--r--r-- root root 4096 2013-03-02 21:38 type > -rw-r--r-- root root 4096 2013-03-02 21:38 uevent > > By quick traffic examination, it seems that all WIFI traffic flows > through wlan0: > > # tc -s qdisc > Android does not support qdisc 'fq_codel' > qdisc fq_codel 8001: dev rmnet0 root refcnt 2 [cannot parse qdisc > parameters] > Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0) > backlog 0b 0p requeues 0 > Android does not support qdisc 'prio' > qdisc pfifo_fast 0: dev p2p0 root refcnt 2 [cannot parse qdisc > parameters] > Sent 468 bytes 6 pkt (dropped 0, overlimits 0 requeues 0) > backlog 0b 0p requeues 0 > Android does not support qdisc 'prio' > qdisc pfifo_fast 0: dev wlan0 root refcnt 2 [cannot parse qdisc > parameters] > Sent 38442999 bytes 26737 pkt (dropped 0, overlimits 0 requeues 0) > backlog 0b 0p requeues 0 > > Here follows the information on wlan0 interface: > > # cat /sys/class/net/wlan0/tx_queue_len > 1000 > # cat /sys/class/net/wlan0/speed > sh: cat: /sys/class/net/wlan0/speed: Invalid argument > # ls -l /sys/class/net/wlan0/queues > drwxr-xr-x root root 2013-03-02 22:04 rx-0 > drwxr-xr-x root root 2013-03-02 22:04 tx-0 > # ls -l /sys/class/net/wlan0/queues/tx-0 > -rw-r--r-- root root 4096 2013-03-02 22:04 xps_cpus > > Tests follow in the next email. Let's try to measure the hardware buffer by sending 500 pings to 187.7.117.32 with "Net Ping" from Play Store. I'll use different txqueuelen values each time. There is a concurrent upload at full speed to Google Drive. # echo 0 > /sys/class/net/wlan0/tx_queue_len # cat /sys/class/net/wlan0/tx_queue_len 0 500 pings (187.7.117.32) min-max: 61.6-1058 ms (187.7.117.32) avg/stddev: 315/167 ms # echo 1 > /sys/class/net/wlan0/tx_queue_len 500 pings (187.7.117.32) min-max: 60.3-1365 ms (187.7.117.32) avg/stddev: 602/310 ms # echo 10 > /sys/class/net/wlan0/tx_queue_len 500 pings (187.7.117.32) min-max: 61.2-1337 ms (187.7.117.32) avg/stddev: 571/288 ms # echo 100 > /sys/class/net/wlan0/tx_queue_len 500 pings (187.7.117.32) min-max: 61.2-1455 ms (187.7.117.32) avg/stddev: 647/343 ms # echo 1000 > /sys/class/net/wlan0/tx_queue_len 500 pings (187.7.117.32) min-max: 60.0-1484 ms (187.7.117.32) avg/stddev: 616/342 ms Repeat the above tests without the concurrent upload. # echo 0 > /sys/class/net/wlan0/tx_queue_len # echo 0 > /sys/class/net/p2p0/tx_queue_len 500 pings (187.7.117.32) min-max: 61.7-213 ms (187.7.117.32) avg/stddev: 70.6/15.0 ms # echo 1 > /sys/class/net/wlan0/tx_queue_len 500 pings (187.7.117.32) min-max: 60.7-207 ms (187.7.117.32) avg/stddev: 70.5/15.4 ms # echo 10 > /sys/class/net/wlan0/tx_queue_len 500 pings (187.7.117.32) min-max: 60.6-244 ms (187.7.117.32) avg/stddev: 69.1/10.5 ms # echo 100 > /sys/class/net/wlan0/tx_queue_len 500 pings (187.7.117.32) min-max: 60.7-246 ms (187.7.117.32) avg/stddev: 70.1/15.4 ms # echo 1000 > /sys/class/net/wlan0/tx_queue_len 500 pings (187.7.117.32) min-max: 61.4-251 ms (187.7.117.32) avg/stddev: 70.2/16.3 ms I've disabled WIFI and enabled 3G. I've got a HDSPA connection. # netcfg lo UP 127.0.0.1/8 0x00000049 00:00:00 ifb0 DOWN 0.0.0.0/0 0x00000082 f9:64:69 ifb1 DOWN 0.0.0.0/0 0x00000082 c6:b4:f9 tunl0 DOWN 0.0.0.0/0 0x00000080 00:00:00 sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00 ip6tnl0 DOWN 0.0.0.0/0 0x00000080 00:00:00 rmnet0 UP 179.225.225.71/24 0x000010d1 00:00:00 rmnet1 DOWN 0.0.0.0/0 0x00001090 00:00:00 rmnet2 DOWN 0.0.0.0/0 0x00001090 00:00:00 p2p0 DOWN 0.0.0.0/0 0x00001002 c5:c2:4e wlan0 DOWN 0.0.0.0/0 0x00001002 Here follows the information on rmnet0 interface: # cat /sys/class/net/rmnet0/tx_queue_len 1000 # cat /sys/class/net/rmnet0/speed /system/bin/sh: cat: /sys/class/net/rmnet0/speed: Invalid argument # ls -l /sys/class/net/rmnet0/queues drwxr-xr-x root root 2013-03-03 15:03 rx-0 drwxr-xr-x root root 2013-03-03 15:03 tx-0 # ls -l /sys/class/net/rmnet0/queues/tx-0 -rw-r--r-- root root 4096 2013-03-03 15:03 xps_cpus I will await for your orientation before doing any other testing. I've submitted patches to change the default fq_codel limit from 10*1024 to 600 which seem to be reasonable for cel radio/wifi speeds according to: http://www.bufferbloat.net/projects/codel/wiki/Best_Practices_for_Benchmarking_CoDel_and_FQ_CoDel Also, I'm pushing for the addition of TCP Small Queues. What default value do you suggest we use there? The default is 131032. Should I use a small default? Best regards, Mário Sérgio