View Issue Details

IDProjectCategoryView StatusLast Update
0009913MediaMonkey (current)DB/FileMonitorpublic2018-07-23 20:33
Reporterrusty 
PriorityhighSeverityblockReproducibilitysometimes
Status closedResolutionfixed 
Product Version4.0.6 
Target Version4.1Fixed in Version4.1.12 
Summary0009913: Win 8: CPU utilization goes to 70-80% when external USB drive connected
DescriptionMichal and Frank have both noticed that after updating from win 7 to Win 8, CPU utilization rises from less than 10 % to 70-80% upon starting MediaMonkey (Windows Driver Foundation utilization jumps from 0% to 50-60% accounting for much of the increase).

The behavior goes away upon removal of the external USB drive.
TagsNo tags attached.
Fixed in build1787

Relationships

related to 0013191 closedLudek MediaMonkey (current) Scanned external HDDs in MMW should be excluded from Portable devices list 
related to 0009453 closedpetr MediaMonkey (current) Windows 8 compatibility 
related to 0013666 feedbackrusty MediaMonkey 5 Plugging in a drive eats up CPU resources due to automated scanning 
related to 0014982 closedLudek MediaMonkey 5 Issues with syncing to external HDDs 

Activities

michal

2012-11-02 07:57

developer   ~0032879

It is caused by basic scan of the device. USB drive in Windows 8 is recognized as device (d_WMDM driver) and because "Scan as soon as the device is connected" is on by default, MM4 do this scan every time, it starts. And because USB drive is usually big (e.g. 1TB), it takes a lot of time and CPU.
The same USB drive is not shown as device node in Windows 7 (even if this is checked in Options -> "Available devices"), so it is not scanned as device. I can add it as generic device and then receive higher CPU utilization too (during its scan). The only difference is, that in Windows 8, CPU utilization is caused by "Windows Driver Foundation" process, in Windows 7 by MediaMonkey.exe process.

jiri

2012-11-02 08:46

administrator   ~0032880

The situation is as follows: We don't control what WMDM considers to be a portable device and it seems that in this case MS made a change since Win7 and the portable drive is reported by WMDM. So, we show it in MM and process with the initial scan => described result. User has two options there: 1. Disable 'Scan as soon as the device is connected' or 2. Completely disable the device in Options\Portable devices.

I don't see what could we do about it, except for a KB article. We could try to make a guess which devices should have 'Scan as soon...' option disabled by default, but I'm not sure we can do it well.

jiri

2012-11-02 10:14

administrator   ~0032884

Update: Further study of the issue revealed that there might be a trick to recognize portable HDs. Assigning to Michal to try to implement. Note that we will try to completely ignore these drives for now. We could also consider a future tweak - to not ignore them, but to disable the startup scan be default. User could decide then, whether to start using the device, or rather completely disable it in Options.

rusty

2012-11-02 17:35

administrator   ~0032892

Possible workarounds:
1) Always prompt the user whether to create a new device profile when a new device is detected for the first time. e.g.

The following new devices were detected. Select those that you wish to sync with MediaMonkey.
[ ] Device A
[ ] Device B
[OK]"

Unfortunately, this isn't localized...

2) Add context menu to the devices entries in the tree "Delete (Device Profile)"

 or perhaps

"Hide (Device Profile)"?

Ludek

2012-11-03 21:39

developer   ~0032903

Last edited: 2012-11-03 22:09

View 5 revisions

I can confirm the issue on Win8 in VMware. Because I tested 4.1, scanning doesn't take any time as in 4.1 we scan only sync locations by default (Music, Video, ...).

The drive is shown as Removable, but Windows explorer shows it as "Local Disk". So there is a way how to distunguish it. Probably RemovableMedia flag in the STORAGE_DEVICE_DESCRIPTOR structure could help: http://msdn.microsoft.com/en-us/library/windows/desktop/ff800835(v=vs.85).aspx ?

We already use the query in TSDBDeviceList.AddPossibleDevices.getDriveIDs, but it might require admin rights?


Maybe there is also a way how to find it over WMDM?

Ludek

2012-11-05 15:09

developer   ~0032929

Last edited: 2012-11-05 15:46

View 7 revisions

I have found only a solution like this:
Win 8 presents the drive as MTP device without drive letter, but the same device is presented under My Computer node as local drive with drive letter.
So we can match the device (based on name/size) with the drive and in case of match we can ignore the device (in case the drive is fixed local drive).
I also tried matching based on Seria Number, but WMDM interface returns diferent SN than the drive SN.

//------------------

BUT I am still not sure whether the "hack" above is needed at all, because:

Note that WMP (Windows Media Player 12) behaves exactly the same way in this area.

It also presents external HDD as MTP device in WMP interface and WMP scans whole the device content on background.

i.e. it is really rather Windows 8 bug (or feature? :-) ) that it presents external HDDs as MTP devices.

rusty

2013-01-10 14:58

administrator   ~0034366

Ludek, does WMP have high CPU utilization every time it runs? Or only when it runs for the first time or the drive is just plugged in?

Ludek

2016-04-04 12:21

developer   ~0044377

Fixed in 4.1.12.1787

i.e. if external HDD is first time connected then profile is unchecked in Options -> Portable Device Sync (until user check it to show)

Related to 0013191

peke

2016-04-08 14:51

developer   ~0044418

Verified 1787