]> git.ipfire.org Git - ipfire-3.x.git/blame - pakfire/patches/0001-A-new-try-to-get-the-parallelism-straight.patch
Merge remote-tracking branch 'stevee/file-update'
[ipfire-3.x.git] / pakfire / patches / 0001-A-new-try-to-get-the-parallelism-straight.patch
CommitLineData
6ef17b23
MT
1From 369ac3b365091ba1a26fb266a94d97adb3719cbc Mon Sep 17 00:00:00 2001
2From: Michael Tremer <michael.tremer@ipfire.org>
3Date: Thu, 24 Jan 2013 01:51:29 +0100
91d1c8a9 4Subject: [PATCH 01/17] A new try to get the parallelism straight.
6ef17b23
MT
5
6Getting back to CPU cores * 2.
7---
8 python/pakfire/system.py | 7 +------
9 1 file changed, 1 insertion(+), 6 deletions(-)
10
11diff --git a/python/pakfire/system.py b/python/pakfire/system.py
12index 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--
91d1c8a9 331.8.1.2
6ef17b23 34