Current recommendations are 800 IU per day if you’re not significantly deficient. Always keep testing at least once a year or so. I took 5000 IU per day for a while, which ended up pushing me over 60 ng/ml. That’s considered too high a level and may have negative health effects.
I tested after taking 4000 IU daily for quite a while and ended up at 30.9 ng/ml, so I guess I have some buffer left. But I fully agree, regular testing is prudent when supplementing anything above common established levels.