-1

I use several remote servers to test a parallel system, the process will take about 0.4s each time. So when I run the program in several servers, the running time range from less than 0 to 1s. The weird results came from the small difference system time in each remote, which show as follows:

[1] 14:25:45 [SUCCESS] [email protected]:22
Sun Dec 25 14:25:46 EST 2016
[2] 14:25:45 [SUCCESS] [email protected]:22
Sun Dec 25 14:25:45 EST 2016
[3] 14:25:45 [SUCCESS] [email protected]:22
Sun Dec 25 14:25:46 EST 2016
[4] 14:25:45 [SUCCESS] [email protected]:22
Sun Dec 25 14:25:46 EST 2016
[5] 14:25:45 [SUCCESS] [email protected]:22
Sun Dec 25 14:25:47 EST 2016

The servers have 1s to 2s difference with each other, so my test results are some of less than 0. So how to avoid this difference in servers that the results will be normal?

4
  • Set them each other has NTP to each other with a backup to time.gov or whatever centeral NTP authority you want
    – Ramhound
    Dec 26, 2016 at 0:24
  • Thank you, can you show more details? A little confused about it...
    – Andi
    Dec 28, 2016 at 3:28
  • An answer that explains how to setup NTP services would take me over an hour to write and that's IF I knew what OSs you were using
    – Ramhound
    Dec 28, 2016 at 3:47
  • I use linux, also can you show me some useful link about NTP?
    – Andi
    Dec 28, 2016 at 5:18

1 Answer 1

1

Assuming you're doing it manually, and need to know how long it takes... have some way to take down the time on the server that is running the task. This would be something as simple as modifying your wrapper to send the output of say, the time command, rather than manually computing it when your control server gets it.

1
  • The problem is, it's difficult to record the starting time in each server, because it's a distributed system, so all info of time will gather into one server. The results from servers will mixed together...
    – Andi
    Dec 26, 2016 at 1:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .