HACKER Q&A
📣 herodoturtle

Is 8gb RAM enough for a Linux dev laptop?


New laptop, core i5, plugged into external 4K display, 5 to 10 chrome tabs, the odd full screen zoom meeting.

On a budget, and the 16gb option in my area (very remote) is more than double the price.


  👤 Octabrain Accepted Answer ✓
With laptops (and few other things), I have a personal rule: It's better to spend a bit more and enjoy it than save money and suffer it. Having said that, if your budget is that tight and there's no possibility of saving a bit more in a reasonable amount of time, I would go for the 8GB version *only* if the model allows to upgrade the RAM, then, months later, after saving a bit of more money again, purchase more RAM and add it. If the model is one of those where the RAM is soldered, I wouldn't even bother.

👤 satysin
Question. Why a laptop if you're plugging it into a monitor and therefore using it like a desktop?

Does it have to be a laptop? If you just want something portable you can take from place A to place B and use with a monitor have a look at mini PCs. They're smaller than a laptop (about the same weight) so you can pop it in your bag easily to move around if that is your need.

The only real limitation is you can't sit down in a coffee shop to work. But if you have a couple fixed areas of work they are far more cost effective than a laptop and actually allow for upgrading (RAM and SSD anyway, more than you get on most laptops these days).

FWIW I picked one up for my son a couple of months ago. It's a Ryzen 5600H with 32GB RAM and 500GB NVMe SSD. Runs Windows 11 and Fedora perfectly. Does a little gaming but is mostly for school work. Makes a solid little dev system though.

Not to mention it had perfect Linux support out of the box. Literally everything worked (wifi, bluetooth, both HDMI with 4k60, etc) whereas on a laptop it can be a real pain to get everything working right. You can avoid so many headaches going mini pc over laptop.


👤 alexwasserman
I think this depends most on your personal dev workflow and where heavier tasks are happening.

At one then of the spectrum you can just be browsing for info, then writing code in vim, and that's it locally, if you push code up to a remote git server and that triggers remote build, test and deploy. Or even just remotely connecting into a heavier linux dev box (eg. in a cloud).

On the other end you're using a heavier IDE which triggers local recompiles on every save, heavy code indexing locally for a big project, builds are then spun locally into VMs or containers running on your local machine, etc.

8Gb is going to be fine for the first example. It will not be nearly sufficient for the second.

Browsers on linux tend to get pretty heavy, as that's often where you'll be running a mail client, video calling, Slack, etc, and they aren't exactly lightweight these days to start with.


👤 quesera
It very much depends, but for a point of comparison:

With only 4GB, I have been mostly happy running:

  - Xfce
  - Firefox with thousands of tabs (most unloaded, and uBlock Origin installed!)
  - Postgres
  - Rails (one big app at a time)
  - Nginx
  - Slack desktop (Electron app)
  - tmux
  - vim as IDE, dozens of buffers, zero? plugins
  - zram for memory compression (kernel configuration.. this is critical)
  - Small (256GB) but quick SSD
  - Zero swap configured
  - Zero VMs locally!
If you are running Gnome, or Chrome, or Eclipse, or a big Java app, your experience will definitely be less good.

My biggest consumers were Firefox and Slack. Restarting these apps nightly kept things under control.

I set this machine up as a temporary thing for a temporary project. It didn't turn out to be temporary, but it took me years to get around to migrating to a new machine, which I did just a few months ago. I was shocked at how "actually really OK" it turned out to be.

And this was with 4GB, not 8GB! So, I'd respond with "Yes, maybe."


👤 maxibenner
I've been using a Macbook Air M1 with 8gb of ram to run a bunch of Chrome tabs, multiple iOS simulators, docker, an external display, plus the obligatory slack and zoom apps simultaneously and never ran into any issues. I assume most linux distributions would handle this even better than MacOS but anyone correct me if I'm wrong.

👤 sjellen
8gb is enough, but I wouldn't buy a new laptop with 8gb unless I could update the ram in the future.

👤 washadjeffmad
Consider balance. If one spec is too low, the rest of the system might as well be configured with fewer resources.

RAM is also not all the same. 8GB DDR4+ paired with NVMe will perform better than 32GB DDR2 with a mechanical hard drive. This is part of why I'd take an M1 MacBook Air over a 16GB Intel Mac.

If your storage is slow / high latency, then swap will be slow. If RAM is low and swap is happening often, then the system will be difficult to use. zswap/zram can help, as well as adjusting swappiness if you run into issues.

I'm using a 4GB Chromebook and a 4GB Raspi 4 for a lot of work lately, and I'm enjoying the constraints.


👤 iExploder
I would advise against 8GB, its really low even for lightweight work. You mention "dev' work: Imagine you have:

- few browser tabs

- IDE

- compilation

- maybe virtual machine or application under test running

its very easy to run out of RAM in this scenario, just parsing the source code and providing code completion can hang a pc these days. you can swap to disc but you will be hurting

if you buying 8GB is only option make sure the laptop has free RAM slot(s) so you can upgrade later

more tips:

- forget about GUI, look up i3

- if you can, install arch, or some other distro that lets you manually pick packages, if you go for ubuntu, be prepared to be disabling a lot of services after first install (not a huge pain, you can google how to do it)


👤 jillesvangurp
As other's are saying, it depends what you need.

However, I'll give you a financial argument: a laptop with more memory will last you longer (unless it breaks down). It's more expensive upfront but if you then are able to use if for 5-10 years, it was a good investment. So, buy what you can afford now rather than the cheapest one. It might hurt a little but you'll save some cash longer term.

CPU speeds have stopped massively improving years ago. So, any CPU from the last ten years with 16 or 32 GB will run most workloads reasonably well. And a lot of things of course aren't really that CPU intensive to begin with. But if you run out of memory, things will start swapping and get tedious. That will happen a lot with 8GB and a lot less with 64GB.

8GB was already on the small side ten years ago. 4GB was definitely claustrophobic at the time. I upgraded my then mac with to 16GB (from 8GB) and I used it for another five years until it finally broke down. I have a new M1 currently with 16GB and a samsung galaxy book running Linux also with 16GB (cost me about 700euros a bit over a year ago, good value IMHO).


👤 loudmax
Certainly a lot depends on the kind of development you're doing. Us greybeards programmed on systems with kilobytes of RAM. Of course we didn't have the benefits of a modern IDE, but the point is that programming on a limited system is absolutely possible, if not ideal. You'll get a better experience by cutting out overhead you don't need so your RAM and CPU are dedicated to the tasks that really help your productivity.

As others have suggested, consider using a lightweight window manager. XFCE is reliable and familiar, but if you're up for the learning curve, then tiling window managers like i3 or sway are very snappy.

If you're doing web development, I kind of wish more developers would test their apps in a constrained environment. Plenty of users out there will be pulling up web pages on laptops with 2 gigs of RAM or less.

If you're programming a compiled language, see if you can run the compiler on some other host. A nearby desktop or server, or in the cloud. You can easily mount a remote filesystem using sshfs, and there are plenty of other options for making this more or less seamless.

If memory is a constraint, then be sure to have enough swap space. Reading from the drive will be slower than reading from RAM, but you can mitigate this by getting a faster SSD. If you can get more than one SSD and you put swap partitions on both of them, then Linux will read/write from both for better performance, analogous to RAID 0.


👤 inphovore
I used 8GB for YEARS. Docker stack, python/MySQL, node, etc.

I recently got a new laptop with 4x faster processor and 64GB RAM (just had to have it.)

My experience is speedy sure yet blah.

I passed up a slightly slower lighter model with less ram (granted we’re talking about 40GB now) yet charged with 65w USB-C and 12 hour battery (rather than ~8hr and conventional charger.)

I only wish I payed a little MORE for the 12 hour battery and less RAM!

8GB is fine! Don’t put yourself out for more RAM unless that is what you need.


👤 esel2k
Why buy new with 8gb? The goal is either to have a decent laptop for very little money: you can get used thinkpads for as little as 200USD with i7 ssd and 8 GB ram. Or you have a bit more money, buy new and go for around 1000usd with 16gb.

I have an old x1c gen 4 and it is fine with linux for most of the tasks (incl some minor development tasks).

All depends on what you want to invest and for how long.


👤 eloff
There are things where if you buy the cheap option it can cost you more over the long run. An obvious example is a cheap product that breaks down. Tools you use for your work are another category like that. Your desk, chair, computer, development software, etc are not good places to save money. Having a tiny edge here earns you much more over time than the initial expense. I wouldn’t go less than 32gb on a dev machine. My laptop had 32gb which I upgraded to 64gb when I bought it. If you really can’t afford it, then you work within your constraints. But plan to upgrade when you can.

I recently spent $300 on a chair to replace my $50 chair which I was finding uncomfortable for long periods of time. I value my time at roughly $100/hour, so if I spend three more hours at my desk this month because I’m more comfortable, then it’s paid for and making me money every month thereafter.

The payoff is less clear if you work for a salary and performance is not well connected to your compensation.


👤 freemint
It depends. If you only develop native command line programs it will more than be enough. But every Slack, Discord, Teams, webmail client, ... you got to have open will cut more into your RAM than you think. If the documentation you work with is not js ridden websites but man pages, txts or pdfs, your workflow allows you to occasionally close all tabs, and you do need to run software with big ram use on an ongoing basis you should be fine. However if those circumstances change you might need to upgrade: - by putting more RAM in the machine - moving parts of your workflow to a different machine and use laptop as "thin-client" - switch machines

At the moment my memory use with 16 GB looks like this:

      total   used    free   shared  buff/cache   available
Mem: 16167816 13526588 1017224 805552 1624004 1420060

Swap: 24838136 10326200 14511936

and i have not found a good way to account for where my memory goes.


👤 jamespo
Depends what you're developing.

I'd go for a lightweight desktop env like XFCE.


👤 kaba0
Not really, in my opinion. If you do go with 8GB, do create a big enough swap partition and I can’t recommend zram enough!

Unfortunately on high contention linux is still prone to trashing memory, basically writing out a page to swap only to read it back into memory, evicting other pages. This was supposedly solved for HDDs, but it is still a problem with SSDs to the point where I had a completely stuck system, only reacting to REISUB. I did try to experiment with userspace OOMKillers, but they are no real solutions, and I think it is safe to bet that only larger memory requirements await us in the future. 8GB really is not enough today, not even for regular use let alone dev work.


👤 yetanother12345
Do more with less.

Writing this on a secondhand sub-laptop from 2009 (I think the term may be netbook or something) with a 1024x600 screen. It runs 32 bit and as it's no secret that some activities are a bit slow, and that some "modern" heavy javascript-y web sites are a pain (even with noScript and uBlock) I recently examined how much RAM it had:

1 (one) Gb!

I also found out that it's (still) upgradeable to 8Gb, but I'm not sure I want to do it, as the annoyances are not really that big. Software generally just works, but forget about installing eg. Chromium and derivatives as those are 64bit only. For IDE I use Geany. Distro is Debian.


👤 fzeindl
Take 16gb at all costs. The time will come when you have to run some weird software stack in a VM taking up 4G. Additionally your IDE clocking in at 1-2GB and suddenly you find yourself at the limits. Saving here is not worth it.

👤 princevegeta89
8GB, works quite well, until you get into the business of virtual machines/docker or running heavy IDEs like Jetbrains. My 16GB machine was doing quite great with the a huge number of programs and services running in the background but a few docker containers running in the background pushes memory consumption close to 15GB or so. I would suggest that you throw in a cheap stick of RAM and upgrade your laptop, or buy a laptop that allows RAM upgrades.

👤 sshine
I remember running OpenBSD on my laptop in the early 2000s at a total system memory use of 26MB.

Running Dillo instead of Firefox, vi (or vim) for coding, and twm as window manager. That was super low even back then. I think the only unavoidable memory hog nowadays is wanting to have many browser tabs open. And having a heavy IDE; VSCode is pretty cheap on resource use, but with LSP support you can really feel a difference with a better CPU and enough RAM.


👤 znpy
Barely, and it depends very much on what kind of development you're doing.

Some Java-based environments are very memory-hungry, some aren't.

I second the opinion of some other people that recommend going for the 8gb model only as long it allows for adding more memory later.

Also, second hand laptops could be worth giving a look. Again, depending on what kind of development you're doing, you might save quite a bit.


👤 pengo
I've run Linux on a series of Dell laptops (same model, different versions), all with i7 processors. There's no appreciable difference running 32GB RAM over 16GB, but there is an obvious difference for many proc intensive tasks between 8GB and 16GB.

I'm not saying you couldn't live with 8GB, but I'd strongly recommend 16GB.


👤 necovek
For an external 4k screen on Linux, full screen Google Meet or Zoom calls might load your CPU heavily (and trigger annoying CPU fans). It helps if you've got Iris Xe graphics.

8GB can work, but don't expect to do much with Docker or VMs on it. In general, 16GB is the baseline, and I am always in favour of more RAM rather than more CPU.


👤 camel-cdr
I've got a 4gb RAM pinebook pro, and use it as a dev laptop whenever I'm at my university, and didn't have any major problems. (Other than the missing vulkan support for the GPU, but I remedied that with swiftshader, oh and compiling llvm took very long, but thats not something I usually need to do)

👤 sgc
It is often much cheaper to upgrade than buy a package. Can you upgrade the ram later if you need to? I have a very old Thinkpad that I upgraded to 16gb ram some time ago and it works fine for everything I need, except editing gigapixel images (files sizes in multiple gb). I have a 64gb ram workstation for that.

👤 aldanor
Depends on what you're doing / whether you're using IDEs and hungry editors or plain vim etc. As an example, CLion may eat 4-5gb of that. How many of those electron apps do you have open because each one can easily eat 0.5gb - eg slack, notion, etc.

Personal opinion - no it's not enough as of today.


👤 nixpulvis
Yes.

Though it actually depends on what you are developing. Yes, because any software development environment worth it's salt should easily run. Your code and use case might require more. Again, at that point it might be worth looking into breaking down the problem if possible.. but what do I know.


👤 acc_297
Yeah I think you’ll be fine the apps that will need more would be video/audio processing or gaming

My daily dev computer still has 8 gb ram and I have another computer I use with 24gb ram and I notice zero difference when doing as you say a Google chrome + zoom + vscode type workspace


👤 v3ss0n
Depends

Vanilla CSS, HTML, JS , static development= very well DevOps using docker = ok Vanilla python development= fine Fullstack web development using Django= fine

data science, machine learning= not ok DevOps for Kubernetes locally= don't even dream Any framework that uses nodejs= best of luck


👤 neatze
My ram utilization is 30%-50% of 16G ram, this with multiple dockers running, some docker images are with GUI apps, this with 20+ Firefox tabs and at least one vscode instance, I can see where you will have to choose what apps to run at same time.

👤 strls
Definitely not. Mine is 16 and it will start swapping after running KDE, jetbtains, firefox and a couple electron apps for a few hours. It is tolerable, but in a year or two it won't be. Good thing it supports up to 64.

👤 logicalmonster
8GB is probably enough to get by for most types of development, but personally I'd sacrifice some other spec on my computer (such as having the bare minimum HD space) to try and ensure that the RAM is at the normal level.

👤 massimosgrelli
I run ElementaryOS 5.1 on a 2010 Thinkpad i5. It works fine for (basic) dev with vscode and javascript + nodejs stuff. I use Brave as a browser: much lighter than chrome. I tried to move to ElementaryOS 6 but it was slower.

👤 vladvasiliu
As others have said, your best bet is to use some lightweight desktop environment. You may also want to switch Chrome for Firefox.

Also: can't you buy the 8 GB model and buy the extra RAM separately?


👤 JoaoCostaIFG
I got through my 5 years of university in software engineering (currently halfway through the last year) with less than that without any problem. It's more than enough.

👤 Fire-Dragon-DoL
16gb is required from my perspective. That's why I found the macmini prices clearly a joke, they are only trying to sell the higher specced

👤 throwaway4759
I got an Intel 11th gen i5 quad core laptop with 16GB DDR4 ram for $110 recently. I only use it with external monitors at home. Here is the trick:

👤 DiabloD3
Yes, 8gb is enough to do dev with.

Although I suggest not using Chrome, but another Chromium browser that can sleep tabs by default, or Firefox instead.


👤 KaiserPro
You'll be fine, unless you are compiling boost or something else like that

but you will need a decent sized swap file/partition.


👤 number6
If you have SSD you can pretty good use swap

👤 insane_dreamer
As others have said, only if upgradable -- you're going to want to add more RAM at some point .

And stay tf away from browsers.


👤 Euphorbium
No, it is not. That is enough for like 1 tab browsing a bank website to pay the bills. Maybe open 1 wikipedia tab.

👤 asciimov
I’d look at refurbished laptops if you’re price sensitive. I’d rather have enough ram than a brand new system.

👤 pythops
for the described usecase, that should be fine. I would recommend getting rid of desktop environment (gnome, kfce ...), go for i3 instead. and don't use display manager, gtty is what you need to log in to your system. that would save you lot of memory and space.

👤 fullstop
Can you give more details on the laptop? You might be able to add additional memory later on.

👤 mkl95
16GB is the bare minimum for me these days. I recommend 32GB, but your mileage may vary.

👤 Dr_ReD
If I where you, I'd just ensure the RAM is expandable...

👤 fredefdef
When will people exclude bloated software from their life...

👤 Neil44
Get the 8GB one and order the extra RAM separately.

👤 brudgers
Was 8GB enough on the old laptop?

👤 28304283409234
It depends.

👤 rswskg
No.

👤 nummerfuenf
refurbished thinkpad ;)