Slightly tweaked formula to selected the number of instances based on CPU count. Maximum value is now 16.
This commit is contained in:
parent
3a74f55c5f
commit
c1b88a7d07
@ -21,6 +21,7 @@ a:visited { color: #0000EE; }
|
||||
<li>Updated LAME encoder to v3.99.2 Final (2011-11-18), compiled with ICL 12.1.7 and MSVC 10.0 (<a href="http://lame.cvs.sourceforge.net/viewvc/lame/lame/doc/html/history.html?revision=1.134" target="_blank">details</a>)
|
||||
<li>Updated MediaInfo to v0.7.51+ (2011-11-19), compiled with ICL 12.1.6 and MSVC 10.0
|
||||
<li>Implemented coalescing of update signals in order to reduce the CPU usage of the LameXP process
|
||||
<li>Run more than four instances in parallel on systems with more than four CPU cores (<a href="FAQ.html#89cbd3d0" target="_blank">details</a>)
|
||||
</ul><br>
|
||||
|
||||
<a name="4.03"></a>Changes between v4.02 and v4.03:<br><ul>
|
||||
|
12
doc/FAQ.html
12
doc/FAQ.html
@ -479,21 +479,21 @@ mapping! Instead a custom-made 'cubic spline' function is used to map the number
|
||||
number of instances. This function has the following properties: On systems with at most four CPU cores, the<br>
|
||||
maximum number of parallel instances will be identical to the number of CPU cores. On systems with eight CPU<br>
|
||||
cores, the maximum number of parallel instances is six. On systems with 16 cores, the maximum number of<br>
|
||||
parallel instances is eight. On systems with 32 cores, the maximum number of parallel instances is ten. And<br>
|
||||
on systems with 64 cores, the maximum number of parallel instances is twelve. Twelve is the upper limit.<br>
|
||||
parallel instances is eight. On systems with 32 cores, the maximum number of parallel instances is eleven.<br>
|
||||
And on systems with 64 cores, the maximum number of parallel instances is 16. 16 is the upper limit.<br>
|
||||
<br>
|
||||
<a href="http://img265.imageshack.us/img265/9200/cpucoresmapping.png" target="_blank"><img src="http://img265.imageshack.us/img265/9200/cpucoresmapping.th.png" border="0" alt="thumb"></a><br>
|
||||
<a href="http://img685.imageshack.us/img685/9453/cpucoresmappingnew.png" target="_blank"><img src="http://img685.imageshack.us/img685/9453/cpucoresmappingnew.th.png" border="0" alt="thumb"></a><br>
|
||||
<br>
|
||||
You may wonder why LameXP doesn't always create one instance for each CPU core. In theory, the more instances<br>
|
||||
we create, the more CPU cores can be utilized. In reality, however, there are more "shared" resources on the<br>
|
||||
computer. And, the more instances we run in parallel, the more processes will be competing for the shared<br>
|
||||
we create, the more CPU cores can be utilized. In reality, however, there are some "shared" resources on the<br>
|
||||
computer. And, the more instances we run in parallel, the more processes will be competing for these shared<br>
|
||||
resources! More specifically, the amount of main memory (RAM) is limited. Creating a huge number of instances<br>
|
||||
in parallel can easily use up all RAM, which will cause the operating system to make heavy use of the page<br>
|
||||
file. This can result in HDD thrasing and may significantly hurt the overall performance! But even when there<br>
|
||||
is enough RAM available on the system, each encoder or decoder instance needs to access the HDD, e.g. for<br>
|
||||
reading the input file and for writing the output file. Thus too many instances will cause an I/O bottleneck!<br>
|
||||
If, however, you think that LameXP's choice of the number of parallel instances is too conservative, you may<br>
|
||||
overwrite the number of parallel instances on the "Advanced Options" tab. The upper limit is 16.<br>
|
||||
overwrite the number of parallel instances on the "Advanced Options" tab. The upper limit is 16 for now.<br>
|
||||
<br>
|
||||
Finally, note that LameXP only controls the number of instances that will run in parallel, but it does NOT<br>
|
||||
control how many threads an individual instance will create! Some encoders use "built-in" multi-threading and<br>
|
||||
|
@ -30,7 +30,7 @@
|
||||
#define VER_LAMEXP_MINOR_LO 4
|
||||
#define VER_LAMEXP_TYPE Alpha
|
||||
#define VER_LAMEXP_PATCH 4
|
||||
#define VER_LAMEXP_BUILD 792
|
||||
#define VER_LAMEXP_BUILD 793
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Tool versions (minimum expected versions!)
|
||||
|
@ -987,18 +987,18 @@ bool ProcessingDialog::shutdownComputer(void)
|
||||
|
||||
static int cores2instances(int cores)
|
||||
{
|
||||
//This function was approximated as a "cubic spline" with sampling points at:
|
||||
//(1,1); (2,2); (4,4); (8,6); (16,8); (32,10); (64,12)
|
||||
//This function is a "cubic spline" with sampling points at:
|
||||
//(1,1); (2,2); (4,4); (8,6); (16,8); (32,11); (64,16)
|
||||
static const double LUT[8][5] =
|
||||
{
|
||||
{ 1.0, 0.01440972, -0.04322917, 1.02881944, 0.00000000},
|
||||
{ 2.0, -0.02881944, 0.21614583, 0.51006944, 0.34583333},
|
||||
{ 4.0, 0.01017795, -0.25182292, 2.38194444, -2.15000000},
|
||||
{ 8.0, 0.00005425, -0.00885417, 0.43819444, 3.03333333},
|
||||
{16.0, 0.00011122, -0.01158854, 0.48194444, 2.80000000},
|
||||
{32.0, 0.00000949, -0.00182292, 0.16944444, 6.13333333},
|
||||
{64.0, 0.00000000, 0.00000000, 0.00000000, 12.00000000},
|
||||
{DBL_MAX}
|
||||
{ 1.0, 0.014353554, -0.043060662, 1.028707108, 0.000000000},
|
||||
{ 2.0, -0.028707108, 0.215303309, 0.511979167, 0.344485294},
|
||||
{ 4.0, 0.010016468, -0.249379596, 2.370710784, -2.133823529},
|
||||
{ 8.0, 0.000282437, -0.015762868, 0.501776961, 2.850000000},
|
||||
{16.0, 0.000033270, -0.003802849, 0.310416667, 3.870588235},
|
||||
{32.0, 0.000006343, -0.001217831, 0.227696078, 4.752941176},
|
||||
{64.0, 0.000000000, 0.000000000, 0.000000000, 16.000000000},
|
||||
{DBL_MAX, 0.0, 0.0, 0.0, 0.0}
|
||||
};
|
||||
|
||||
double x = abs(static_cast<double>(cores)), y = 1.0;
|
||||
|
Loading…
Reference in New Issue
Block a user