From owner-freebsd-arm@FreeBSD.ORG Sat May 16 11:58:26 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 84538CC8 for ; Sat, 16 May 2015 11:58:26 +0000 (UTC) Received: from moon.peach.ne.jp (moon.peach.ne.jp [203.141.148.98]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B6701D55 for ; Sat, 16 May 2015 11:58:24 +0000 (UTC) Received: from moon.peach.ne.jp (localhost [127.0.0.1]) by moon.peach.ne.jp (Postfix) with ESMTP id C20AE50F0B; Sat, 16 May 2015 20:58:15 +0900 (JST) Received: from artemis (unknown [172.18.0.21]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by moon.peach.ne.jp (Postfix) with ESMTPSA id 91E3750F09; Sat, 16 May 2015 20:58:15 +0900 (JST) Message-ID: From: "Daisuke Aoyama" To: "Andreas Andersson" , References: <3AB5ECCF20894591B4DF5FCBA8CA49BB@ad.peach.ne.jp> In-Reply-To: Subject: Re: Performance issues with raspberry pi 2 Date: Sat, 16 May 2015 20:58:13 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 14.0.8117.416 X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2015 11:58:26 -0000 Hi, FreeBSD cant get faster than Linux driver because we use IRQ on dwc_otg.c. Linux driver use FIQ instead. However, there is many problems in dwc_otg.c. I don't like polling solution used in dwc_otg.c which prevent urgent interrupt but you may need this patch. http://www.peach.ne.jp/archives/rpi/patch/dwc_otg-rpi2-20150516.patch This patch is subset of my USB patch of ODROID-C1 4x faster version on 1Gbps. http://lists.freebsd.org/pipermail/freebsd-arm/2015-March/010783.html It will provide about 1.5-2.0x faster than unpached dwc_otg.c on SMP kernel. I think it's not best on SMP kernel but enough to test on 100Mbps. It improves network performance because RPi2 use USB Ether. Try it. -------------------------------------------------- From: "Andreas Andersson" Sent: Friday, May 15, 2015 5:25 PM To: Subject: Re: Performance issues with raspberry pi 2 > Still getting very low results > > ab -n 10000 -c 100 -T "application/json" -p postfile > http://172.16.0.9:8888/api/v1/alarm/ > This is ApacheBench, Version 2.3 <$Revision: 655654 $> > Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ > Licensed to The Apache Software Foundation, http://www.apache.org/ > > Benchmarking 172.16.0.9 (be patient) > Completed 1000 requests > Completed 2000 requests > Completed 3000 requests > Completed 4000 requests > Completed 5000 requests > Completed 6000 requests > Completed 7000 requests > Completed 8000 requests > Completed 9000 requests > Completed 10000 requests > Finished 10000 requests > > > Server Software: TornadoServer/4.1 > Server Hostname: 172.16.0.9 > Server Port: 8888 > > Document Path: /api/v1/alarm/ > Document Length: 16 bytes > > Concurrency Level: 100 > Time taken for tests: 123.976 seconds > Complete requests: 10000 > Failed requests: 0 > Write errors: 0 > Total transferred: 1590000 bytes > Total POSTed: 2650000 > HTML transferred: 160000 bytes > Requests per second: 80.66 [#/sec] (mean) > Time per request: 1239.759 [ms] (mean) > Time per request: 12.398 [ms] (mean, across all concurrent requests) > Transfer rate: 12.52 [Kbytes/sec] received > 20.87 kb/s sent > 33.40 kb/s total > > Connection Times (ms) > min mean[+/-sd] median max > Connect: 1 17 225.3 1 6205 > Processing: 17 1218 461.1 1057 2782 > Waiting: 17 1214 460.8 1053 2761 > Total: 26 1235 521.9 1059 7131 > > Percentage of the requests served within a certain time (ms) > 50% 1059 > 66% 1194 > 75% 1294 > 80% 1495 > 90% 2006 > 95% 2164 > 98% 2428 > 99% 2621 > 100% 7131 (longest request) > > The corresponding result for raspbian is around 250 req/s. > > > One thing I've noticed when comparing the consumer for the same project > > (reads from rabbitmq, gets and acks the messages and then discards them) it > works perfectlly with raspbian. The number of get's corresponds with the > number of acks from the queue in rabbitmq. Whereas freebsd 11 on rpi2 does > not do this. It has a rather high number of rabbitmq (4-500 get/s), but > almost no ACKs (1-1.5 ACK/s). on raspbian this number is ~250/s for both > GET and ACK. > > I am running powerd with these settings: > > powerd_flags="-M 900" > > > > > 2015-05-15 8:27 GMT+02:00 Andreas Andersson : > >> I just set debug.cpufreq.lowest=900 in sysctl.conf (Would it be better to >> have this set in /boot/loader.conf?) and enabled powerd. INVARIANTS is also >> disabled in this kernel. >> >> Will come back with results. >> >> 2015-05-15 4:38 GMT+02:00 Daisuke Aoyama : >> >>> Hi, >>> >>> But freebsd 11 on rpi2 suffers permance issues. Severely. >>>> >>>> For instance, the same code I am running (tornado project which inserts >>>> stuff to rabbitmq) is running at ~190 req/s or 190 publishments/sec (to >>>> rabbitmq) on raspbian. >>>> >>>> On FreeBSD 11 this is at around 85/s. >>>> >>> >>> Did you enable powerd? >>> RPi2 firmware boot up with 600MHz(power saved mode). It's slower than >>> RPi1 such as model B+. >>> The maximum rated frequency(900MHz in RPi2 case) can be used when you >>> enable powerd or set sysctl value. >>> powerd is requirement on RPi2, not an option like RPi1 anymore. >>> >>> I suggest that you enable powerd in FreeBSD official image and/or crochet >>> for RPi2. >>> >>> Regards, >>> -- >>> Daisuke Aoyama >>> >>> >>> >> > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"