public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Kees Dekker <Kees.Dekker@infor.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: XWin.exe causes a 25% CPU load on Windows 7
Date: Thu, 16 Mar 2017 15:28:00 -0000	[thread overview]
Message-ID: <858F859BB4F2824EBAB5D4ED58214CB7016A45F4C7@NLBAWEXMBX3.infor.com> (raw)

Hi,

I'm running into a strange problem. On my PC (a quad core i5), Xwin.exe takes (in combination with svchost.exe) 25% average CPU load. Stopping xwin.exe, also reduces the load to almost zero (if I'm not doing anything else). The load is mainly on 2 CPUs (almost 50% on both) and 10% on the other two. Almost all the shown CPU load in Windows task manager are kernel times (90% of the load).

The way how I start my (64-bit) X-server is on Windows 7 x64:

C:\cygwin64\bin\run.exe /usr/bin/bash.exe -l -c /usr/bin/startxwin -- -clipboard -multiwindow -silent-dup-error

The .startxwinrc file contains nothing else than sleep 2000000000
Even if I replace the sleep with xterm, or even remove the .startxwinrc file (and fall back to the default, i.e. an additional icon in my system tray), it does not make any difference.

My system is also equipped with a virus scanner, but even if I (temporarily) disable it, it makes no difference. Xwin still takes 12-15% and svchost.exe takes another 8-12%. This CPU consumption is almost all kernel times.
Even tracing with either the Windows resource monitor, or sysinternals process explorer does not show (for me) much clues. The resource monitor shows some disk I/O (< 100Kb), almost no network I/O (<10Kbps) but sill 25+% CPU usage. The two top processes on the Windows Resource monitor are Xwin.exe and svchost.exe (LocalSystemNetworkRestricted).

A check with process explorer learned that almost all load of svchost.exe Is in uxsms.dll!ServiceMain. Xwin.exe's CPU load is in ig75icd64.dll!DrvSetLayerPaletteEntries+0x950.
Capturing process traces with process monitor can be done, but Xwin.exe is just a very few times existent in this trace (that ran for 1 minute). The same applies to xinit. Svchost.exe is often in this trace, querying files and registry. But nothing that points to a clue (for me). May be wmiprvse.exe may also play a role.

Notes:
1. All packages are up to date (Cygwin setup did not find any updates).
2. Nothing else is running in the X server. No xterm, no remote connections, nothing. Only the XWin.exe/X-server has been started.
3. Opening remote connections (to Unix system), in the form exec xterm -e ssh -Y <host> will not lead to significantly more CPU load. The 25% average CPU usage is quite consistent (may vary a few percent, but not more).

I know, the above information is vague, but do anyone have a suggestion/suggestion how to find a root cause?
Unfortunately, I don't know when this higher-than-expected CPU load occurred for the first time. The problem became somewhat more urgent as our IT department moved our systems to a newer virus scanner, that also seems to take (much) more resources. The combination of these two makes working with this PC bad.

Regards,
Kees

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

             reply	other threads:[~2017-03-16 15:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16 15:28 Kees Dekker [this message]
2017-03-16 21:12 ` cyg Simple
2017-03-20  7:37 ` Kees Dekker
2017-03-22 20:05 ` Jon Turney
2017-04-24 16:52   ` Kees Dekker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=858F859BB4F2824EBAB5D4ED58214CB7016A45F4C7@NLBAWEXMBX3.infor.com \
    --to=kees.dekker@infor.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).