Community discussions

MikroTik App
tangent
Forum Guru
Forum Guru
Topic Author
Posts: 1067
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Small iperf3 container

Mon Apr 03, 2023 4:30 am

我一直在追求小t iperf3 container for RouterOS. This constitutes weekend entertainment for me. What can I say; I nerd hard.What I have so far ishere.

If you've got 0.2 megs to spare on your router, give it a spin. I'm getting 3.3 Gbit/sec test results to my RB4011 running ROS 7.9rc1.
Last edited bytangenton Tue Apr 04, 2023 12:19 am, edited 1 time in total.
Top
marsbeetle
newbie
Posts: 33
Joined: Sun Feb 19, 2023 9:57 am

Re: Small iperf3 container

Mon Apr 03, 2023 2:42 pm

This works fine for me on ARM64, less than 5MB -https://hub.docker.com/r/taoyou/iperf3-alpine
Code:Select all
/container print 1 name="4296455f-3ae4-4ea3-b96f-2fe832647191" tag="" os="linux" arch="arm64" interface=veth1-iperf root-dir=usb1/container/iperf mounts="" dns="" hostname="iperf" status=running
Top
tangent
Forum Guru
Forum Guru
Topic Author
Posts: 1067
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: Small iperf3 container

Mon Apr 03, 2023 11:24 pm

less than 5MB

It's closer to seven megs unpacked:

Code:Select all
$ docker create --name foo --platform linux/arm64 taoyou/iperf3-alpine $ docker export foo | pv -b > /dev/null 6.97MiB

(pv is thePipeViewertool.)

You might want to be aware thatthis lineat the top of the taoyou container's Dockerfile switches the package repos over from the official Alpine ones to the Aliyun (a.k.a. Alibaba Cloud) ones. If the only reason for that is because he's inside the Great Firewall of China and can't build containers otherwise, fine, but do realize that this step allows the Chinese government to swap out GCC and so forth to suit their political and security needs.

I did learn one thing of value from this container: the setcap step is unnecessary. I got that idea from the mDNS repeater container while I was fighting with getting the container to start, and I ended up convincing myself it was part of why I eventually succeeded, but no, it's a complete irrelevancy.
Top
tangent
Forum Guru
Forum Guru
Topic Author
Posts: 1067
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: Small iperf3 container

Mon Apr 03, 2023 11:28 pm

Incompletely separate news, I figured out what the Alpine layer was adding that allowed the container to start on ROS: it won't create the /dev, /proc, /run, or /sys mount points for you. If any single one of those is missing, it will unpack successfully, but then默默地fail to start.

Between this and the removal of the setcap binary, I've now got my 0.2 MiB container running successfully on my RB4011!

0.2 megs! Installed!

Next step: try it on the CRS328, with its piddlin' 16 megs of flash.
Top
User avatar
Larsa
Forum Veteran
Forum Veteran
Posts: 892
Joined: Sat Aug 29, 2015 7:40 pm
Location:The North Pole, Santa's Workshop

Re: Small iperf3 container

Mon Apr 03, 2023 11:55 pm

Wow, that is a true slimmed down container!
Top
tangent
Forum Guru
Forum Guru
Topic Author
Posts: 1067
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: Small iperf3 container

Tue Apr 04, 2023 12:11 am

Yes, thank you, @Larsa. These are the principles I was expounding on in the mDNS repeater thread. Between what you see on trunk in my Fossil now andthe removed setcap stuff, I do think one could get that container under a meg.

Once again, not my itch, but the code's there for the taking now.
Top
tangent
Forum Guru
Forum Guru
Topic Author
Posts: 1067
Joined: Thu Jul 01, 2021 3:15 pm
Contact:

Re: Small iperf3 container

Tue Apr 04, 2023 12:52 am

Next step: try it on the CRS328, with its piddlin' 16 megs of flash.

Womp, womp: 356 Mbit/sec with 4 parallel streams.

I guess that's what I get for using an 800 MHz ARM CPU for traffic generation.

Well, at least it runs.
Top

Who is online

Users browsing this forum: No registered users and 0 guests