Apu1d4 max lan network speed? [SOLVED]
-
Hi all, I have a apu1d4 with pfsense installed onto a msata card with squid installed. Been testing the local lan transfer rate (downloading from squid cache ,have not tested using iperf yet) and was only getting about 20 megabytes per second before hitting 100% CPU load.
Is that the max lan transfer rate for the apu1d or is this a squid limitation? Was kind of hoping to get higher transfer rates (90 to 115 megabytes per second).
-
Hello,
you can do the two following things: ;)
- enable PowerD (high adaptive Mode)
- reboot
- enable TRIM support for the mSATA
- reboot
SPI/NAT & firewall rules & additional installed packages & some services on top will narrow down the entire
performance step by step for sure. -
enable PowerD (high adaptive Mode)
Done.
reboot
Done.
enable TRIM support for the mSATA
Done.(there really should be a menu option for that, but anyway).
SPI/NAT & firewall rules
Very basic rules, block port 80 and 443 (using squid proxy) and allow a few computers to have direct access, also have a few ports open.
installed packages
bandwidthd
Dansguardian (Disabled)
iperf
Lightsquid
Sarg
squid3
squidGuardSystem load before downloading file from cache
last pid: 26782; load averages: 0.29, 0.30, 0.38 up 0+00:18:13 19:11:31 164 processes: 3 running, 140 sleeping, 4 zombie, 17 waiting Mem: 232M Active, 595M Inact, 574M Wired, 413M Buf, 2513M Free Swap: 8192M Total, 8192M Free PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND 11 root 155 ki31 0K 32K CPU0 0 14:38 100.00% [idle{idle: cpu0}] 11 root 155 ki31 0K 32K RUN 1 14:09 99.27% [idle{idle: cpu1}] 98435 root 52 0 223M 32344K piperd 1 0:01 4.59% php-fpm: pool lighty (php-fpm) 83019 proxy 20 0 228M 110M kqread 1 0:57 0.00% (squid-1) -f /usr/pbi/squid-amd64/local/et 0 root -16 0 0K 160K swapin 0 0:40 0.00% [kernel{swapper}] 12 root -92 - 0K 272K WAIT 0 0:30 0.00% [intr{irq261: re2}] 12 root -92 - 0K 272K WAIT 0 0:09 0.00% [intr{irq260: re1}]
While downloading from cache
last pid: 33398; load averages: 1.21, 0.52, 0.45 up 0+00:20:36 19:13:54 165 processes: 5 running, 140 sleeping, 4 zombie, 16 waiting Mem: 232M Active, 359M Inact, 809M Wired, 645M Buf, 2512M Free Swap: 8192M Total, 8192M Free PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU COMMAND 83019 proxy 100 0 228M 110M CPU0 0 1:29 96.39% (squid-1) -f /usr/pbi/squid-amd64/local/et 12 root -92 - 0K 272K WAIT 1 0:51 63.09% [intr{irq261: re2}] 11 root 155 ki31 0K 32K RUN 1 15:59 22.17% [idle{idle: cpu1}] 11 root 155 ki31 0K 32K RUN 0 16:23 4.39% [idle{idle: cpu0}] 32325 root 33 0 223M 32312K piperd 1 0:00 1.56% php-fpm: pool lighty (php-fpm) 79307 root 20 0 55724K 7312K bpf 0 0:01 1.17% /usr/pbi/bandwidthd-amd64/local/bandwidthd
Same speed about 20 megabytes per second
Just running out of CPU? would have thought that I would be able to get gigabit speeds with a apu1d.
-
Oh sorry it was my false! If you have enabled PowerD & TRIM support you should also
create a file that is named loader.conf.local to make all of your special or custom settings
persistent against reboots, updates & upgrades! once more again sorry please! :o/boot/loader.conf.local
Just running out of CPU?
No, the APU is powerful enough to run several things such as Squid and Snort, but please
don´t forget that each packet is harming the CPU and taking some power.would have thought that I would be able to get gigabit speeds with a apu1d.
Without the PowerD (high adaptive) enabled you will be able to archive something around ~450 MBit/s
and with enabled PowerD you could get something around ~650 MBit/s - ~750 MBit/s. ;) -
create a file that is named loader.conf.local
I already have the file in /boot/loader.conf.local
When I open up the file it showskern.cam.boot_delay=10000
Is there anything else I need to add to it?
Without the PowerD (high adaptive) enabled you will be able to archive something around ~450 MBit/s
and with enabled PowerD you could get something around ~650 MBit/s - ~750 MBit/sWell i just did a iperf (so not going through squid) and I get.
Client connecting to 192.168.1.244, TCP port 5001 TCP window size: 65.0 KByte (default) ------------------------------------------------------------ [ 9] local 192.168.1.1 port 21527 connected with 192.168.1.20 port 5001 [ ID] Interval Transfer Bandwidth [ 9] 0.0-10.0 sec 223 MBytes 187 Mbits/sec
Only getting 187 Mbits/sec
My msata card (Samsung 850 EVO MZ) can do
540 MB/sec Sequential Read 520 MB/sec Sequential Write
And the pc I am testing it with also has a ssd, all gigabit lan.
-
IN System: Advanced: Networking
I tired disabling/enabling Disable hardware checksum offload and Disable hardware TCP segmentation offload and Disable hardware large receive offload.
Which does not seem to affect anything. -
Any other ideas I can try?
-
Ok a few more tests
Running
systat -iostat 1
First test
diskinfo -c /dev/ada0
See attachment 1
result
See attachment 2Second test downloading a 1GB file from squid cache
result
See attachment 3![01 hdSpeedTest.jpg](/public/imported_attachments/1/01 hdSpeedTest.jpg)
![01 hdSpeedTest.jpg_thumb](/public/imported_attachments/1/01 hdSpeedTest.jpg_thumb)
![02 hdSpeedTestResults.jpg](/public/imported_attachments/1/02 hdSpeedTestResults.jpg)
![02 hdSpeedTestResults.jpg_thumb](/public/imported_attachments/1/02 hdSpeedTestResults.jpg_thumb)
![03 networkSpeedResults.jpg](/public/imported_attachments/1/03 networkSpeedResults.jpg)
![03 networkSpeedResults.jpg_thumb](/public/imported_attachments/1/03 networkSpeedResults.jpg_thumb) -
unticking
Disable hardware checksum offload
Disable hardware TCP segmentation offload
Disable hardware large receive offloadNow gives me about 27.5 Megabytes per second (220mbps).
That helped a little. -
Ok ran some more test, have two computers downloading the test file. When both are running the transfer speed halves, when 1 computer stops the transfer speed doubles, looking like a slowdown somewhere.
-
Ok I think I solved the issue, updated squid to 0.3.8 and removed dansguardian (dansguardian was disabled and I was not using it).
Now I get 500 to 600 mbps from iperf, going to test squid cache speed soon. -
Is that just from iperf running on the APU to an iperf client on another machine? I.e. not through the APU but to/from it, only using one NIC?
If that's really through the unit, routed and firewalled traffic, that the fastest result I've ever seen.Steve
-
The setup
APUd4 running
iperf 2.0.5.2
squid3 0.3.8
squidGuard 1.9.15iperf test
pfsense as client
pc as server
pfsense connected to gigabit router
pc connected to gigabit router
Only using lan nicresults
[ ID] Interval Transfer Bandwidth [ 9] 0.0-10.0 sec 593 MBytes 497 Mbits/sec
So when I said between 500 to 600 mbits it is really between 450 to 550 mbps.
However, this is only using 1 core (50% CPU), need iperf v3 for multi threading testing.Squid cache test
A 1GB test file
Speed is about 250 mbps
using full CPU powerSo that is about what I get.