[Rpm-maint] [rpm-software-management/rpm] Consider available memory and address space for parallel execution (PR #2418)
Panu Matilainen
notifications at github.com
Fri Mar 24 09:11:19 UTC 2023
@pmatilai commented on this pull request.
> + long int pagesize = sysconf(_SC_PAGESIZE);
+ long int pages = sysconf(_SC_PHYS_PAGES);
+
+ if (pagesize < 0)
+ pagesize = 4096;
+ if (pages > 0)
+ mem = pages * pagesize;
+
+ return mem;
+}
+
+static unsigned long getmem_proc(int thread)
+{
+ unsigned long mem = getmem_total();
+ /*
+ * Conservative estimates for thread use on 32bit systems where address
The total 32bit address space is 4GB. On a native 32bit Linux system, the kernel eats 1GB out of that, leaving 3GB for the process. On a 64bit system a 32bit process has nearly all of the 4GB available to it. While running out of physical memory can be handled by virtual memory (aka swap), the address space is a hard limit and rpm can't handle running into it. Which is why the estimates are very conservative.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2418#discussion_r1147296184
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/2418/review/1356269067 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230324/65c4bd25/attachment.html>
More information about the Rpm-maint
mailing list