TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Is 8gb RAM enough for a Linux dev laptop?

17 点作者 herodoturtle超过 2 年前
New laptop, core i5, plugged into external 4K display, 5 to 10 chrome tabs, the odd full screen zoom meeting.<p>On a budget, and the 16gb option in my area (very remote) is more than double the price.

53 条评论

Octabrain超过 2 年前
With laptops (and few other things), I have a personal rule: It&#x27;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&#x27;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&#x27;t even bother.
评论 #34460602 未加载
satysin超过 2 年前
Question. Why a laptop if you&#x27;re plugging it into a monitor and therefore using it like a desktop?<p>Does it <i>have</i> 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&#x27;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.<p>The only real limitation is you can&#x27;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).<p>FWIW I picked one up for my son a couple of months ago. It&#x27;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.<p>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 <i>everything</i> working right. You can avoid so many headaches going mini pc over laptop.
alexwasserman超过 2 年前
I think this depends most on your personal dev workflow and where heavier tasks are happening.<p>At one then of the spectrum you can just be browsing for info, then writing code in vim, and that&#x27;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).<p>On the other end you&#x27;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.<p>8Gb is going to be fine for the first example. It will not be nearly sufficient for the second.<p>Browsers on linux tend to get pretty heavy, as that&#x27;s often where you&#x27;ll be running a mail client, video calling, Slack, etc, and they aren&#x27;t exactly lightweight these days to start with.
quesera超过 2 年前
It very much depends, but for a point of comparison:<p>With only 4GB, I have been mostly happy running:<p><pre><code> - 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! </code></pre> If you are running Gnome, or Chrome, or Eclipse, or a big Java app, your experience will definitely be less good.<p>My biggest consumers were Firefox and Slack. Restarting these apps nightly kept things under control.<p>I set this machine up as a temporary thing for a temporary project. It didn&#x27;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 &quot;actually really OK&quot; it turned out to be.<p>And this was with 4GB, not 8GB! So, I&#x27;d respond with &quot;Yes, maybe.&quot;
评论 #34453721 未加载
maxibenner超过 2 年前
I&#x27;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&#x27;m wrong.
评论 #34453417 未加载
评论 #34454889 未加载
评论 #34453035 未加载
评论 #34452793 未加载
costanzaDynasty超过 2 年前
8gb is enough, but I wouldn&#x27;t buy a new laptop with 8gb unless I could update the ram in the future.
评论 #34453364 未加载
washadjeffmad超过 2 年前
Consider balance. If one spec is too low, the rest of the system might as well be configured with fewer resources.<p>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&#x27;d take an M1 MacBook Air over a 16GB Intel Mac.<p>If your storage is slow &#x2F; 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&#x2F;zram can help, as well as adjusting swappiness if you run into issues.<p>I&#x27;m using a 4GB Chromebook and a 4GB Raspi 4 for a lot of work lately, and I&#x27;m enjoying the constraints.
iExploder超过 2 年前
I would advise against 8GB, its really low even for lightweight work. You mention &quot;dev&#x27; work: Imagine you have:<p>- few browser tabs<p>- IDE<p>- compilation<p>- maybe virtual machine or application under test running<p>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<p>if you buying 8GB is only option make sure the laptop has free RAM slot(s) so you can upgrade later<p>more tips:<p>- forget about GUI, look up i3<p>- 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超过 2 年前
As other&#x27;s are saying, it depends what you need.<p>However, I&#x27;ll give you a financial argument: a laptop with more memory will last you longer (unless it breaks down). It&#x27;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&#x27;ll save some cash longer term.<p>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&#x27;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.<p>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).
评论 #34465201 未加载
loudmax超过 2 年前
Certainly a lot depends on the kind of development you&#x27;re doing. Us greybeards programmed on systems with kilobytes of RAM. Of course we didn&#x27;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&#x27;ll get a better experience by cutting out overhead you don&#x27;t need so your RAM and CPU are dedicated to the tasks that really help your productivity.<p>As others have suggested, consider using a lightweight window manager. XFCE is reliable and familiar, but if you&#x27;re up for the learning curve, then tiling window managers like i3 or sway are very snappy.<p>If you&#x27;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.<p>If you&#x27;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.<p>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&#x2F;write from both for better performance, analogous to RAID 0.
inphovore超过 2 年前
I used 8GB for YEARS. Docker stack, python&#x2F;MySQL, node, etc.<p>I recently got a new laptop with 4x faster processor and 64GB RAM (just had to have it.)<p>My experience is speedy sure yet blah.<p>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.)<p>I only wish I payed a little MORE for the 12 hour battery and less RAM!<p>8GB is fine! Don’t put yourself out for more RAM unless that is what you need.
esel2k超过 2 年前
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.<p>I have an old x1c gen 4 and it is fine with linux for most of the tasks (incl some minor development tasks).<p>All depends on what you want to invest and for how long.
slashdev超过 2 年前
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.<p>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&#x2F;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.<p>The payoff is less clear if you work for a salary and performance is not well connected to your compensation.
freemint超过 2 年前
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 &quot;thin-client&quot; - switch machines<p>At the moment my memory use with 16 GB looks like this:<p><pre><code> total used free shared buff&#x2F;cache available </code></pre> Mem: 16167816 13526588 1017224 805552 1624004 1420060<p>Swap: 24838136 10326200 14511936<p>and i have not found a good way to account for where my memory goes.
评论 #34456641 未加载
jamespo超过 2 年前
Depends what you&#x27;re developing.<p>I&#x27;d go for a lightweight desktop env like XFCE.
kaba0超过 2 年前
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!<p>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超过 2 年前
Do more with less.<p>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&#x27;s no secret that some activities are a bit slow, and that some &quot;modern&quot; heavy javascript-y web sites are a pain (even with noScript and uBlock) I recently examined how much RAM it had:<p>1 (one) Gb!<p>I also found out that it&#x27;s (still) upgradeable to 8Gb, but I&#x27;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超过 2 年前
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超过 2 年前
8GB, works quite well, until you get into the business of virtual machines&#x2F;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超过 2 年前
I remember running OpenBSD on my laptop in the early 2000s at a total system memory use of 26MB.<p>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.
评论 #34453271 未加载
znpy超过 2 年前
Barely, and it depends very much on what kind of development you&#x27;re doing.<p>Some Java-based environments are very memory-hungry, some aren&#x27;t.<p>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.<p>Also, second hand laptops could be worth giving a look. Again, depending on what kind of development you&#x27;re doing, you might save quite a bit.
pengo超过 2 年前
I&#x27;ve run Linux on a series of Dell laptops (same model, different versions), all with i7 processors. There&#x27;s no appreciable difference running 32GB RAM over 16GB, but there is an obvious difference for many proc intensive tasks between 8GB and 16GB.<p>I&#x27;m not saying you couldn&#x27;t live with 8GB, but I&#x27;d strongly recommend 16GB.
necovek超过 2 年前
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&#x27;ve got Iris Xe graphics.<p>8GB can work, but don&#x27;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超过 2 年前
I&#x27;ve got a 4gb RAM pinebook pro, and use it as a dev laptop whenever I&#x27;m at my university, and didn&#x27;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超过 2 年前
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超过 2 年前
Depends on what you&#x27;re doing &#x2F; whether you&#x27;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.<p>Personal opinion - no it&#x27;s not enough as of today.
nixpulvis超过 2 年前
Yes.<p>Though it actually depends on <i>what</i> you are developing. Yes, because any software development environment worth it&#x27;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超过 2 年前
Yeah I think you’ll be fine the apps that will need more would be video&#x2F;audio processing or gaming<p>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超过 2 年前
Depends<p>Vanilla CSS, HTML, JS , static development= very well DevOps using docker = ok Vanilla python development= fine Fullstack web development using Django= fine<p>data science, machine learning= not ok DevOps for Kubernetes locally= don&#x27;t even dream Any framework that uses nodejs= best of luck
neatze超过 2 年前
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超过 2 年前
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&#x27;t be. Good thing it supports up to 64.
logicalmonster超过 2 年前
8GB is probably enough to get by for most types of development, but personally I&#x27;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超过 2 年前
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超过 2 年前
As others have said, your best bet is to use some lightweight desktop environment. You may also want to switch Chrome for Firefox.<p>Also: can&#x27;t you buy the 8 GB model and buy the extra RAM separately?
JoaoCostaIFG超过 2 年前
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&#x27;s more than enough.
Fire-Dragon-DoL超过 2 年前
16gb is required from my perspective. That&#x27;s why I found the macmini prices clearly a joke, they are only trying to sell the higher specced
throwaway4759超过 2 年前
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:
评论 #34453034 未加载
DiabloD3超过 2 年前
Yes, 8gb is enough to do dev with.<p>Although I suggest not using Chrome, but another Chromium browser that can sleep tabs by default, or Firefox instead.
KaiserPro超过 2 年前
You&#x27;ll be fine, unless you are compiling boost or something else like that<p>but you will need a decent sized swap file&#x2F;partition.
number6超过 2 年前
If you have SSD you can pretty good use swap
insane_dreamer超过 2 年前
As others have said, only if upgradable -- you&#x27;re going to want to add more RAM at some point .<p>And stay tf away from browsers.
Euphorbium超过 2 年前
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超过 2 年前
I’d look at refurbished laptops if you’re price sensitive. I’d rather have enough ram than a brand new system.
pythops超过 2 年前
for the described usecase, that should be fine. I would recommend getting rid of desktop environment (gnome, kfce ...), go for i3 instead. and don&#x27;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超过 2 年前
Can you give more details on the laptop? You might be able to add additional memory later on.
mkl95超过 2 年前
16GB is the bare minimum for me these days. I recommend 32GB, but your mileage may vary.
评论 #34453369 未加载
Dr_ReD超过 2 年前
If I where you, I&#x27;d just ensure the RAM is expandable...
fredefdef超过 2 年前
When will people exclude bloated software from their life...
Neil44超过 2 年前
Get the 8GB one and order the extra RAM separately.
brudgers超过 2 年前
Was 8GB enough on the old laptop?
28304283409234超过 2 年前
It depends.
rswskg超过 2 年前
No.
nummerfuenf超过 2 年前
refurbished thinkpad ;)