DEV Community

Cover image for OH! No, My Macbook is super slow 😱
Aliakbar Salehi
Aliakbar Salehi

Posted on

4 2

OH! No, My Macbook is super slow 😱

last week my dev laptop (MacBook Pro 13-inch, 2019, Four Thunderbolt 3 ports) went super slow. The laptop fan was working at high speed, it sounds like a bitcoin miner.
I was curious to see what happened. Nothing was working correctly, really weird!.

I opened the Activity monitor and checked processes and app resource usage. CPU usage was normal, then I moved to the memory, it was fine, and then I moved to the disk usage. OH! There were just a few megabytes free.
How it was possible, I use this Macbook just for working purposes.

I used the grandperspectiv to visualize the HDD usage.
first run

and found these 3 major reason:

  • docker.raw (64GB )
  • node_modules folders
  • Application cache (chrome, Mozilla, developer tools, yarn and nvm)

solutions:

  • you can change the size of docker.raw in docker settings ( have a look at this link
  • I suggest using this command in your home folder to remove node_modules in all old packages

find . -name 'node_modules' -type d -prune -exec rm -rf '{}'

  • clean npm and yarn cache

Just by these 3 simple solution I freed up to 100GB of my disk storage.

Image of Datadog

How to Diagram Your Cloud Architecture

Cloud architecture diagrams provide critical visibility into the resources in your environment and how they’re connected. In our latest eBook, AWS Solution Architects Jason Mimick and James Wenzel walk through best practices on how to build effective and professional diagrams.

Download the Free eBook

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more