Data science is a rapidly growing field requiring some hardware to start.
This isn’t because someone wants to take your money – if you want to build cool models, you’ll need enough RAM to fit those datasets into memory.
Many will argue that the amount of RAM needed for data science is debatable, but it’s not. The amount of RAM required for data science is at least 8 GB, and any less, and you’ll struggle to develop many of the current state-of-the-art models. You can always increase up to 64 GB and beyond, but this is often overkill and too much.
However, some other things to consider when you’re making your purchase.
By the end of this post, you’ll be a RAM expert – and know EXACTLY how much RAM you need.
Let’s dive in.
RAM And Its Uses In Your Computer
Random Access Memory (RAM) is essential to any computer, and all store-bought computers come with it.
It is the short-term memory for the computer, storing all the programs and data currently in use.
Think about RAM as the equivalent of your attention span. You can only work on things you’re paying attention to, and if you increase this too much, you’ll be spread too thin and unable to work on anything.
It’s like when I try to write code and listen to music with lyrics, there is just too much going on, and it doesn’t work.
RAM allows the computer to access information quickly and efficiently; without it, a regular computer would be unable to function.
The size of RAM determines how much data and information can be stored, and more RAM allows a computer to multitask on many different things.
When you open multiple programs or tabs on your web browser, they all require RAM to run correctly.
The RAM can be freed up and efficiently managed, even if you have low amounts; you can do things like close browser tabs or exit out of software to free some up for the next activity.
The software depicted here is known to be a resource hog.
Difference Between RAM and Standard Storage
The difference between RAM and other storage (like hard drives or SSDs) used to really confuse me.
Think about these two as the difference between things stored somewhere in your brain and things you’re actively thinking about.
When was the last time you thought about the actions of addition or subtraction? Probably not recently.
However, if you wanted to add or subtract something, your brain would search all the way back to second grade when you learned this, pull this learned trait into “memory,” and add or subtract whatever you’re working on.
RAM and standard storage work the same way.
When you haven’t used a program in a while, but you click on it, the computer reaches into your standard storage to pull it into memory. Now, if you want to use it or continue using it, it’s stored in RAM for quick use.
How fast your computer can bring it into RAM is the difference between SSDs and Hard Drives.
SSDs are magnitudes faster than Hard Drives – bringing the information into RAM thousands of times faster than Hard drives.
Note: I wouldn’t buy a PC or a laptop without an SSD (this is a separate blog post, but I wanted to emphasize it in case you’re in the market.)
Is RAM Needed For Data Science?
The correct amount of RAM is absolutely needed for Data Science, which is probably the most crucial consideration when buying a laptop or PC.
RAM is much more important than a GPU regarding data processing.
People (who usually want to sell you overpriced items) tend to overemphasize the importance of CPU/GPU in data science and underemphasize the importance of RAM. It makes sense; there’s no money in selling RAM – but tons in selling overpriced GPUs and CPUs.
Before you can run a model, the data needs to be put into memory. If you do not have enough RAM to facilitate this, you won’t even be able to use your CPU or GPU.
The overemphasis on CPUs and GPUs in the data science and machine learning community is really silly. People often buy computers at 2-3x the cost of a laptop, which would have done just fine.
How Much Data Would Fit Into Ram From Storage
Integers (In Millions)
Doubles (In Millions)
Sweet! It looks like we won’t be using much RAM; let’s put it to the test.
Here are three examples of Kaggle datasets – all of these examples are in the top 50 most popular Kaggle datasets.
Datasets get HUGE – very fast. And these are some of the most popular datasets on Kaggle, so they’re not some rare sets I’ve found.
As we can see from this list above, most of these datasets would crush a 1-4GB laptop, probably only being able to be modeled on 8 GB+ of RAM (with all other programs closed).
Is 32 GB RAM Too Much For Data Science?
Having 32 GB of RAM is definitely something to consider when dealing with massive datasets or computer vision models.
It’s also a great choice if you are working on high-end gaming, video editing, or other intensive tasks.
With such a large amount of RAM, you won’t have to worry about running out of memory or having your system freeze up due to a lack of resources.
If budget isn’t a concern, I’d prefer this over a 16 GB computer, but I feel it’s slightly teetering into the “overkill” zone.
Is 64 GB of RAM Too Much For Data Science?
Personally, I think 64 GB of RAM is way too much.
Unless you make a living working with something like 3D modeling, 16-32 GB of RAM should be plenty for the typical data scientist.
Once past 16/32 GB of RAM, I’d prefer to use that money on an upgraded GPU or CPU since those components are more likely to improve your computing experience in more tangible ways.
That said, if you have the money to spare and want to get 64 GB of RAM, go ahead – but it would be better spent elsewhere.
Is RAM More Important than my CPU?
When it comes to computer performance, RAM is more important until you reach 8-16 GB of RAM, then optimizing for your CPU is much more important.
A great CPU with 4 GB of RAM isn’t a good computer.
You won’t have enough memory to take full advantage of that great CPU.
And on the inverse, 64 GB of RAM with a super old CPU is silly.
You’ve wasted tons of money on memory and don’t have enough horsepower to take full advantage of it.
Should I Use a Laptop for Data Science?
Data Science should be done in coffee shops, so you’ll need a laptop.
Just kidding – learn data science on anything that you want.
I will say that with how user-friendly cloud computing is becoming, it makes little sense to spend money on high-end GPUs.
And since it doesn’t make sense to buy high-end GPUs, I can’t see a reason to use a desktop computer over a laptop.
But if you want to spend that money on a desktop, you’ll still be able to learn data science just like everyone else.
What is the best laptop for data science?
I’ve gone over this a thousand times, but the best laptop for data science is a laptop running macOS. This could be something cheap like the mac mini, or you can use our buying guide and see why the new Macbook Pro is the best laptop on the market for data science.
- Why We Disable Swap For Kubernetes [Only In Linux??] - October 6, 2023
- Jenkins pipeline vs. GitLab pipeline [With Example Code] - September 23, 2023
- .NET CI/CD In GitLab [WITH CODE EXAMPLES] - September 16, 2023