Jump to research
Composed by

Anonymous Rhinoceros
Views
949
Version history
Anonymous Rhinoceros, 464d ago
January 15, 2024
How much RAM do you need on your m3 pro MacBook pro if you use vs code for react and next.js and you run ai models
During my research, I explored various sources such as Reddit discussions, blog posts, and official documentation related to the query. The primary focus was on understanding the optimal RAM requirement for an M3 Pro MacBook Pro if the user intends to run VS Code for React and Next.js development and AI models. The sources were closely related to the original query, and there was a considerable amount of consensus among them. However, the exact RAM need can vary significantly based on individual use cases, which introduces some uncertainty .
Have an opinion? Send us proposed edits/additions and we may incorporate them into this article with credit.
Confidence
75%
Words
566
Time
2m 8s
Contributors
72
Words read
13.9k
32GB RAM for M3 Pro MacBook Pro
"Recently I purchased a 16” M1 PRO MacBook 1 TB 32 GB. I am a web developer and computer science student who uses my MacBook primarily for coding and school on a daily basis."
"...16gb would solve a LOT of these issues as even with swap, worst case I’ve hit was 17gb of memory usage, and most often when swap is needed the memory usage is higher than if RAM alone were being used. I have never hit a swap so high that 32gb would be necessary..."
16GB RAM for M3 Pro MacBook Pro
Hardware Considerations for M3 Pro MacBook Pro
"The latest MacBook Pro models feature 8-core processors, up to 64GB of RAM, and up to 8TB of storage. This hardware configuration can handle even the most demanding programming tasks, including running multiple virtual machines and compiling large codebases."
"Recently I purchased a 16” M1 PRO MacBook 1 TB 32 GB. I am a web developer and computer science student who uses my MacBook primarily for coding and school on a daily basis."
VS Code Requirements
Next.js and Webpack Memory Usage
Jump to top
Research
"Why 32gb RAM is worth it for web developers on M1 Pro MacBook, Explained"
- A web developer who is also a computer science student recently purchased a 16” M1 Pro MacBook with 32 GB of RAM.
- They use their MacBook primarily for coding and school on a daily basis; their workflow includes using VScode (loaded with extensions) and hosting web servers locally for development.
- The developer’s friend bought the same MacBook but with 16 GB of RAM, and has since regretted it because they cannot use VScode and have had to switch to IntelliJ IDEA instead.
- High RAM usage can cause actions such as swiping through desktops and scrolling through pages to slow down. Local servers can also slow down to a crawl, leading to a slower development time.
- M1 MacBooks are packed with a GPU that can compete with some discrete graphics cards in PCs. However, unlike those graphics cards, the M1 chip uses integrated graphics that shares its RAM with the CPU.
- When the GPU uses 1-4 GB of RAM, the CPU can be left with only around 12 GB of RAM available for computation. MacOS also uses a chunk of RAM, leaving even less RAM available for computation.
- Running out of RAM will cause the computer to slow down and use Swap, stored on the SSD instead of RAM. Doing so will slow down the computer and reduce the lifespan of the SSD.
- Many comments from other developers indicate that they have had success with 16 GB of RAM, running VScode and numerous other applications at once without issues.
- One user mentioned that they ran VScode, three browsers, Slack, Docker, and PHPStorm on a MacBook Pro with 16 GB of RAM and had “no issues.”
- A different user mentioned running VScode with 30 extensions for web development, as well as other background applications, and having “no performance issues” on their 13” MacBook Pro with 16 GB of RAM.
- Another user stated that they haven’t seen a need for more RAM for web development, running multiple applications simultaneously, although they do notice some slowdown when running node installs and builds or database migrations and seeding.
- Some commenters expressed skepticism towards the claims of the original post, with one calling it “subjective clickbait.” Others pointed out that using all available RAM is not a bad thing and that empty RAM is a waste of resources.
"https://www.macworld.com/article/670484/best-mac-for-programming-and-developers.html"
- The webpage provides recommendations for choosing a Mac for app development, including for iOS and Mac app development.
- To develop an iOS or Mac app, you will need membership of the Apple Developer Program, a Mac to compile the final product that is uploaded to the App Store, and Xcode, the primary tool for macOS and iOS development, which is only available on the Mac.
- The minimum requirement for coding is a Mac that can run macOS 13 Ventura or later.
- Apple’s M1, M2, and M3 Macs can be used by developers, with benchmarks showing that the new M-series chips compared favorably with the older Intel-powered Macs.
- X86 architecture is no longer used in Macs, so it’s not simple to run Windows on a Mac.
- The M1 Macs were initially only able to support up to 16GB RAM, but the M2 and M3 Macs support up to 24GB and 36GB, respectively.
- The Apple silicon Macs offer some positives such as long battery life and cool, quiet operation.
- The webpage considers the suitability of various Mac models for app development, including the MacBook models, MacBook Air models, MacBook Pro models, Mac mini models, iMac models, iMac Pro, Mac Pro models, and Mac Studio models.
- The 14-inch MacBook Pro with an M3 Pro chip is a good choice for developers. It allows the user to kit it out with 36GB RAM if the standard 18GB is not enough.
- For any kind of development work, it is recommended to have at least 16GB RAM.
- Having more RAM depends on the requirements of the applications and tools used, as well as the need to run multiple containers or virtual machines.
- The website does not provide specific information on how much RAM is needed for running VS Code for react and next.js or for running AI models.
"https://www.mymacmaster.com/2023/04/25/macbook-pro-programming-tips-and-tricks-for-optimal-performance/"
- The MacBook Pro laptops are a popular choice for programmers due to their powerful hardware, sleek design, and user-friendly operating system.
- The MacBook Pro comes with pre-installed software perfectly suited for programming, including Xcode, Terminal, and TextEdit.
- Other software programs that programmers may find useful include Visual Studio Code, Atom, and Sublime Text. These software programs provide an intuitive interface, code highlighting, and debugging features.
- The latest MacBook Pro models feature 8-core processors, up to 64GB of RAM, and up to 8TB of storage.
- The MacBook Pro’s hardware configuration can handle even the most demanding programming tasks, such as running multiple virtual machines and compiling large codebases.
- The MacBook Pro’s Retina display provides a high-quality screen that can display detailed code and graphics.
- Apple frequently releases updates to the operating system, which can improve performance, fix bugs, and enhance security. It’s essential to keep your MacBook Pro up to date with the latest software updates to ensure optimal performance.
- Using an external monitor can provide more screen real estate for coding, debugging, and testing. An external monitor can also help reduce eye strain and improve your posture.
- Typing on a MacBook Pro’s keyboard can be comfortable, but using a mechanical keyboard can provide a more satisfying typing experience and may help reduce typing errors.
- The MacBook Pro’s powerful hardware can generate a lot of heat, which can affect performance and reduce battery life. Using a cooling pad can help dissipate heat and improve airflow, which can improve performance and extend battery life.
- Keeping your code organized and well-documented can improve your programming efficiency and make it easier to debug and test your code. Using a version control system like Git can help you keep track of changes to your codebase and collaborate with other programmers.
- The cost of a MacBook Pro can vary depending on the model and configuration one chooses. As of April 2023, the price for a new MacBook Pro starts at around $1,299 for the 13-inch model with M1 chip and 8GB of memory.
- Apple offers refurbished MacBook Pros at a lower cost than new ones, which can be a good option for those on a budget.
- The latest MacBook Pro model as of April 2023, is the M1 Max with up to 10-core CPU, 32-core GPU, and up to 64GB of unified memory.
- MacBook Pro supports a wide range of programming languages, including Python, JavaScript, Ruby, Swift, and more
"16GB vs 32GB for programming?"
- The webpage is a post on the Macbook Pro subreddit, discussing whether 16GB or 32GB RAM is needed for programming needs on the MacBook Pro.
- OP’s primary use for the MacBook Pro is programming, but also light browsing and occasional photo editing with some additional applications like Zoom, Slack, Chrome.
- OP intends to use it for their own projects. While they are new to programming, they typically use their computers for 4-5 years before getting a new one.
- Available options are M1 Pro with 16GB RAM or an M1 Max with 32GB of RAM. OP had wanted an M1 Pro with 32GB of RAM, but it is not available.
- There are two primary camps in the discussion: those who say 16GB is sufficient for typical programming needs, and those who recommend maxing out the RAM for the sake of future-proofing.
- One user says they have an M1 MacBook Air with 8GB of RAM and use it for programming, but they can only use one Docker container at a time without struggling. Two containers is doable but three is difficult, and running Teams and Docker or Xcode and Docker at the same time is impossible. Browsers like Chrome cause lockups.
- The same user says that 16GB of RAM would solve many of these issues. They believe that most applications compiled for M1 from Intel code will use around 50% of the memory, but this isn’t guaranteed.
- Another user, who has decades of programming experience, recommends maxing out the RAM because they work fast, like to switch, leave the computer on overnight, and pick up where they left off. They use an M1 Max with 64GB of RAM and have gone over 51GB of usage, with IntelliJ and browsers causing a lot of RAM and GPU usage.
- A fresh graduate programmer says they use a MacBook with 16GB of RAM and have never had problems, and their friends report the same.
- One user recommends getting as much RAM as possible, saying that it’s impossible to predict the future.
- Some users caution that waiting for a higher RAM model may cause significant delays, so it’s not always feasible.
- One user recommends 16GB for OP’s specific purposes, but acknowledges that 32GB would be decent if it were available.
- A user who has a 16” M1 Pro with 16GB of RAM, as well as an M1 Mac Mini with 8GB of RAM, says that
"Hardware Recommendations for Machine Learning / AI"
Not used in article
"https://code.visualstudio.com/Docs/supporting/requirements"
Here are the notes on the webpage:
- Visual Studio Code requires a small download of less than 200 MB and occupies less than 500 MB disk space.
- VS Code is lightweight and can be easily run on modern hardware.
- The minimum hardware requirements listed for running VS Code include 1.6 GHz or faster processor and a minimum of 1 GB of RAM.
- It is stated that VS Code is supported on Windows 10 and 11 (64-bit), macOS versions with Apple security update support (typically the latest release and the two previous versions), and some versions of Linux such as Debian and Red Hat Enterprise Linux.
- VS Code does not support application virtualization solutions such as Microsoft App-V or MSIX for Windows, or third-party app virtualization technologies.
- It is mentioned that running VS Code in a virtual machine environment requires a full operating system.
- The webpage states that VS Code does not support multiple simultaneous users using the software on the same machine, including shared virtual desktop infrastructure machines or a pooled Windows/Linux Virtual Desktop host pool.
- While the webpage notes that running the full VS Code in Windows/Linux containers is not supported, it is possible to run it using the Dev Containers extension.
- In terms of additional Linux requirements, GLIBCXX version 3.4.25 or later and GLIBC version 2.28 or later are required.
- The webpage provides a link to a list of currently known issues and a separate page to report issues.
- The page includes links to download VS Code for all platforms mentioned in the requirements section.
- Finally, the page clarifies that the requirements mentioned are for the latest version of VS Code as of a particular date (12/7/2023), and may be subject to changes in future releases.
Overall, the webpage provides useful information on the minimum hardware requirements and supported platforms for running Visual Studio Code. However, it does not provide any specific information regarding the recommended amount of RAM for using VS Code for specific purposes like React, Next.js, or running AI models.
"https://stackoverflow.com/questions/29973717/what-are-the-system-requirements-for-vscode"
- The original poster asked about the system requirements for VSCode, specifically about any additional components that might be required and any Windows versions that do not support it.
- One comment mentioned that VSCode is now self-contained for Linux, Mac, and Windows and additional tools available on the setup page.
- Another comment pointed out that despite the text-based nature of the program, VSCode has a high GPU hardware requirement which can result in lagging.
- A commenter shared system requirements for VSCode as of Version 1.32, listing the processor speed, RAM, and versions of OS X, Windows, and Linux that it is compatible with.
- A few more comments discuss additional requirements and performance issues, such as the need for a 64-bit processor, potential memory leaks, and the importance of keeping VSCode up to date to ensure optimal performance.
- One comment mentions a VSCode extension for Python that can improve performance with AI models.
- Another commenter suggests that when running multiple programs simultaneously, a minimum of 16GB RAM is recommended.
- A few more comments discuss issues with various operating systems and recommend upgrading hardware components to optimize performance.
- One commenter provided a resource to check if your computer meets the minimum requirements for running VSCode.
- Another commenter recommended monitoring system resources while running VSCode to identify any potential bottlenecks or performance issues.
- Further down in the comments, a few users discuss their personal experiences with VSCode performance and provide various tips and recommendations to optimize it.
- One user recommends disabling unused extensions to boost performance.
- Another user suggests lowering the number of open tabs in the editor to improve speed.
- A few users recommend adjusting VSCode’s configuration settings to optimize performance for specific tasks.
- One commenter recommends using an external hard drive rather than an internal one for storing VSCode project files.
- Various users share their thoughts on operating systems and hardware components that work best with VSCode.
- Finally, a few users discuss alternatives to VSCode for those who may be experiencing persistent performance issues.
"https://nextjs.org/blog/webpack-memory"
- Next.js 8 was introduced recently and it contained a significant reduction in build-time memory usage.
- The goal of Next.js is to help developers focus on application code, and it is built on top of tools like webpack and Babel.
-
Next.js treats every page as a file located in a special
pages
directory in the root of the project, wherepages/about.js
maps to/about
. - The framework is designed to support both single and thousands of pages.
-
The implementation of Serverless Next.js has led to identifying a high memory usage issue when running
next build
on a project with a large number of pages – it can sometimes exceed the 1.4 GB memory heap limit of Node.js. - Profiling the memory usage of the build process using the Chrome developer tools reveals a point at which webpack would allocate a chunk of 548 MB of memory all at once, directly correlated to the number of pages.
- The source.source() method was identified as the cause of the memory allocation spike, which generates the resulting file and stores it into memory.
- When using asyncLib.forEach to loop over the compilation.assets array, the provided function would run for every file simultaneously, leading to high memory usage. The solution to this issue is to use a semaphore to limit the amount of concurrent writes, which was implemented with async-sema.
- Profiling the build memory usage again showed that the memory allocation was split into smaller pieces of 34 MB after implementing this concurrency limit.
- Despite this change, the build still ran out of memory, leading to further profiling and investigation of the issue.
- The memory profile showed no benefit in caching the written value of webpack assets generated by the CachedSource class because Next.js had no plugins that called source() after webpack had written the file. This finding led to the implementation of a new option called output.futureEmitAssets, which allows opting-in to the new asset writing behavior.
- This new behavior led to chunks being allocated for just 182KB over time, as opposed to the 548 MB chunk earlier, after all the optimizations.
- The article concludes that all these optimizations were introduced to webpack, meaning that not just Next.js users but all webpack users will benefit from these optimizations.
- Next.js team promises to actively continue to improve Next.js and webpack memory usage and performance.
"Next.js req/s and RAM usage benchmark"
Not used in article
💭 Looking into
Explain how much RAM is needed for each of the individual requirements separately
💭 Looking into
Directly answer the query with recommended RAM size