Re: rpi4 as server? By: Mike Scott to All on Sat Nov 28 2020 11:33 am
The PIs are not great at I/O. They will do for a personal server with a couple of users, but it is not ideal as a server platform.
II don'tknow about the newer PIs, but at least the early ones used an USB bus for the ethernet connection, which meant network I/O was limited from the start.
gopher://gopher.richardfalken.com/1/richardfalken
Didn't find your answer? Ask the community — no account required.
M
Mike Scott
Hi all; a quick query about speeds.
I currently use an old i386 machine as home server (everything from local NFS file-store, to bind, to email server). It's an acer aspire r3700, running at 1.8GHz, 2 proc/4 thread job. It runs freebsd headless, and I use vnc for day-to-day operations on it.
I'm contemplating replacing with a rpi4, which I gather is now supported by freebsd, using a usb3 external hard drive. But is this likely to prove slower or problematic for any other reason?
TIA for any thoughts.
Mike Scott
Harlow, England
T
The Natural Philosopher
You really do not need a lot of power on a server that isn't running may applications. I suspect the bottleneck would be USB disk drive speed.
"Anyone who believes that the laws of physics are mere social
conventions is invited to try transgressing those conventions from the
windows of my apartment. (I live on the twenty-first floor.) "
Alan Sokal
T
Theo
My colleague who develops FreeBSD on the Pis recommends this image for the Pi3 and 4 - the 13.0-CURRENT release may not support the Pi 4:
formatting link
It is recommended that you boot Raspberry Pi OS and do a firmware update before you boot FreeBSD - the above might not have the right firmware for especially 8GB boards.
In general the plan sounds fine to me...
Theo
D
Derek.Moody
I've been using a Pi4 for this and a little *more for over a year, before that a Pi3 ran as just a NAS and printer server for over two years.
*more: Also printer server, local webserver and CGI (perl) lightweight testing host.
If your external drive is SSD it will be faster than your current server and can be arranged to run silently using much less power.
Caveat: I do not know the freebsd distro - I would expect it to be OK. I use Raspup, the Puppy Linux version for Pi.
Your biggest problem will be deciding where to get your clock updates from; do you open the Pi to the internet or run a timeserver on another machine.
Hth, Cheerio,
>> derek.moody@casterbridge.net
A
Andy Burns
The CM4 (with the I/O card) has a PCIe slot ...
B
bob prohaska
I think you'll be pleasantly surprised by FreeBSD on a Pi. It works relatively well, but be aware that Pi4 support is still only in -current. There's some "mucking about" to be done yet.
Best to browse the freebsd-arm mailing list archive to see if it's progressed to the point of being useful to you.
For my part, FreeBSD has made an admirably functional platform for bind, apache and sendmail. It's less useful as a workstation; I'm typing this on a Pi4 ssh'd into a Pi2. There are not yet precompiled applications in any great variety, but command-line programs build via the ports collection very reliably. Self-hosting can be done with a little fussing, Xorg built without too much trouble, but browsers are a major pain to compile.
There are some random observations of mine at
formatting link
and a wealth of knowledge on the mailing list.
Hope this helps,
bob prohaska
A
A. Dumas
Why post if you don't know. The Pi4 has a true 1 Gbps ethernet port and two usb 3.0 ports of 4.8 Gbps (what others now call usb 3.1 gen 1). This is possible because the new chip has PCIe (x1).
Also, get Fidonet to fix their clocks.
P
Pancho
I use my rpi4 4GB as a Samba Server using USB3 disks, 2.5 HDD and SSD. I can't remember exact figures, but performance was close enough to gibabit ethernet for me to stop worrying. 2.5 HDD needs an additional USB power supply
SSD USB to SATA cable.
2.5 USB to SATA cable.
I also use the same rPi 4 to to provide a number of other services via docker. Things like Deluge, Gitea, Gollum, Motion Eye. It isn't really powerful enough for motion eye (motion detection), but fine for the others
I seem to be running Unbound of my FreeBSD router (not a rpi), I'm not sure if it really is better than BIND or if this is just fashion. It does freeze occasionally, maybe once ever 3 or 4 months.
J
Jim Jackson
Buy an RTC addon for those times when it reboots, and setup NTPD on it, sync'ing from a couple of reliable internet timeservers. Then run the Pi as your network time source.
My home serving Pi is setup like that. Not that the RTC addon is used much, as my Pi only reboots once in half a dozen blue moons! I do sync the RTC from the system even day - so it isn't out by much if it does reboot, until it gets ntp sync. ntp maintained system time is far far more accurate than any RTC
I used the AB electronics PiZero RTC
D
druck
It will still be quicker than the old PATA drives on a old 386 system.
My Pi4 which I use as an NFS file server with a USB attached 2.5" hard drive and it does about 100MB/s locally and 50MB/s over the network.
---druck
M
Mike Scott
Thanks all for the comments. I've played with a pi3 (and earlier), but it's clearly too slow even for my home network; I'm sort-of hoping a pi4 would be up to the job. Just a little pricey to buy and try yet another unless there's a real chance it'd be a go-er.
Mike Scott
Harlow, England
M
Mike Scott
Now that sounds promising.... thanks for some real figures.
Mike Scott
Harlow, England
M
Mike Scott
On 29/11/2020 02:28, Derek.Moody wrote: .....
I've had fbsd running on the pi3, an unsupported 12.x. Actually, I'd seriously consider switching to a linux, except that I'm doing things using pf that don't seem readily possible with iptables (although maybe I've missed something).
The present pi3 has a rtc attached to help it on its way; the existing server has a (low-grade) gps dongle plus uses external ntp servers as backup. It provides time to our lan. Good to
Mike Scott
Harlow, England
A
A. Dumas
To avoid disappointment, I think you should try & establish some performance criteria, as detailed and specific as possible, that you'd be happy with. Then investigate if they can be met (for example, by asking here or on the RPi forum). For instance:
- must be freebsd
- will be used wired on a gigabit switch
- application is samba server
- large file read throughput must be x MB/s
I use my Pi4 4GB on ethernet, it boots from usb3 ssd, it's in a passive heatsink case (cpu temp below 40C for ambient of ~18C). It runs my development web server + database (apache2, php7, mariadb10) which it does fine. I run some backup scripts which I never notice interfering. I test bash scripts, no problem of course. Sometimes I fire up VNC from my desktop and use Mathematica on the Pi which is a bit slow but useable. Recently I set it up as a jupyter notebook server on the LAN which works well (but I end up using the local python install, anyway). Without overclock:
$ time /usr/bin/factor 1234567890123456789012345678901
(installed via MacPorts, then 'sudo port install coreutils')
M
Martin Gregorie
Interesting: for exactly the same number to be factored I see:
System Real User Sys CPU ====== Lenovo T420 0.254s 0,252s 0.002s 1.9GHz Core i5 Lenovo R61i 0.702s 0.693s 0.006s 1.6GHz Core Duo Whitebox PC 0.321s 0.314s 0.004s 1.0GHz AMC Dual Athlon RPI 2B 21.995s 11.496s 0.040s
I'd been wondering whether an RP14B would be a good replacement for the old AMD whitebox, but it looks as if a some sort of mini-ITX system would be a better bet because I do all backups via rsync to a removable USB drive connected to the old AMD system, and to do what I need it to do, a replacement would need a minimum of 4 USB ports plus SATA and a VGA- capable display port.
Thanks for posting those numbers, though - doing so gave me the kick needed to compare those speeds.
It's interesting that my Core i5 desktop is actually a little faster than the Core i7 Lenovo laptop as the Lenovo is newer as well and, subjectively, often feels a little faster.
Why my Pi 2B is so much faster than yours I don't know, it's a Pi 2B Revision 1.1.
However the real 'wow, that's a lot faster' thing for all of them was to move from spinning disks to SSDs. (The t470 of course had one to start with).
Chris Green
T
Theo
Bear in mind that you're probably running a 32 bit RPi OS (on the Pi 2 you will be), and the PCs are probably running 64 bit binaries. That'll make a large difference to the speed of the arithmetic for this test.
Also to note that GNU Factor can be compiled to use libgmp, which has custom assembler implementations of key functions. It appears the one on Ubuntu
18.04 isn't compiled that way, but that could make a large difference in performance if different OSes are compiled different ways (as well as the ARM v x86 comparison being different)
I don't think it's a particularly good benchmark to compare across architectures. And of course it's only single threaded.
That sounds like what you care about is I/O performance rather than CPU performance. Also bear in mind that mini ITXes are (mostly) a completely different power class from the RPi. Horses for courses.
Theo
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required
Report Content
You are reporting this content to the moderators. They will look at it
ASAP.