I found that systime on a linux node is quite unreliable if you do not have access to an ntp server.
Without an properly configured ntp the systemclock on some of the nodes alters with up to 50sec a day.
So I've added a flag to our timestamp object that fetches current timestamp from database and uses it.
all input into the database already uses the current timestamp when updating so it works. But I
like to use this from the outside also.
This is a performance cluster and some of the old code do not cache that well so it issues
around 200calls/sec of those on each node.
And with 10 nodes this will be around 2000 calls/sec to the central DB2 database.
This is minimum. If I apply it on all timestamp objects it will be around 30000calls/sec at peak.
I can cache this down, but it requires rewrite of old code I do not have time to do.
I was wondering if there is a way to cache this variable on the db2 node, or is it cached.
Now I'm only using this very sparsely and it works great. Latency is very low. So I assume the client is already doing some caching.
or this resides in the handler most of the time.
Another option is to sync systime with current timestamp from the database.
But this should probably be done manually and then reboot the node. to get the new systime in effect.
Any feedback on this.
Evry Cardservices AS
This topic has been locked.
Pinned topic sync systime on linux cluster nodes with DB2 current timestamp
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
mor 110000Q8NJ577 Posts
Re: sync systime on linux cluster nodes with DB2 current timestamp2012-05-10T09:47:23ZThis is the accepted answer. This is the accepted answer.I thought that having a reliable ntp server is a pre-requisite for any cluster.
Maybe you will get more value from properly solving that missing ntp server problem that trying to hack around its absence.
I know this does not directly answer your question but you might want to look at the problem from a wider perspective.
nivanov1 100000H9H7231 Posts
Re: sync systime on linux cluster nodes with DB2 current timestamp2012-05-10T14:25:54ZThis is the accepted answer. This is the accepted answer.> Another option is to sync systime with current timestamp from the database.
That would serve no purpose, as the value of CURRENT_TIMESTAMP comes directly from the system clock on the database server. I fully agree with mor, you must have a working ntp server for your cluster. Any node can serve as the time source, you don't need a separate server for that.