rpi4 as server?

Thats easy: mine is one of the early 512MB jobs.

:-)

I got the T420 as a replacement for the old R61i and was going to sling the latter when its disk (120GB) failed because its disk interface hardware refused point blank to handle any disk of over 256GB, and by that time you couldn't find any disks of less than 320GB capacity. But it seemed a shame to bin it, so I fitted a 128GB Sandisk SSD and was amazed by its performance for disk-related stuff. It still seems slow for compiles etc, though, compared with the T420.

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie
Loading thread data ...

Indeed the AMD box doesn't do a lot: it runs my local website (apache) plus my getmail/spamassassin/postfix/dovecot mail handling chain plus a couple of Java/PostgreSQL applications that do their heavy lifting at night along with an rsnapshot disk backup. The only time it gets a decent workout is once a week when every system that is backed up gets rsynced to a USB drive attached to the AMD box immediately before a software update. So, as you thought, I care more about its i/o throughput than its CPU performance.

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

That it does.

RPi-4B 32bit 2.079s 2.075s 0.000s RPi-4B 64bit 0.633s 0.627s 0.001s

By comparison

Lenovo X1 0.172s 0.167s 0.004s 2.60GHz i7-9850H CPU x 6

---druck

Reply to
druck

Its much the same here, except that the T420 laptop is 3-4 times faster than the AMD Dual Athlon for decent sized Java and C compiler runs while the RPi is about the same speed as an OS/9 system I used to have, that ran on an 8MHz 68020.

The other thing I really notice is when I'm writing or debugging C or Java, the T420's first compilation run of the day typically takes 3-4 seconds and all subsequent runs are under a second. This seems to be due to memory caching: the first run pulls compilers/linkers/JVM/make or ant into RAM along with most of the source files and they stay resident until doing something else with large memory requirements kicks them out.

--
--   
Martin    | martin at 
Gregorie  | gregorie dot org
Reply to
Martin Gregorie

Also, like you said, both Martin and OP care more about I/O than CPU arithmetic I think. Definitely a very flawed test, but it was quick. It was just one example of a possible performance criterium.

Reply to
A. Dumas

Nice. Here's another number to try which should take about 10x as long: $ time factor 101060998680964776859557640281323

Reply to
A. Dumas

0m1.953s (7 year old Xeon E3-1245 v3)
Reply to
Andy Burns

there is a lot of IO involved when compiling as well.

I was wondering if someone considered the 32 vs.64bit. Here some results on the CPUs that I have. #3 is RPI4B with 32bit. #4 is Geode 32bit.

The test might be discriminating the 32bit by the number size to be calculated

$ grep "model name" /proc/cpuinfo model name : Intel(R) Core(TM) i5-2400 CPU @ 3.10GHz $ time /usr/bin/factor 1234567890123456789012345678901

1234567890123456789012345678901: 7742394596501 159455563099482401

real 0m0.241s user 0m0.237s sys 0m0.001s

# grep "model name" /proc/cpuinfo model name : AMD FX(tm)-4100 Quad-Core Processor

# time /usr/bin/factor 1234567890123456789012345678901

1234567890123456789012345678901: 7742394596501 159455563099482401

real 0m0.332s user 0m0.320s sys 0m0.000s

# grep "model name" /proc/cpuinfo model name : ARMv7 Processor rev 3 (v7l) # time factor 1234567890123456789012345678901

1234567890123456789012345678901: 7742394596501 159455563099482401

real 0m6.358s user 0m6.321s sys 0m0.002s

# grep "model name" /proc/cpuinfo model name : Geode(TM) Integrated Processor by National Semi # time /usr/bin/factor 1234567890123456789012345678901

1234567890123456789012345678901: 7742394596501 159455563099482401

real 0m37.042s user 0m35.503s sys 0m1.408s

Reply to
Deloptes

Mi rPi4 Samba file server using two USB attached drives gives:

SSD I get 345 MB/s local read, 110MB/s over the network read&write.

I get slightly slower than you for a very old laptop 2.5" HDD. 90 MB/s local, 45MB/s network.

Local was measured using hdparm.

I'm curious as to why the 2.5 HDD is only half speed over the network?

Reply to
Pancho

Hello Pancho!

Tuesday December 01 2020 19:45, you wrote to druck:

This is not so difficult to work out starting with the results you got so:

345 MB/s = 3450 Mb/s b = bits. 110 Mb/s = 1100 Mb/s.

What is the speeds of a USB port ?

USB 3 same as 3.1 (gen 1) defaults to 480 Mb/s but can go to 5 Gb USB 3.1 gen 2 is speeds up to 10Gb.

USB 3.2 has :

Gen 1x1 (previously known as USB 3.1 and USB 3.0) = 5Gb

Gen 1x2 = 10Gb

Gen 2x1 (previously known as 3.1 gen 2) = 10Gb

Gen 2x2 20Gb.

These speeds are the USB standard and does not mean that the mobo manu fully supports these speeds not that the specific hardware that is linked to them does the same as other I/O gets in the way.

Read speeds are always better than twice as fast as Write speeds as more work is needed at least for SSD units as it has to find a clean sector.

Hence another reason foir using fstrim nightly. fstrim is part of linux-utils.

It should be installed as standard if the install system sees's one but that does depend on the distro authors.

Note that the Pi4B spec shows that 2 USB 3.0 and 2 USB 2.0 ports are fitted so not that fastest available but for the brand nothing new as they are hardly working any where near the edge of technology other than having a Gigabit Ethernet port which could be used say with a fast NAS.

Vincent

Reply to
Vincent Coen

RPi-4B 32bit 28.093s 28.080s 0.004s Single core max 1.5GHz RPi-4B 64bit 7.717s 7.713s 0.000s Single core max 1.5GHz Thinkpad X1 1.848s 1.842s 0.004s i7 Single core max 4.2GHz

---druck

Reply to
druck

An M.2 to 2.5" SATA (or PATA, if it's old enough to use that) adapter is one route to getting smaller drives for older computers. I recently dropped a

240GB M.2 stick into a G4 Mac mini (probably slower than a Raspberry Pi 3, to keep on topic) this way. Boot time into Mac OS X is measurably quicker, and the extra space is now hosting a Gentoo Linux install. Total cost for the M.2 stick and the PATA adapter was about $40.

_/_ / v \ Scott Alfter (remove the obvious to send mail) (IIGS(

formatting link
Top-posting! \_^_/ >What's the most annoying thing on Usenet?

Reply to
Scott Alfter

Wow, what a difference. I got ~exactly the same for RaspiOS 32-bit but my Ubuntu 20.10 Desktop 64-bit seems consistently a little slower at around 7.885s. Not doing anything else so I can't imagine it's background tasks. Perhaps slightly different libraries or compiler settings for factor? (checking) Well, the slower one on Ubuntu seems to be newer at least, at version 8.32 vs. 8.30, ha!

Reply to
A. Dumas

Don't disregard the fact that the clock rate may be slightly different.

I have no idea what a pi uses as a master clock oscillator, or whether it is a variable thing.

Ah.

"Although 1.5GHz is its maximum speed, Raspberry Pi typically idles at

600MHz and switches to the maximum speed when needed. Overclocking is the process of setting a higher maximum speed for computer components. We can adjust the settings in config.txt to overclock both the CPU and GPU (graphics processing unit).

We?ve experimented with speeds up to 2.147GHz for the CPU and 750MHz for the GPU (up from its 500MHz default). These are the kinds of speeds found on high-end desktop computers.

Your mileage will vary and, if Raspberry Pi gets too hot, it will slow right down. Experimenting with overclocking will crash Raspbian, and there is a high chance your Raspberry Pi will refuse to start at some point. If programs start crashing, or Raspbian refuses to start, you will need to dial back on the speed. But overclocking is fun and potentially a way to get more from Raspberry Pi."

So it seems that it is all variable

--
"The most difficult subjects can be explained to the most slow witted  
man if he has not formed any idea of them already; but the simplest  
thing cannot be made clear to the most intelligent man if he is firmly  
persuaded that he knows already, without a shadow of doubt, what is laid  
before him." 

    - Leo Tolstoy
Reply to
The Natural Philosopher

....

Many thanks to all who've replied.

After two brief power cuts in as many hours yesterday, which played havoc with the existing machine(*), this looks like a project for the new year, along with a ups - so any suggestions for a good ups for a

24/7 pi server please? A quick look round suggests I could pay nearly as much as the pi would cost, so any ideas for something cheap(-ish) and reliable would be welcome.

Thanks.

(*) Weird things happened: it hung twice while trying to reboot, then rebooted on the 3rd try: but fsck moaned about sundry files, even though the ufs file system is journalled.

--
Mike Scott 
Harlow, England
Reply to
Mike Scott

You could do worse than a continuously charged 11V lithium pack or 12v car battery and a 5V switched regulator.

How many amps does a Pi draw? How long do you want it to stay up?

--
Socialism is the philosophy of failure, the creed of ignorance and the  
gospel of envy. 

Its inherent virtue is the equal sharing of misery. 

Winston Churchill
Reply to
The Natural Philosopher

I happen to have a large battery that is charged from a 5 V USB charger (Micro USB input) and supplies 5 V (on a USB-A output). I thought I could use this as a UPS - particularly to keep a Pi going for brief < 5 second power cuts that were plaguing our village (overhanging trees touching the high voltage feed to a substation).

But sadly this battery cuts off its output as soon as either an input cable is plugged in or 5V is supplied at that input (I forget which), and this rather scuppers that plan. :-(

Reply to
NY

Single core max 1.5GHz

I ran it several times and took the lowest time.

That ensures everything is cached in memory and the CPU has switched to the highest frequency, and filters out to some degree short lived processes which may be running in the background.

Normally you see the times decrease during the first few runs, then level out. If you have insufficient cooling you might see times go back up as the CPU thermally throttles.

---druck

Reply to
druck

Some "powerbanks" can provide power while charging (all of mine can) and there are some USB-C ones that support USB-PD at various levels (18W is common, 30W and even 60W are available) but I don't know if any of those will supply power while charging (ask before buying).

Do post back in here if you find a good one.

--
Steve O'Hara-Smith                          |   Directable Mirror Arrays 
C:\>WIN                                     | A better way to focus the sun 
The computer obeys and wins.                |    licences available see 
You lose and Bill collects.                 |    http://www.sohara.org/
Reply to
Ahem A Rivet's Shot

There are ways around this sort of thing, in hardware. Personally I would probably build my own UPS.

A decent 12v battery, a 5v switched regulator and a constant voltage trickle charger.

Batteries and trickle chargers are standard automotive kit. a 5V switching regulator is something that is most easily sourced as an RC model spare, where they are used to step down flight battery power to servo and receiver voltages e.g.

formatting link

Connect the trickle charger to the mains, the battery to the trickle charger and the SBEC to the battery and the Pi to the SBEC....

--
If I had all the money I've spent on drink... 
..I'd spend it on drink. 

Sir Henry (at Rawlinson's End)
Reply to
The Natural Philosopher

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.