A dashboard that takes five seconds to load and automations that fire a beat late almost always trace back to one of three things. Fixing a slow or laggy Home Assistant starts with identifying which one is biting you: a worn SD card, a recorder database that has ballooned into the gigabytes, or a host that is simply too weak for the number of integrations you are running.
Quick Answer
The three big causes of Home Assistant slowdown are a degrading SD card, an oversized recorder database, and underpowered hardware. Move off the SD card to an SSD, cut the recorder's purge_keep_days to around 7 to 10 days and exclude noisy entities, and you fix the vast majority of lag without buying a new machine.
Cause 1: The SD Card Is Dying
If you run Home Assistant on a Raspberry Pi with a standard microSD card, that card is the most likely culprit. Home Assistant writes to disk constantly, and consumer SD cards are not built for that workload. They slow down as they wear, and eventually corrupt and fail outright.
The fix is to move to an SSD, which is the single most effective upgrade for a sluggish Pi-based install. Even a small SATA SSD in a USB enclosure transforms responsiveness. If an SSD is genuinely not an option, at least switch to a card explicitly labelled High Endurance, which is rated for far more write cycles than a normal card. A spread of suitable drives and enclosures sits in the accessories best sellers.
Cause 2: The Recorder Database Has Bloated
Home Assistant logs the state of every entity to a database for history and the logbook. Left unmanaged, this file grows into several gigabytes, and a large database makes the whole interface drag and slows startup.
Two settings tame it. Lower purge_keep_days to trim how much history is retained; the default is often 10 days, and dropping to 7, or even 3 on a constrained system, shrinks the file considerably. Then exclude noisy entities that update many times a minute and add no value to history, such as constantly-changing sensors. An exclude strategy in the recorder configuration is the most powerful single change you can make.
One detail catches people out. After a purge, the database file does not actually shrink until it is repacked. Home Assistant repacks automatically on the second Sunday of the month, or you can trigger the recorder.purge service with repack enabled to reclaim the space immediately.
A Sensible Recorder Starting Point
recorder:
purge_keep_days: 7
commit_interval: 30
exclude:
domains:
- device_tracker
Raising commit_interval to 30 seconds batches writes into memory and flushes them periodically, which both reduces lag and is gentler on an SD card if you are still on one.
Cause 3: The Hardware Is Just Too Weak
If the card is healthy and the database is trimmed but everything still crawls, the host may not have the headroom for your setup. A first-generation Pi or a low-RAM mini PC struggles once you stack up many integrations, add-ons, and camera streams.
Watch CPU and memory in the System settings. If they sit pinned during normal use, no amount of database tuning will help, and the real answer is more capable hardware. A modern mini PC with an SSD and a few gigabytes of RAM runs a large, busy Home Assistant instance comfortably and leaves room for extras like local voice or camera detection. The smaller building blocks for that kind of upgrade live in the smart home and appliances category.
Frequently Asked Questions
What is the single most effective fix for a slow Home Assistant?
Moving from an SD card to an SSD. SD cards wear out under Home Assistant's constant writes and slow down as they degrade, so an SSD usually delivers the biggest, most immediate improvement in responsiveness and reliability.
How small should I set purge_keep_days?
Seven to ten days suits most setups, balancing useful history against database size. On a constrained device you can go as low as 3 days. Remember the file only shrinks after a repack, which runs automatically or can be triggered manually.
Why does my database stay large even after purging?
Purging removes old records but does not reclaim disk space until the database is repacked. Home Assistant repacks on the second Sunday of the month, or you can run the purge service with the repack option to free the space straight away.
Will excluding entities lose data I need?
Only the history for those specific entities. Their current state still works for automations and dashboards; you simply stop logging their changes to the database. Exclude high-frequency sensors that you never look back on, and keep the ones whose history matters.
Is a Raspberry Pi powerful enough for Home Assistant?
A Pi 4 or 5 with an SSD handles most home setups well. If you run many integrations, camera streams, or local AI, a mini PC with more RAM and CPU gives the headroom to stay smooth as your system grows.
Tired of a laggy dashboard? An SSD is the quickest cure. Browse the accessories best sellers at Evetech for drives and enclosures, or step up to a mini PC built to run a busy Home Assistant without breaking a sweat.