remotely run TX2 is faster than run locally, any idea?

situation 1:
I connect TX2 board with monitor, keyboard, mouse, then run a program, it takes about 50 ms.

situation 2:
I use ssh to connect to TX2, then run the same program, it takes about less time, sometimes 40ms, sometimes 30ms, it’s surely less than 50ms all the time. Does anyone know why?

My experiment:

  1. My first thought is the ubuntu GUI may consume CPU, then I unplug the monitor, and run locally, still 50ms.
  2. I also check the status of GPU, none of them uses more than 60% of capability.

Please comment if you have some thought, thanks in advance.

You may get a possible explanation in this post.