jdumont

jdumont

TL;DR What facet of a computer really moves the needle in development performance (compiling/tests/etc)?

So, I know that an Elixir app uses its BEAM based magic to spread itself over all the available cores when running, and that a certain amount of memory will always be needed that scales with concurrent users or workload. But is the same true during compilation and testing?

I only ask because I’ve been recently working on an iPad using a remote DigitalOcean droplet. It’s a modest one ($20, 2vCPU, 4GB RAM) and I’ve found my workflow to be quite OK despite the low specs. I’ve also been using a 2014 Mac Mini on occasion which only has a paltry 1.4Ghz dual core, and again it performs perfectly well. In either case I’m never left waiting too long for builds, but tests do seem to be taking longer now that I’m getting to a decent amount.

We’ve bought a house and I’m looking to end the nomadic working life and setup a nice office with a desktop. I’ve also considered acquiring a dedicated server to continue working over an SSH connection as I’ve really grown to like it’s benefits.

I’ll be looking to spec a nice large monitor and good keyboard as I think it’s a given that these are good for productivity/developer health; but the other hardware is still up for debate.

I tried scaling my current droplet up to get a feel for the performance increases I could expect to see. I bumped it up to the $320 per month (insane amount of money!) CPU optimised server with 16vCPU and 32GB RAM.

In an admittedly non-scientific and basic test I compared compilation times from a clean state. The $20 server built my current project in about 35 seconds, but surprisingly the $320 took 22 seconds. I was expecting a much larger change to be honest. I rarely have to run a full build, so those 13 seconds a few times a month definitely aren’t worth $300.

Now, these being VPS’ I might be losing some of the raw power I could get from a dedicated server or desktop running similar specs - more testing needed. I had a octa-core Xeon server from Hetzner kicking around until last month, but never tested Elixir on it. I may provision one just to have a play.

In short, is it worth building a powerful desktop (or renting a powerful dedicated server) for Elixir dev? Or is it a case that my current DO droplet is “enough” and I should keep my hard-earned in my pocket and look for efficiencies elsewhere?

Showing Posts 71 to 62

jdumont

jdumont OP

Sorry for taking so long to reply. Funnily enough I’ve been working on iOS apps lately — so haven’t been on the forum — and bought an M1 MacBook Pro on release day to use for these projects.

Having just picked up another Elixir project I decided to have a go with the M1 rather than my Ryzen-based desktop just to benefit from that mobility (and the insane battery life).

As I’m sure you’ll know by now from other threads/blog posts, Elixir runs brilliantly on Apple Silicon. With brew now supporting AS natively, install and setup is easy and I’ve yet to have any problems. I’m using PostgreSQL through Postgres.app which does use Rosetta, but as-per pretty much every other Rosetta app, it’s been problem-free.

Performance is really good. The Erlang VM sees (and appears to use) all 8 cores and compilation speed seems pretty comparable to my Ryzen 3600. No complaints from me!

marknijhof

marknijhof

Any predictions on the new M1 architecture and running a dev environment on it? Postgress, compile Elixir ect.

My current Mac is ready for a refresh and I am thinking about the new vs old chipsets, I work a lot without a power supply so battery life is a bit important, but either will be better than what mine is doing now :wink:

jdumont

jdumont OP

If you’re comfortable with Linux on the CLI then I’d highly recommend looking at using the iPad as a client for remote dev environments as detailed here. It’s still my favourite way to work and I get the benefits of a simple and polished OS for things like email, web browsing and photo editing. Would 100% recommend it!

I think that’s really our conclusion here.

Exact reason I went X570 motherboard instead of B450.

Not to mention how the OS uses those monitors to their best. The way they handle HDR content in parts of the display is a game changer. Much better than HDR on Windows which is kind of a mess.

Ah, not all UltraSharps are alike. I bought the UP2718Q which is a 27" 4K monitor with local-array dimming and great colour-coverage/accuracy. It costs around $1500 depending on deals, whereas the U2718Q (note: the missing “P”) is a 27" 4K monitor without the goodies and costs a lot less (~$500). I read so many reviews that confused the two which explained why some people thought it was great and others average. Stupid naming from Dell…

I’ll look at the HPs as I still need a new monitor, but decided to put it on the backburner for now.

sribe

sribe

The HP 32Z 4K monitors are way better than the Dell so-called UltraSharp. And the LG 5K is really nice, but might not be supported widely outside MacOS.

dimitarvp

dimitarvp

That’s absolutely and demonstrably true. Compilers do require your CPU to be of certain generation and have certain opcodes to work at good speed. Basically anything from an i5 and above is very well equipped for the job (i3 are absolutely crap for compiling code though). My i7 3770 (3.7GHz, 4c/8t) and Xeon 2150B (3.0GHz / 4.0GHz boost, 10c/20t) barely have a difference when compiling a 400-file Elixir project: 15s vs 12s.

Sorry we all kind of derailed the thread. Yeah, Elixir doesn’t require much, that is true.

Oh that’s true. I’ve read one very good and thorough review showing that the Sabrent Rocket barely has an edge over the Samsung 970 Pro. But I view PCIe 4.0 as a very solid future-proofing. 5 years at least, I’d even give it 10 because honestly, with that kind of bandwidth you are looking at 12GB/s for SSDs at some point in the future, and about 120GB/s for RAM, and who knows how more for the GPUs.

I view PCIe 4.0 as a good stopping point for a good amount of years. If the motherboard and PSU are solid, such a machine can last you a very long time.

Absolutely. 4c/8t is a minimum, 6c/12t is very good and 8c/16t might even be an overkill, due to RAM channel count and I/O limitations.

I bought the iMac Pro for many reasons – absolutely gorgeous display, sharp text rendering (macOS after all), very powerful CPU, ECC RAM, insanely fast NVMe SSD, very capable and respectable GPU, and good extensibility (I have a small army of cables behind it connecting to 5 external HDDs / SSDs, a hub, headphones, SD card reader, sound system and whatnot. But the main reason was, again, future-proofing. And that after having it for 6 almost months I have not once heard its fans. It’s not whisper-quiet. It’s actually not audible.

Can confirm. I went to a local supplier of computer parts shortly before buying the iMac Pro in SEP-2019 – and these guys supply like 1/3 of the Balkan Peninsula with computer parts. A very polite guy showed me around the displays showroom (all displays were live and were iterating through the same 5-10 wallpapers) – literally 120+ displays. We talked for hours, the dude was extremely well informed and told me a lot about the current breed of monitors. Nothing even came half-close to Apple’s quality of displays. He told me his boss has a reference display that costed about $30,000 and it was still deemed low-end.

So iMac Pro’s display, the LG’s UltraFine 5K and the Apple XDR displays are basically the best of the best right now. And I am grateful for iMac Pro’s display every day. I have no clue what or how they did it but my eyes get less tired when using it even after 12 hours – I start getting muscle cramps on my lower back but my eyes are fine. Only my gaming PC display can do the same and even it does it slightly worse.

maz

maz

WIth iOS being my “bread and butter” I know it’s not realistic to completely wash my hands of Apple. I have three macbook pros and a mac mini and they’re starting to get “old” but you are right my 15" Macbook Pro 2013(with 16gb of memory mind you) still runs really well with Catalina.

Apple is likely to switch away from Intel chips for the next MBP revision. Something else to think about …

jdumont

jdumont OP

Sorry, I totally ignored this in my follow-up.

I’ve done a LOT of exploring outside the Apple bubble the past 18 months and it’s been really interesting. I’ve got excited about computers again in a way that I haven’t been for years (even prior to Apple’s stumbles with the 2016-era MBPs).

With all that said, I think that the new 16” MacBook Pro’s probably represent the best option for a developer that likes macOS — seems like a pretty “duh” statement, I know.

Windows/Linux laptops are OK. The computing hardware and even the OS may be fine but the general build quality of them still lags behind.

My favourite laptop I tried in this period was the ThinkPad X1 Carbon. Great size and weight, good specs and an OK-ish price. Runs Linux well, etc, etc. The reasons that I liked it would make one of the new 2020 MacBook Airs a good buy, but if it were my money I’d still hold out for 13/14” MacBook Pro.

If desktops are your thing then I’d strongly recommend building your own. Not much more to say really. You can run Windows, Linux or a Hackintosh but whatever option you choose your OS will be a compromise in my opinion. That said, the hardware you can buy is just incredible and makes up for the shortcomings of whichever OS you choose.

For reference I spent around £1000 on my PC build above and I didn’t cheap out on anything. I later spent another ~£150 to improve the cooling. It is comparable performance-wise to around a £3-4k spend with Apple.

Biggest difference between PC desktop and a Mac will be the monitor. Even if you’re willing to spend big money, it just won’t be quite as good as that 5K iMac display. I should know…I dropped £1400 on a very fancy Dell 27” 4K monitor will excellent colour accuracy, etc but returned it shortly afterwards. 4K @ 27” is an awkward size from an OS scaling point of view and there seems to be a real lack of high quality monitors at high resolutions that aren’t geared towards gaming.

As dull as it is, I still think for a developer looking for a single machine that can do it all, the MacBook Pro is still a really solid option. A pricey one, but it’s been shown that they do represent a good long term investment. My 2015 is still soldiering on after all, even if it desperately needs a new battery!

jdumont

jdumont OP

I should probably update this thread given that things have changed since I last posted!

Over the Christmas / New Year break I decided that it was time to bite the bullet and build a PC. I had been working on a C#/gRPC project for about 6 weeks, using my MacBook Pro - sometimes booted in macOS, sometimes booted into Windows. A few things conspired that meant it was time to spend some cash!

Firstly, I got a mixture of Bootcamp and Windows 10 updates that bricked the wifi connection - I was lucky to see 0.5Mbps even though the same computer booted into macOS was getting my full 70Mbps. Secondly, gRPC services in .NET require self-signed certs to be generated, something that wasn’t done automatically in macOS as it was in Windows and Linux. In order to stay productive I decided to go with the flow and build a Windows desktop.

I opted for an X570 motherboard (to gain PCIe 4.0) and a Ryzen 3600. 32GB of 3600MHz memory and multiple M.2 drives, one PCIe 3.0 (Samsung 970 Pro) and one PCIe 4.0 (Sabrent Rocket 4).

Quick aside about building a PC — it’s so much easier than I ever thought. Fun too. I was actually sad when I had everything the way I wanted and there was no more fiddling to do.

On to performance:

I would say that for most developers working with Elixir, then the Ryzen 3600 is more than enough. I certainly don’t feel the need to push to Threadripper.

My C# project (ergh) could definitely benefit from a bit more ooomph but I’m not sure whether clock speed or cores would be the factor that makes a difference. It may not make any, Visual Studio just seems to hang regardless.

At present I’m also developing quite a CPU, disk IO and memory heavy Elixir app. It uses an event sourced architecture with all events being written to disk directly and also cached in an ETS table. Those events get published out to consumers (GenServers, ETS tables, external services, etc) which update their state in memory and also write backups to disk occasionally. It is about as stateful and resource heavy as is possible.

On any given day I’m developing with local data that is equivalent to around 6 months of data for ~5000 users which can range from 3-6 million raw events. I rarely see my RAM usage pass 16GB, I’ve never noticed any IO bottlenecks even on the PCIe 3.0 M.2 drive (or for that matter a ZFS RAIDZ1 array using old HDs) and when compiling or running tests the CPU is maxed on all cores/threads (indicating they aren’t being starved of RAM in this 2 channel setup?). To my mind, this is about as much a torture test as any developer is likely to be working with on their machine and the resources I’ve got feel more than adequate. I never feel like I’m waiting.

As per my previous tests, I noted a point of diminishing returns for compile/test duration and that starts immediately beyond dual cores (on Digital Ocean VMs and various bare metal machines). @dimitarvp point about the number of RAM channels may actually explain why the compilation performance of the VPS’ tested above starts to get really inconsistent. The real jump in performance (from a developer standpoint, if not a production one) is from single to dual and then possibly to quad. I feel that if you’ve got a quad/hexa core CPU that can boost to a reasonable (3Ghz+) speed then you’re in a very good place as a developer.

Of course you may want more or faster cores, more RAM, etc, but that will almost certainly be because of other requirements (video/photo editing, other languages, etc) or just vanity. On that note, I may upgrade to the 3950X when the Gen. 4 Ryzen CPUs come out and it drops in price, but I can’t stress enough that it will because I can rather than because I need to or will see benefits from it.

@dimitarvp Honestly, I struggle to tell the difference between my PCIe 3.0 and PCIe 4.0 drives. I don’t think that drives alone (at least in the volume that a desktop/workstation has) are impacted by PCIe 4.0 speed. Don’t get me wrong, I’m glad I got a 4.0 board and drives, but the 3.0 drive does not represent any sort of bottleneck.

After all this, I actually checked htop when I was working on my old development server the other day (although I should probably retire it). It wasn’t breaking a sweat and felt just as fast to work on as my desktop (with a similar data set) and that’s running a 4700K from 2013.

I know I’m the one that posed this question originally, but I think that the horsepower of an Elixir developers machine really doesn’t matter. You won’t see time/cost-savings as a video editor would from splurging on an expensive and powerful machine.

I’ll probably keep this computer around when the C# project is wrapped up but it’ll likely become a home server and I’ll go back to working on a modest remote bare-metal server from my iPad (or possibly remote in to this machine if I can sort the networking out).

dimitarvp

dimitarvp

It does, sadly. This has to do mostly with two things:

  1. The RAM channels are usually 2 on most machines but a good chunk of the workstations have 4 channels of RAM. My Xeon-2150B with 10 cores (20 threads) and 4 channels can fully saturate the memory channels and then some of the cores have to wait for memory access. To be 100% objective though, not many workflows get limited by this.

  2. Most software is just not written to properly utilise any CPU cores at all. I’ve seen various projects that hardcode single-core – or no more than 2-4 parallel tasks running at the same time. Most of this software installed somewhere will never be updated.

But the diminishing returns mostly come from either I/O limitations (SSD and network speed) or actual motherboard bandwidth issues (like the 4 channels of RAM for 10-core CPU). The software will eventually be fixed but the hardware has to be ready.

That’s why I commented above that buying a PCIe 4.0 enabled motherboard and a Threadripper with tons of RAM (at least 64GB although I’d go for the maximum of 256GB if given the choice), and then put PCIe 4.0 SSDs. There will be very few hardware limitations with such a setup.

“Only” the software will have to be evolved. That’s why Elixir is still an excellent choice – write your code right and Elixir just gets out of the way and you can saturate your I/O pipes quite easily. And you get bonus fault tolerance, transparent parallelisation. And the program will still work at the maximum possible speed due to I/O limits so there’s no point to use C++ or Rust or D or anything natively statically compiled.

ardhitama

ardhitama

Recently I upgraded to a 64GB machine with Ryzen 5 3600, don’t be like me :slight_smile:

Though my rationale is that I will upgrade the cpu to high end ryzen 4xxx series later this year.

And for my elixir and non elixir projects, my 6 cores machine is holding up surprisingly well. Wondering if processor count can have diminishing returns for a mere dev machine.

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 94592 917
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
heathen
Quite interesting article Google brought me. Didn’t find any mentions about it here. What do you think in general? Would you use togethe...
New
AstonJ
Since we have deprecated our Erlang sections (as we have dedicated Erlang Forums now) let’s add this thread for those who’d like to post ...
New
maennchen
:warning: Security advisory: Decimal DoS vulnerability A vulnerability has been published for decimal where very large exponents can cau...
New
Null-logic-0
What IDE or editor are you using for Elixir development? Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New

Other Trending Topics Top

marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
webofbits
Aludel - LLM Evaluation Workbench Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews