rpi4 as server?

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
Reply to
Richard Falken
Loading thread data ...

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
Reply to
Mike Scott

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  
 Click to see the full signature
Reply to
The Natural Philosopher

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

Reply to
Theo

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
Reply to
Derek.Moody

The CM4 (with the I/O card) has a PCIe slot ...

Reply to
Andy Burns

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

Reply to
bob prohaska

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.

Reply to
A. Dumas

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.

Reply to
Pancho

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

Reply to
Jim Jackson

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

Reply to
druck

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
Reply to
Mike Scott

Now that sounds promising.... thanks for some real figures.

--
Mike Scott 
Harlow, England
Reply to
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
Reply to
Mike Scott

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

1234567890123456789012345678901: 7742394596501 159455563099482401

real 0m2,086s user 0m2,075s sys 0m0,011s

Reply to
A. Dumas

My 7 year old iMac (3.2 GHz quad i5) is only about 8x as fast:

$ time gfactor 1234567890123456789012345678901

1234567890123456789012345678901: 7742394596501 159455563099482401

real 0m0,257s user 0m0,248s sys 0m0,004s

(installed via MacPorts, then 'sudo port install coreutils')

Reply to
A. Dumas

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.

--
--   
Martin    | martin at 
 Click to see the full signature
Reply to
Martin Gregorie

I cant get near those

Pi zero

--------

$time factor 1234567890123456789012345678901

1234567890123456789012345678901: 7742394596501 159455563099482401

real 0m9.186s user 0m9.156s sys 0m0.013s

Shonky old pentium used as server

--------------------------------- $time factor 1234567890123456789012345678901

1234567890123456789012345678901: 7742394596501 159455563099482401

real 0m0.452s user 0m0.440s sys 0m0.000s

quad core desktop

----------------- $time factor 1234567890123456789012345678901

1234567890123456789012345678901: 7742394596501 159455563099482401

real 0m0.224s user 0m0.220s sys 0m0.000s

But on most CPU intensive tasks the desktop is 4x faster than the server.

Compiling on the zero did however take about 20 times as long....

--
It?s easier to fool people than to convince them that they have been fooled. 
Mark Twain
Reply to
The Natural Philosopher

For what it's worth here are my figures for the factor test, though I doubt it has much relevance to throughput when running backups.

Lenovo T470: 0.221s 0.219s 0.001s Core i7 Desktop: 0.192s 0.191s 0.000s Core i5, Fujitsu Esprimo Pi 2B: 6.931s 6.924s 0.000s Pi 4: 2.124s 2.114s 0.010s

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
Reply to
Chris Green

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

Reply to
Theo

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.