]> git.ipfire.org Git - ipfire-3.x.git/blob - pakfire/patches/0001-A-new-try-to-get-the-parallelism-straight.patch
aa22e19446bbe60ffd48c868a9ef033be5d85d54
[ipfire-3.x.git] / pakfire / patches / 0001-A-new-try-to-get-the-parallelism-straight.patch
1 From 369ac3b365091ba1a26fb266a94d97adb3719cbc Mon Sep 17 00:00:00 2001
2 From: Michael Tremer <michael.tremer@ipfire.org>
3 Date: Thu, 24 Jan 2013 01:51:29 +0100
4 Subject: [PATCH 01/17] A new try to get the parallelism straight.
5
6 Getting back to CPU cores * 2.
7 ---
8 python/pakfire/system.py | 7 +------
9 1 file changed, 1 insertion(+), 6 deletions(-)
10
11 diff --git a/python/pakfire/system.py b/python/pakfire/system.py
12 index a9154de..6f67d31 100644
13 --- a/python/pakfire/system.py
14 +++ b/python/pakfire/system.py
15 @@ -156,15 +156,10 @@ class System(object):
16 Calculates how many processes should be run
17 simulatneously when compiling.
18 """
19 - # Check how many processes would fit into the
20 - # memory when each process takes up to 500MB.
21 - multiplicator = self.memory / (500 * 1024 * 1024)
22 - multiplicator = round(multiplicator)
23 -
24 # Count the number of online CPU cores.
25 cpucount = os.sysconf("SC_NPROCESSORS_CONF")
26
27 - return min(multiplicator, cpucount * 2)
28 + return cpucount * 2
29
30
31 # Create an instance of this class to only keep it once in memory.
32 --
33 1.8.1.2
34