View Issue Details

IDProjectCategoryView StatusLast Update
0003946MMW v4Otherpublic2009-02-23 02:24
Reporterjiri Assigned To 
PriorityurgentSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.0 
Fixed in Version3.1 
Summary0003946: Use multi-kernel processor more efficiently
DescriptionCurrently e.g. auto-conversion on Sync or on Burning uses one thread to prepare tracks. However, most new computers have at least two CPUs (or rather CPU kernels) and soon this will be even more increased. In order to better use them, we should start more threads doing these actions simultaneously.

The # of threads should probably be equal to the # of available processors. It should also be somehow customizable (at least to enable/disable this feature).
TagsNo tags attached.
Fixed in build1191

Relationships

related to 0003945 closedLudek Faster data CD burning with auto-conversion 

Activities

Ludek

2008-09-03 07:46

developer   ~0014520

I have done a test with two parallel converting threads running.
I have tested on my AMD Athlon 64 X2 Dual Core Processor 4000+, 2.10 GHz, 2 GB RAM and testing set was 20 tracks to be auto-converted.

The test results are:
1. Auto-converting 20 tracks on a single thread : 60 seconds, both processors had about 80% utilization.

2. Auto-converting the same 20 tracks on two separate simultaneous threads : 58 seconds, both processors had about 80% utilization too.

So it seems that the job is distributed between both processors despite the fact how many threads we starts.

jiri

2008-09-19 15:36

administrator   ~0014622

Last edited: 2008-09-19 15:36

So far there are the following actions implemented in the multi-threaded mode (with performance increase tested on Dual Core processor):

Auto-Conversion: ~ 20%
Volume Leveling: ~ 60%

Note: Performance increase is calculated as a ratio of time taken on one processor/time taken on two processors = i.e. 1.6 <=> 60% increased performance.

Note: I expect the increase to be even more significant on Quad core processors, possibly close to theoretical 300% maximum (realistically I'd expect 200-250%).

rusty

2008-10-02 22:04

administrator   ~0014700

Question: is there really a benefit to disabling any cores? i.e. should we consider not including any UI at all for this?

Assuming the answer is no, I would suggest the following UI (modified from Jiri's original suggestion):

General > Performance

Use Multiple CPU cores (if available):
Auto-Conversion: _4_ [v]
Conversion: _4___ [v]
Ripping: _4_ [v]
Volume Analyis: _3___ [v]

Priority for background tasks: _lower_^

I would suggest that:
-By default the # cores used for any task should be All-1 or All-1
-The options should be 1 to X (where x = total number of cores) OR 1, 2, All but 2, All but 1, All. The second option is better except that it would require some extra logic to not present e.g. 'All but 2' and 'All but 1' if the number of cores is limited to 2 or less.
-The top portion should be set to 1 by default, and greyed out, if MM is the Standard version
-Context help: Improve performance of some tasks by utilizing multiple CPU cores

jiri

2008-10-06 20:04

administrator   ~0014720

Last edited: 2008-10-06 20:05

Implemented some more actions:

Encoding: 25-60% in my tests
CD Ripping: ~ 45% (surprisingly good result given that it was limited by quite slow speed of my CD drive)

jiri

2008-10-06 21:18

administrator   ~0014722

Assigning to Ludek to implement as suggested by Rusty above, with some small changes:

1. The default value should by 'All', but it should be shown as '1' for non-Gold users (so that when a Gold code is entered, it automatically starts using all cores).

2. It's enabled even for non-Gold users, but whenever user tries to change to anything but '1', the Gold registration dialog is shown (with appropriate messages).

3. The values shown should be:
For 1 processor: 1, All
For 2 processors: 1, 2, All
For 4 processors: 1, 2, 3, 4, All but 1, All
For 8 processors: 1, 2, 3, 4, 5, 6, 7, 8, All but 1, All
... (I guess the pattern is clear)
(I think that 'All but 2' isn't needed).

(note that related configuration values and needed functions are in GlobVars.pas)

Ludek

2008-10-08 18:50

developer   ~0014733

Last edited: 2008-10-08 18:51

Added UI configuration exactly as described by Jiri in the previous note,
the "non-gold" text is:
'Using Multiple CPU cores is only available in the Gold version.'
and next to this text is the upgrade prompt situated.

Rusty should review/fix the wording.

Ludek

2008-10-20 18:22

developer   ~0014808

As discussed over IM, during testing I found several regressions that I have fixed nevertheless there are some regressions related to proper showing/indicating in status bar. So far I found out that status bar is messed up when ripping/converting with normalization enabled or e.g. when auto-analyzing volume.

Assigned to Jiri for fixing the "StartSubLevel()" problem as discussed over IM.
Once you fix assign to me for testing.

jiri

2008-10-20 21:53

administrator   ~0014815

It should work well now, please check it out.

Ludek

2008-10-21 19:11

developer   ~0014818

I fixed some other tweaks/regressions related to status bar indication that I have found.

I tested ripping (with both album/track normalization), burning (with both album/track normalization), conversions (with track normalization), auto-analyzing.

Fixed in build 1190.

Rusty, don't forget to review wording in note 14773 (i.e. the prompt for non-gold users)

rusty

2008-10-27 21:10

administrator   ~0014835

'Using Multiple CPU cores is only available in the Gold version.'
-->
The standard version of MediaMonkey is optimized for single-core processors. For optimized performance on multi-core processors, please upgrade to MediaMonkey Gold.

Ludek

2008-10-28 17:30

developer   ~0014838

Fixed wording in build 1191.

stephen_platt

2009-02-23 02:24

developer   ~0016915

verified 1224