Switch to full style
Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems
Post a reply

WinGate consumes CPU even if everything is idle

Mar 26 10 6:14 pm

I have just noticed that WinGate engine is constantly using CPU horse powers even if everything is idle. There are no connected clients. No records in the history tab. Its usage is always 2..3% of CPU and generally is not noticeable however after few hours of work looking on the "CPU Time" column of SysInternals Process Explorer I find that WinGate is actually top CPU consumer.

Most active thread stack trace:
Code:
ntkrnlpa.exe!KeSetEvent+0x2a1
ntkrnlpa.exe!KeDelayExecutionThread+0x5cc
ntkrnlpa.exe!KeWaitForMutexObject+0x393
ntkrnlpa.exe!KeQueryHighestNodeNumber+0x9fe
ntkrnlpa.exe!KeRemoveQueueEx+0x988
ntkrnlpa.exe!KeDelayExecutionThread+0x5cc
ntkrnlpa.exe!KeWaitForMutexObject+0x393
ntkrnlpa.exe!NtWaitForSingleObject+0x1e8
ntkrnlpa.exe!ZwYieldExecution+0xb66
ntdll.dll!KiFastSystemCallRet
WinGate.exe!l4linkSt::operator=+0x13d8c8
WinGate.exe!l4linkSt::operator=+0x13d0da
WinGate.exe!l4linkSt::operator=+0x129ab5
kernel32.dll!BaseThreadInitThunk+0x12
ntdll.dll!RtlInitializeExceptionChain+0x63
ntdll.dll!RtlInitializeExceptionChain+0x36

Re: WinGate consumes CPU even if everything is idle

Mar 26 10 10:05 pm

Obviously that is because of the process(es) is (are) running - should someone listen to the respective ports or not? Wingate cann't just "sleep" and "wake up" only when client is making request, hacker is trying to come in, etc. The program is constantly running and consuming resources.

Besides, OS is constantly making internal data tranfers which also "walk" through the stack and may also disturb Wingate. But I am not sure.

2-3% is ok, don't worry.

Re: WinGate consumes CPU even if everything is idle

Mar 27 10 2:33 am

Obviously that is because of the process(es) is (are) running - should someone listen to the respective ports or not?

Maybe I'm wrong and it's okay, however I have several programs that listen and their CPU usage is almost zero when they are idle and just listening.
Wingate cann't just "sleep" and "wake up" only when client is making request, hacker is trying to come in, etc.

Why? Does WaitForSingleObject or WaitForMultipleObjects consume CPU?
The program is constantly running and consuming resources.

That is my main reason to worry as it eats more CPU than all other background processes together.

Re: WinGate consumes CPU even if everything is idle

Mar 27 10 3:29 am

fionik wrote:Why? Does WaitForSingleObject or WaitForMultipleObjects consume CPU?

Programmer!?
Well, let's then wait for Adrien's reply, he will explain everything.

P.S. Unfortunately by default all services in Wingate are running, bindings are set, etc. May be some services are the reason
I, personally, just deleted all unused user services \ disabled unused system services. Try to optimize a little, then look again.

Re: WinGate consumes CPU even if everything is idle

Mar 27 10 1:37 pm

Hi

Most parts of WinGate are event-driven, so don't consume any CPU until some event happens.

However, WinGate polls for changes to the network system. On later OSes this takes more CPU (and IO).

Since we dropped support for OSes prior to 2k, we can now change this, but haven't yet.

Regards

Adrien

Re: WinGate consumes CPU even if everything is idle

Mar 31 10 4:17 pm

So, If I understand you correctly it is going to be fixed in the near future, isn't it?

Re: WinGate consumes CPU even if everything is idle

Mar 31 10 6:14 pm

Hi

yes, we've done some work already to change this.

Regards

Adrien
Post a reply