I have an install of FreeBSD 7.0 for my webserver running on a VMWare platform. (VMWare Server, will be VMWare ESXi in the near future.)

The problem is that the time is very slow.... 3 to 4 seconds in the real world is 1 second on the FreeBSD box... VMWare tools doesn't support time sync with the host on FreeBSD. I've tried setting kern.hz=100 but I didn't notice much of a change.

I set the time earlier today, at roughly 10:00am EST... it is now 1:19 pm EST but the server reads 11:20am EST.

This isn't good for a webserver.

I'm also new to FreeBSD and 'nix in general.

I'm thinking some sort of ntpd implementation may be the best route. Time doesn't need to be 100% accurate at all times since the websites that this server hosts aren't the most mission critical things but I'd like the time to be within 5 minutes of the actual time.

If I kick off ntpd -g via cron when the system boots, that should handle the issue, but how do I make ntpd check the time every X minutes. I'm not worried about network traffic as the box sits on the same copper gigabit switch as my NTP server. I'm thinking if I set it to check every minute it should help me out quite a bit in keeping proper time.

Can anyone give me a hand or some insight that might help fix the issue?

As far as I know, ntpd has its own internal 'check cycles', where it performs all kinds of calculations on averages, delays, time slew, and what have you. I don't think there's a way to interfere with that process. You may be better off using the ntpdate command from cron. Given the large deviations in time, you will probably need ntpdate -b [ntp-host] (note below) at boot-up (to sync the initial time), and maybe even from cron as well (where you would normally not use the -b option). See man ntpdate.

I employed all of the tweaks listed above and ntpd. The tweaks helped to slow the rate of variance between the machine's time and the real world, however there was still a variance before I implemented ntpd.

Once I implemented ntpd I noticed some really weird time issues. The machine would boot up fine then time would vary at seeming random speeds throughout the course of a few days.

I had to reboot the box a few times, but I think ntpd has set up it's averages and realized what is happening. The time is now synched with my NTP server.