HOWTO Fix Artificially High Load Average on FreeBSD Running on Oracle Cloud

I noticed that my amd64 VPSes on Oracle Cloud all had load averages over 1.0. These are the free tier VM.Standard.E2.1.Micro instances.

# w
6:11PM up 5 days, 1 hr, 2 users, load averages: 1.39, 1.62, 1.41

This was with a basically idle machine. When I checked top I found nothing interesting. No processes were running constantly.

The machines in question are FreeBSD 13.0

# freebsd-version -kru
13.0-RELEASE-p7
13.0-RELEASE-p7
13.0-RELEASE-p7

I dug around in sysctl:

kern.timecounter.choice: i8254(0) ACPI-fast(900) HPET(950) TSC(-100) dummy(-1000000)
kern.timecounter.hardware: HPET

The timecounter clock source was HPET by default. I found that if I switched the clock source to i8254 the load avergaes reverted to nominal levels.

# sysctl kern.timecounter.hardware=i8254

# w
6:32PM  up 5 days,  1:21, 2 users, load averages: 0.23, 0.27, 0.63

This was the solution to fixing the high load average on FreeBSD running on Oracle Cloud VPSes.

In order to make this change permanent add it to your /etc/sysctl.conf file:

# echo 'kern.timecounter.hardware=i8254' >> /etc/sysctl.conf

Interestingly, the aarch64 (Ampere) FreeBSD 14/current machine did not have this issue.

I also tried the ACPI-fast timecounter source and it did not fix the issue. I was only able to fix the load average using the i8254 timecounter clock source.

Thanks to koobs on #freebsd for helping me figure this out.

This entry was posted in Uncategorized and tagged , , , , , , , . Bookmark the permalink.

Leave a Reply