Raspberry pi 4 usually high wa and slow loading time

Hello,
I’ve noticed now when I tried to do some changes on my network that the HA interface loads slow when I viewed top via ssh, I saw similar like this:

top - 19:49:39 up  3:47,  3 users,  load average: 3.88, 3.25, 3.02
Tasks: 260 total,   1 running, 259 sleeping,   0 stopped,   0 zombie
%Cpu(s):  4.0 us,  1.2 sy,  0.0 ni, 46.9 id, 47.8 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :   3906.0 total,     87.1 free,   1008.4 used,   2810.5 buff/cache
MiB Swap:    100.0 total,     60.0 free,     40.0 used.   2756.6 avail Mem

I running the Rasbian from a Sandisk Ultra 64 GB microSDXC card, so maybe that’s why is the IO waiting time big? But this wasn’t always the case.
I also bit worry about memory… It’s kind of tight I would say.

And also sometimes this also happens:

top - 19:59:47 up  3:57,  3 users,  load average: 5.58, 3.98, 3.35
Tasks: 259 total,   1 running, 258 sleeping,   0 stopped,   0 zombie
%Cpu(s):  4.9 us,  0.7 sy,  0.0 ni,  1.3 id, 93.0 wa,  0.0 hi,  0.1 si,  0.0 st
MiB Mem :   3906.0 total,     74.0 free,   1013.4 used,   2818.6 buff/cache
MiB Swap:    100.0 total,     59.7 free,     40.2 used.   2752.1 avail Mem

How can I solve this issue? Do I need to use an external SSD?

I have the same, my rasberry is not only used by home assistant. I just tried to move the datas from my SD card to an external hard drive, it looks better. I’m sure it could be even better with a SSD. I will try and i will update if it’s the case.