bamarni / pi64

A 64-bit OS for the Raspberry Pi 3
712 stars 128 forks source link

Running darknet-nnpack more slowly than pi32? #77

Open 503612068 opened 6 years ago

503612068 commented 6 years ago

I have updated pi3 from 32 to 64,and re-make darknet-nnpackhttps://github.com/digitalbrain79/darknet-nnpack.But the test result is more slowly (16s) than old pi 32(8s). In fact ,pi64 running more faster than pi32 with CPU test command. Darknet-nnpack needed NNPACK=1,ARM_NEON=1 to accelerate. I think,is it pi64 haven't supported or optimized? Anyone who knows the problem?

ThomasKaiser commented 6 years ago

Anyone who knows the problem?

Under-voltage and you running frequency capped? Not already aware of Raspberry Pi problem number one? Shitty power circuitry?

If it's 8 vs. 16 seconds I would check whether you're running frequency capped at 600 MHz and ran with 1200 MHz before:

503612068 commented 6 years ago

I have checked my power voltage,it's not under-voltage and I try to set frequency upto 1200MHz.It worked.But i found that my Raspberry Pi3 setup linux debian 32 no need to change frequency and worked fine. I still doubt pi64 isn't effect CPUs performance,yes?

ThomasKaiser commented 6 years ago

@503612068 unfortunately you can't check for 'frequency capping' asking the kernel since /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq contains only fake values in situations where either frequency capping or throttling occurs. So you need to execute the following after you ran something heavy:

perl -e "printf \"%19b\n\", $(vcgencmd get_throttled | cut -f2 -d=)"

If this shows a 1 on the left you're affected. If this doesn't work simply try sysbench as shown in the first link above:

sudo apt install sysbench
sysbench --test=cpu --cpu-max-prime=10000 run --num-threads=4

6 seconds and you run under-volted, 3 seconds and at least the lightweight sysbench stuff is not able to trigger frequency capping.

I have checked my power voltage,it's not under-voltage

How? Measured at pins 4 and 6 of the GPIO header or somewhere else?

ThomasKaiser commented 6 years ago

You can also run in another terminal the following in parallel to get an idea about the real clockspeeds of the ARM cores:

while true ; do
    vcgencmd measure_clock arm | awk -F"=" '{printf ("%0.0f\n",$2/1000000); }'
    sleep 1
done
503612068 commented 6 years ago

3 seconds with command "sysbench --test=cpu --cpu-max-prime=10000 run --num-threads=4" in the pi64.

ThomasKaiser commented 6 years ago

Well, the sysbench 'test' is the most unreliable one (since sysbench is such a light load). But I don't know whether vcgencmd is now available in pi64 or not. In case it is I strongly recommend as already suggested to try one of the two other methods outlined above. Either running your benchmark and then afterwards executing

perl -e "printf \"%19b\n\", $(vcgencmd get_throttled | cut -f2 -d=)"

Or the other method above.

ThomasKaiser commented 6 years ago

BTW: Good news. With most recent kernel and 'firmware' Raspberry Pi problem N° 1 (under-voltage due to encouraging users to use crappy chargers and crappy 'power cables') has been somewhat addressed.

With latest kernel you can do an dmesg | grep -i voltage to get an idea whether you've been affected by under-voltage (and then frequency capping too I would assume).

https://github.com/raspberrypi/linux/issues/2367