CRUX

Welcome to CRUX bug tracking.
Tasklist

FS#1807 - pkgmk use a tmpfs for work directory

Attached to Project: CRUX
Opened by Christophe Gottheimer (cgh) - Thursday, 21 May 2020, 11:24 GMT
Last edited by Fredrik Rinnestam (frinnst) - Saturday, 23 May 2020, 10:53 GMT
Task Type Improvement
Category tools → pkgutils
Status Closed
Assigned To No-one
Operating System CRUX
Severity Low
Priority Normal
Reported Version 3.5
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

On machines with SSD and huge amount of memory (>32GB), I propose that work is "mounted" as a tmpfs (mount -t tmpfs) in the way to increase the build speed but also to prevent SSD write operations.

I submit the attached patch (pkgutils-5.40.7-tmpfs.patch) for pkgutils version 5.40.7. Currently, the limit of the work directory mounted as tmpfs is 50% of the RAM.

Kind regards,

Christophe
This task depends upon

Closed by  Fredrik Rinnestam (frinnst)
Saturday, 23 May 2020, 10:53 GMT
Reason for closing:  Won't fix
Comment by Fredrik Rinnestam (frinnst) - Thursday, 21 May 2020, 15:40 GMT
the size of a tmpfs mount is dependent on the ram so it's not a "fit all" solution. It's also very easy for the user to configure where the build should take place:

pkgmk.conf:
PKGMK_WORK_DIR="/tmp/$name-$version-$release-work"

that's on my system with 64GB of ram. On other systems with less ram (512, 1gb etc) that's obviously not appropriate.

With modern SSDs it's not really an issue either.
Comment by Fredrik Rinnestam (frinnst) - Thursday, 21 May 2020, 20:33 GMT
Maybe I closed this task a bit too early. I finally noticed that your patch had an entry in pkgmk.conf to enable this.

Still don't really agree with it :-). Crux users are somewhat expected to do this kind of stuff on their own.

Change my mind! :)
Comment by Juergen Daubert (jue) - Friday, 22 May 2020, 09:16 GMT
I have a similar entry for PKGMK_WORK_DIR in my pkgmk.conf. Don't think that we need more as we have.
Comment by Christophe Gottheimer (cgh) - Friday, 22 May 2020, 14:44 GMT
I agree to close this issue.
Finally, I have added the following fstab entry: tmp /usr/ports/build tmpfs ... and I have set the PKGMK_WORK_DIR variable to /usr/ports/build/work-$name-$version-$release. It works nice. I just need to avoid /tmp that is size limited.

Loading...