Would I benefit swapping PiB to a Pi2


#1

What do you think?
I seem to be close to 100% cpu, could I be missing stuff just because there’s not enough CPU to decode it?


pi@raspberrypi ~ $ cat /proc/cpuinfo
processor       : 0
model name      : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS        : 2.00
Features        : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xb76
CPU revision    : 7

Hardware        : BCM2708
Revision        : 000d
Serial          : 00000000a81e5d70


raspberrypi-spy.co.uk/2012/0 … d-version/ says Model B Revision 2.0 512MB
This is how it runs…



top - 10:47:40 up 4 days, 15:56,  1 user,  load average: 2.40, 2.41, 2.47
Tasks:  67 total,   2 running,  65 sleeping,   0 stopped,   0 zombie
%Cpu(s): 80.5 us, 13.3 sy,  0.0 ni,  0.6 id,  0.0 wa,  0.0 hi,  5.5 si,  0.0 st
KiB Mem:    445804 total,   297348 used,   148456 free,    76936 buffers
KiB Swap:   102396 total,        0 used,   102396 free,   156412 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
 8645 dump1090  15  -5 26320  16m 1948 R  47.7  3.8   1882:58 dump1090-mutabi
12961 root      20   0 11216 9500 5136 S  30.6  2.1 218:25.48 fa-mlat-client
10604 root      20   0 88576 6288 2876 S  12.3  1.4 163:26.26 pfclient
 9608 root      20   0 17444 7976 4488 S   3.5  1.8 106:30.95 piaware
 9617 root      20   0  2652 2100 1832 S   2.3  0.5  56:23.87 faup1090
14014 pi        20   0  4672 2340 2012 R   1.0  0.5   0:00.36 top
    3 root      20   0     0    0    0 S   0.6  0.0  16:13.50 ksoftirqd/0
    7 root      20   0     0    0    0 S   0.6  0.0  26:37.91 rcu_preempt

DUMP1090 v1.15~dev

(no aircraft selected)

Aircraft (total): 172 Messages: 1316.2/sec
(with positions): 146 History: 13343 positions


#2

Yes :slight_smile:

If you’re close to 100% CPU then the Pi has a tendency to silently drop USB traffic, which means a) you might miss some messages and b) mlat synchronization is compromised.


#3

My system load is well above 1 during the days - even when it’s overclocked.

An RPi2 is definitely what I’ll be buying next. Another one to add to the collection. Currently got 5 RPis and 2 RPi2s in active use for various things. A couple of spares waiting for other projects.


#4

@PeterHR - for comparison’s sake, here’s a shot of top on my Pi 2. It feeds FlightAware, PlaneFinder and FlightRadar24. Receiver gain is set to “agc”.


#5

Top from my “stock clocked” B+ Getting tighter on memory as well as CPU… However, I was running a Pi2 in parallel and getting identical results with this current load.

Cheers!
LitterBug


top - 17:59:32 up 35 days, 17:22,  1 user,  load average: 1.36, 1.43, 1.54
Tasks:  68 total,   2 running,  66 sleeping,   0 stopped,   0 zombie
%Cpu(s): 58.3 us, 10.0 sy,  0.0 ni, 27.8 id,  0.0 wa,  0.0 hi,  3.9 si,  0.0 st
KiB Mem:    444844 total,   406800 used,    38044 free,   100688 buffers
KiB Swap:        0 total,        0 used,        0 free,   108972 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
 2521 dump1090  15  -5 20244  11m 1872 R  44.1  2.6  10312:06 dump1090-mutabi
23156 root      20   0 12752 9996 5660 S  19.3  2.2  75:01.28 fa-mlat-client
23144 root      20   0 18844 8308 4924 S   2.9  1.9   9:51.89 piaware
23154 root      20   0  2656 2060 1776 S   1.0  0.5   4:40.69 faup1090
27403 pi        20   0  4672 2344 2012 R   1.0  0.5   0:00.11 top
    3 root      20   0     0    0    0 S   0.3  0.0  79:25.59 ksoftirqd/0
    7 root      20   0     0    0    0 S   0.3  0.0 180:52.64 rcu_preempt
    1 root      20   0  2152 1384 1280 S   0.0  0.3   2:06.64 init
    2 root      20   0     0    0    0 S   0.0  0.0   0:00.05 kthreadd
    5 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 kworker/0:0H
    8 root      20   0     0    0    0 S   0.0  0.0   0:00.00 rcu_sched
    9 root      20   0     0    0    0 S   0.0  0.0   0:00.00 rcu_bh
   10 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 khelper
   11 root      20   0     0    0    0 S   0.0  0.0   0:00.01 kdevtmpfs
   12 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 netns
   13 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 perf
   14 root      20   0     0    0    0 S   0.0  0.0   0:02.48 khungtaskd



#6

the b can be “overlocked” a few hundred mhz can’t it? forgot how to get to the menu to do it, it’s automatically there on a fresh install.


#7

If I do an in-place swap from PiB+ to a Pi2, will it have to be re-registered or will FA pick up a new MAC address associated with the same sending IP address? Joe K4AA


#8

I just did that. To preserve my stats, I am spoofing my old MAC address in the /boot/cmdline.txt file.


pi@piaware ~ $ cat /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait smsc95xx.macaddr=b8:27:eb:xx:xx:xx


edit: Do not split /boot/cmdline.txt into multiple lines. Everything must be on one line. This line has been wrapped for display, but it is one line.


#9

The problem with spoofing the MAC is, you might want to reuse the Rpi for another project. If you do that, you will now need to also spoof it’s address with another (if on the same local network). It would be great if FA would not use MAC addresses as reference with no way to change the MAC=site# association.


#10

My stats are presently shot anyway - since I’ve had three long periods down time due to overheated dongles.

I do have a Pi2 that I’d need to build up for the job … I’d probably not spoof the old MAC address since I may want to use that old Pi for feeding elsewhere … but then again, it would save reconfiguring the router DHCP reservations, and port mappings.

I think the MLAT client is the straw that’s broken the camels back, it seems to have a lot of work to do.

Presently I’m reporting about 400,000 ADSB positions a day. For every two planes with full ADSB there is one with a simple responder 80% of which get located by MLAT.

(I’d like to get the counts up a little - but geography (= a rise in the land east to south east) gets in the way.

I quick fix now would be the medium overclock (since that wasn’t causing the crashes).


#11

It’s not so bad if you think of it as a site identifier that defaults to being the MAC address.
(It could generate a UUID to serve the same purpose, but many of the common UUID generation mechanisms start from a MAC address anyway…)
What is really needed is a way to specify that site identifier / UUID manually.


#12

I’m starting to associating an address (a bogus MAC address) with the boot image, rather than the hardware. this gives me an easy way to test different configurations.

That lets me move between a Pi B and a Pi 2 with a minimum of trouble. The new images also incorporate avahi-daemon, which supports easier addressing on a LAN, being able to SSH to oldcrow.local rather than having to remember or figure out where that particular little box is numerically on the network.

And yes, I’d like a sanctioned way to move my Flight-Aware stats to a new box/processor. The box I’ve been using as my main Flight-Aware feed is a 256mb Pi – replacing it with a Pi 2 and spoofing the old MAC address won’t be an issue, as I’m not going to reuse that 256mb machine!

bob


#13

How much of that load is collectd and related parts, because I only hit 0.30 load feeding the three sites. Granted I probably have less planes, but stats collection can be CPU hungry.


#14

Ooh, clever. I’m going to steal that idea… No more complaints about changed ssh host keys and hostnames that don’t match DNS!


#15

yup! Avahi (aka bonjour) also makes things a lot easier for humans to use.

glad to help – you’ve made life a lot easier for a lot of us!

–bob


#16

Back unto the original topic, I overclocked the Pi to 900Mhz

We’re close to the peak traffic time - FA say i’m reporting 30000 positions an hour about now


DUMP1090	v1.15~dev
 	 
(no aircraft selected)	 
 	 
Aircraft (total): 127	Messages: 1255.6/sec
(with positions): 116	History: 8465 positions


top - 07:41:06 up 10:30,  1 user,  load average: 1.72, 1.72, 1.81
Tasks:  66 total,   3 running,  63 sleeping,   0 stopped,   0 zombie
%Cpu(s): 61.6 us, 12.7 sy,  0.0 ni, 19.9 id,  0.0 wa,  0.0 hi,  5.9 si,  0.0 st
KiB Mem:    445804 total,   146844 used,   298960 free,    23600 buffers
KiB Swap:   102396 total,        0 used,   102396 free,    69276 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
 1858 dump1090  15  -5 26408  15m 1872 R  40.1  3.6 211:10.22 dump1090-mutabi
 2183 root      20   0 11216 9632 5272 S  25.7  2.2  82:28.82 fa-mlat-client
 2088 root      20   0 47456 5316 2252 S   4.6  1.2  16:56.31 pfclient
 2120 root      20   0 17288 7864 4508 S   4.6  1.8  10:39.47 piaware
 2181 root      20   0  2652 2100 1836 S   2.0  0.5   5:46.55 faup1090
 2987 pi        20   0  4672 2464 2136 R   1.0  0.6   0:03.17 top


so we’re now running at a happier 75% busy CPU


Bob, I’d re-purpose that old 256Kb Pi as a watcher / monitor for the other Pi’s


It’s tempting to spoof mac-addresses as FE:ED:00:00:00:01, etc


#17

You’re right. A lot of that was collectd crunching numbers. Normally runs .3-.4 load, like now.


#18

Care to give a quickie informational on the overclocking of your Pi?

Cheers!
LitterBug


#19

option 7 in “sudo raspi-config” … reboots afterwards.

runs warmer afterwards - but my pi now has a continuous breeze from a 12v fan running on 5v


#20

Ahhh do it the easy way. :wink: I must have been on vaca last week or something. LOL

Cheers!
LitterBug