TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Can My Water Cooled Raspberry Pi Cluster Beat My MacBook?

149 pointsby giladabout 4 years ago

14 comments

thraway123412about 4 years ago
2GB Pi is $55 on amazon. 4GB version is $62. That&#x27;d be $450+ for the eight pies.<p>Ryzen 2700 launched at $300 (and tapered down to ~$200) and would pretty much run circles around such a Pi cluster.<p>Just saying. These Pi clusters can be a cool and fun thing to build but if you&#x27;re looking for compute power, you&#x27;d be better served by a mid-range desktop.
评论 #26591077 未加载
评论 #26591784 未加载
评论 #26592073 未加载
评论 #26591017 未加载
artiscodeabout 4 years ago
I would really like to see how a raspi cluster fares with &quot;real world&quot; loads, like running an app or a distributed system, instead of calculating pi. I&#x27;m genuinely curious whether there would be any gains by running Docker containers, each on a separate Raspberry Pi. I personally am a web developer, therefore my technology stack is almost always the same - an app server, a background worker, a queue and a database. Often the app server and the background worker is the same process, therefore a cluster of 3-4 Pi&#x27;s would be sufficent for such workloads. Theoretically the combined horsepower of all these Pi&#x27;s should stack up and deliver better performance than writing code on my M1. Or perhaps I&#x27;m trying to solve a problem that doesn&#x27;t exist.
评论 #26590873 未加载
评论 #26597168 未加载
评论 #26590172 未加载
smallpipeabout 4 years ago
This is fun and all, but the benchmarks here aren&#x27;t really what the author seems to think they are. This isn&#x27;t &quot;computationally expensive&quot;, the script is basically only control flow, where the CPU spend more time doing variable lookups than the actual computation. This means most of the pipeline width sits completely unused, whcih is a pretty large disservice to the M1 and the i5.<p>There&#x27;s also no control for the thermal throttling of the M1, which is probably why the 100,000 example is performing worse.
评论 #26591803 未加载
评论 #26591709 未加载
m463about 4 years ago
I tried FindingPrimesMulti.py on a 3970x:<p><pre><code> Find all primes up to: 10000 using 256 processes. Time elasped: 0.51 seconds Number of primes found 1229 Find all primes up to: 100000 using 256 processes. Time elasped: 36.71 seconds Number of primes found 9592 Find all primes up to: 200000 using 256 processes. Time elasped: 149.55 seconds Number of primes found 17984 </code></pre> EDIT: ran it again:<p><pre><code> Find all primes up to: 200000 using 256 processes. Time elasped: 145.76 seconds Number of primes found 17984</code></pre>
评论 #26590583 未加载
评论 #26597116 未加载
评论 #26592022 未加载
评论 #26589209 未加载
kortexabout 4 years ago
Using Ray distributed would be a better stress test. Computing primes this way probably isn&#x27;t the best way to saturate cores. You are spending a lot of time doing python vm operations vs pure number crunching.<p>Using numeric arrays chunked into blocks of number ranges would be more efficient (and therefore &quot;crunchier&quot;)<p><a href="https:&#x2F;&#x2F;ray.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ray.io&#x2F;</a>
评论 #26593467 未加载
toyota86about 4 years ago
The test script didn&#x27;t share the load across processors so the author is rerunning the tests. It seems the graphs therefore are misleading (for now).<p>Nevertheless this is not as interesting as testing the M1 chip on the latest MacBook offering. I feel a bit misled but perhaps it was just my fondness for the M1 causing this bias.
评论 #26590371 未加载
danbrucabout 4 years ago
There are only 1229 primes up to 10,000, not 1230 as the article says. Not sure whether this is a bug in the code or a typo in the article. I still remember this because 25 years ago as a teenager I spend quite some time making primality testing as fast as I could. My implementation was certainly not as naive as the one from the article - only testing up to the square root of n, only testing against primes I had found before - but not sophisticated in any way, for that I lacked the mathematical knowledge. I can not exactly remember how fast I got it but I am pretty sure it was sub-one-second, like 0.2 or 0.3 seconds maybe for the range up to 10,000. On a 50 MHz i486.
评论 #26591036 未加载
908B64B197about 4 years ago
His workload is embarrassingly parallel[0] and the message-passing between the Pi is basically free since the results are so small to send-back (and there&#x27;s nothing to send to each node on startup). He&#x27;s effectively doing a trivial map-reduce [1].<p>He could probably get even better than the Pi cluster by using a (single) GPU.<p>[0] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Embarrassingly_parallel" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Embarrassingly_parallel</a><p>[1] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;MapReduce" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;MapReduce</a>
nielsbotabout 4 years ago
I assumed it was the M1. (It&#x27;s an Intel MacBook.)
评论 #26589660 未加载
chetangotiabout 4 years ago
Site got HOD. Here is <a href="https:&#x2F;&#x2F;archive.is&#x2F;jhbQV" rel="nofollow">https:&#x2F;&#x2F;archive.is&#x2F;jhbQV</a>
评论 #26588772 未加载
neatzeabout 4 years ago
From quick overview seems like speed up is achieved because there is comparison of 4 local processes, versus 16 processes, since it is only single gather operation does not seem like latency would make much of difference.<p>I wonder what performance would look like on 5 years old 16 core CPU from ebay for like $20, compared to py cluster.
评论 #26590938 未加载
shaggie76about 4 years ago
I&#x27;d be curious the relative power draw -- is the performance&#x2F;watt actually better?
wil421about 4 years ago
M1 Air Results:<p>10,000: 0.52 seconds.<p>100,000: 41.48 seconds.<p>200,000: 157.68 seconds.
hutrdvnjabout 4 years ago
Please redo the benchmark against the M1.
评论 #26592012 未加载