Is there some reason that a gateway backup run from a windows service using gwcmd would take 3-5x longer than the same backup run from userspace? (this is also somewhat nondeterministic even on the machines where it happens)
Moreover, why do gateway backups of the same gateway take extremely different times when run at various times? (The gateway load is basically constant time to time)
EDIT: the issue was pebcac, gwcmd asking for permission to overwrite a file and just not running til that file got deleted
3-5x longer as a unitless measurement isn't very helpful.
300ms becoming 1500ms is meaningless and could just be GC noise or vagaries of the filesystem.
3 seconds becoming 15 seconds is theoretically more concerning, but if you're not actually seeing a problem, I wouldn't worry.
30 seconds becoming 2.5 minutes could be problematic/alarming, but not all "constant CPU loads" are created equal.
The most likely explanation is something holding a lock on a vital thread internally by random chance, which would explain why you can't nail exactly why it's happening. I'm assuming this is 8.1, so the SQLite internal DB is fully in play.
1 Like
It’s 8.1, yes.
1-2 min becoming 5-10.
(The 1-2 minute baseline doesn’t seem that surprising, the AV on the system starts churning whenever we trigger a backup and it’s a ~200 MB gateway)
If you really want to find out, then you'd have to add instrumentation or otherwise programatically collect thread dumps during that 5-10 minute process.
1 Like
That's just terrible. Get a competent OS. 
3 Likes
it has been [0] days since Phil has asked an industrial user to switch OSes
8 Likes
…i fixed the issue…
protip, if youre running a script from a windows service, add -y to your gwcmd calls
4 Likes