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 1 to 10

ardhitama

ardhitama

You won’t get perfect answer, but I always get the latest mainstream cpu, gpu, ssd, ram, mb, psu, monitor, keyboard, and mouse I can get at that time.

Just make sure you have >= 16GB ram and the others scale them proportionally to your budget, but usually it will be >1K USD to get future proof desktop.

jdumont

jdumont OP

I know RAM is biggie for most developer’s machines, but how much of that is browser (Chrome) and Electrion (Slack, Atom, etc) usage? Assuming there’s always some memory available, does more = better?

For example: if my RAM usage never really passes 4GB (quite usual on remote systems without browsers, etc) then how much of the remaining 12 in a 16GB system gets used for running builds and tests? Only what it needs, or everything it can lay it’s hands on?

If I do go the desktop (local development) route, it won’t be until later next year (tax reasons) but I’ll be looking to spend a solid amount of money (~£2500) with the hope of getting a machine that should last a good few years that I can selectively upgrade as new/better components become available. In many ways something like an iMac is the perfect computer for me — particularly if I go the remote dev env route — but I’m trying to break away from having to replace the entire computer every time I need to upgrade.

Basically, I’ll have the budget to build something powerful and future proof, but is it worth doing?

ardhitama

ardhitama

I have that close to dream PC that you want to build but I’m currently always using my 15” mbp on a docking station for dev works. That setup give me flexibility if I want to work while travelling.

jdumont

jdumont OP

That’s why I’ve grown so fond of the remote environment via SSH. It doesn’t matter where I am, or the computer/tablet/phone! I have in front of me, I’ve got my work environment exactly as I left it.

There’s a few reasons I’m not all in on it though, like the price of renting a dedicated server. Breakeven point is around the 2 years when compared with a similar spec desktop, and the desktop would last a hell of a lot longer than that. You have to factor in the clients to the cost too — iPad Pro is £1000+ and even a modest desktop with a nice screen and keyboard are going to be £500 £800+. Plus I also use my computer for a lot besides development (occasional photo editing and maybe even gaming given the specs I’m looking at).

Remote dev is genuinely the best experience, but it just doesn’t make financial sense when you’re as tight as me! :joy:

I’ve got sidetracked from my original question…

AstonJ

AstonJ

Interesting stuff! Which apps do you use on your iPad that let you develop remotely? I’m intrigued!

jdumont

jdumont OP

Blink is all I use.

I’ve wanted to work this way for years, and knowing that the dev tools for iPad would at best be slow to appear — if at all — I got comfortable with the command line, and using tools like tmux and vim.

I’ve tried apps like Coda for iOS but I didn’t get on with it. It still heavily relies on pointer-input rather than keyboard and just feels like it’s designed for some super light static HTML work. Any dynamic app where the URL structure doesn’t directly map to the folder structure of where the template/file is stored doesn’t work. Basically you have to be writing vanilla PHP with a strict file = page structure — does anyone still do this? Also I’m probably one of the only people that doesn’t really like Coda, even on desktop.

That said, I think Transmit — which they’ve now killed off for iOS — was fantastic. Most other native apps feel like poor counterparts to their originals. I just stay in Blink as a result. It’s mosh connection to a server is fantastic at reducing latency compared to straight SSH — you need to be on an extremely shaky < 3G connection to notice issues — and remains connected over the course of days & weeks, whereas SSH will disconnect just alt-tabbing to a browser and back.

I realised that ideally I wanted a Linux work environment (over OSX) and that Linux laptops aren’t the best (compared to the MacBook Pros I’m used to) but that I couldn’t be arsed to deal with all the faff that comes from setting up a nice desktop environment in Linux. The iPad & Linux-on-server combo fixes that. I get the best of the CLI along with great apps/OS for day to day browsing, emailing and design work. The iPads great build quality and battery life is the icing on the cake.

Regarding setup, I may end up building a home desktop/server that I can access using DDNS. That way I’d get the best of both worlds, assuming my local connection is stable/fast enough.

Back to original question…is it worth speccing an all-singing, all-dancing server for development use? Can I make big changes to the time taken to build an Elixir project and run tests?

EDITED TO ADD: The lack of decent browser devtools remains the biggest pain-point on iPads. There’s a few tools out there. Some don’t even work and others are basic and only get updates sporadically. I think there’s plenty of room for a iOS dev to make some good money building such a tool, as I’ve noticed more and more developers blogging about working this way. It started with 1 or 2 back in 2012, whereas there’s now a few dozen a month cropping up.

dimitarvp

dimitarvp

For development your factors are:

  1. CPU with more cores and ability to turbo-boost a single core when the need calls for it. Basically, it’s what most i7 CPUs do so you have quite a lot of choice.
  2. Never go below 16GB RAM, ever. You might end up working with an IDE, a CLI editor, and 10 console tabs, and a browser with 50+ tabs. It’s pretty normal for a programmer workflow. If there’s one thing you shouldn’t compromise on no matter what, that’s the RAM. If you can, aim for 32 or even 64GB. It will pay off thousand-fold.
  3. SSD > HDD. Especially if you compile a lot (that’s including Node.JS and frontend development in general – it’s not just about C/C++/Java) then SSD is a must. Even if is as small as 128GB, you can still manage quite well (unless you have to import huge databases).

Quite predictably, I would recommend you a MacBook Pro 2015 (15"). I got mine refurbished for about 1600 EUR – 512GB SSD, 16GB RAM, very strong CPU. This also allows you to carry it and put it in a stand in an office / coworking space with your own keyboard, mouse and maybe monitor. It’s a long-term investment, the thing is insanely fast and macOS is quite economical on RAM (if you use Safari).

If that’s way over budget for you, I would recommend assembling a cheaper PC at home with 16-32GB DDR3 RAM, 250GB SSD (Samsung EVO 850 are quite cheap and plenty fast) and a decent CPU (even something as old as the 2nd or 3rd gen of i7 are still VERY strong to this day) – and make sure you have access to it 24/7 from anywhere.

Don’t try for Linux laptops. It can work well but it’s mostly a surprise show with WiFi refusing to turn on after a wake-up, the machine not sleeping after closing the lid (and deforming its display in the process due to heat), static sounds from the speakers, sometimes even refusing to wake up… and whatnot. There are many people that make it work well but there are even more for whom it doesn’t.

Laptop: definitely a MacBook, don’t question it, just trust me. :smiley: (some people are happy with Microsoft’s Surface laptops but I have no experience)

Desktop: anything Linux.

michallepicki

michallepicki

I often use my cheap laptop to ssh into my beefier PC. Sounds like such setup might be fitting for you too.

jdumont

jdumont OP

Funny enough I have one of those exact same models next to me! I completely agree with you, and think that it’s still one of the best laptops ever built. That said, I’ve now given it to my wife as her iPad Mini wasn’t cutting it for her work.

I never got on with docking my MBP though. The screens I had access to were always inferior to the laptops own, and by the time you’ve hooked up a monitor, keyboard and screen it felt like a waste as you may as well be using any old computer.

Again, 100% agree on Linux laptops. The few I’ve had a play with just weren’t quite there. Plus, my main motivation behind all of this is get to a position where I can incrementally upgrade components, which basically means I’m looking at a desktop, or abstract the entire thing away by just renting hardware in a data centre.

I’ve been primarily looking at Ryzen chips so far. I hadn’t considered single-core Turbo performance, so maybe that’s something I’ll review.

I think I may end with this exact setup, just using my iPad instead of the cheap laptop

jdumont

jdumont OP

Also anyone wanting to learn about development on iPad should look at this article. Loads of people have written about mechanics of working on an iPad, but this one digs into why it’s such a good idea

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 91898 914
New
AstonJ
The obligatory hello world thread! Who are you and where are you from? :stuck_out_tongue:
4616 55835 594
New
caslu
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
arcanemachine
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
matt-savvy
Is there a word for the ~> symbol used in Version strings? Do you also just call it a Squiggle Arrow™ ?!
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
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
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge &amp; Solve. They are GUI (Emerge) and State management (S...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews