WinGate consumes CPU even if everything is idle

Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems

Moderator: Qbik Staff

WinGate consumes CPU even if everything is idle

Postby fionik » 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: Select all
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
fionik
 
Posts: 6
Joined: Mar 23 10 7:41 pm

Re: WinGate consumes CPU even if everything is idle

Postby Alen » 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.
Alen
WinGate Master
 
Posts: 217
Joined: Sep 21 09 7:50 pm

Re: WinGate consumes CPU even if everything is idle

Postby fionik » 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.
fionik
 
Posts: 6
Joined: Mar 23 10 7:41 pm

Re: WinGate consumes CPU even if everything is idle

Postby Alen » 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.
Alen
WinGate Master
 
Posts: 217
Joined: Sep 21 09 7:50 pm

Re: WinGate consumes CPU even if everything is idle

Postby adrien » 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
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: WinGate consumes CPU even if everything is idle

Postby fionik » 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?
fionik
 
Posts: 6
Joined: Mar 23 10 7:41 pm

Re: WinGate consumes CPU even if everything is idle

Postby adrien » Mar 31 10 6:14 pm

Hi

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

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland


Return to WinGate

Who is online

Users browsing this forum: No registered users and 50 guests

cron