From dbf525a90a096931551274f3e2fce49e00d0bf72 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Wed, 24 Jul 2019 14:38:29 +0100 Subject: Temporary software building done in shared memory if available Until now, the template would unpack the software and build them directly in the build directory of each project. After installation, the whole unpacked directory is deleted. However, building the software involves the reading and writing of millions of files, so on the long run, it can be bad for the non-volatile memory (HDDs or SSDs), it can also be slightly slow. To fix this, if the system has a shared-memory directory (commonly named `/dev/shm'), we can do the temporary building of the software there. The great thing about this unique directory is that it is actually in the RAM, not on the HDD/SSD. This can slightly improve the speed (not much probably), but more importantly it will not do any long-term harm to the host's HDDs/SSDs. With this commit, when there is a shared memory directory mounted in `/dev/shm', and it has enough space (currently set to 2GB), the `./configure' script will make `.build/software/build-tmp' as a symbolic link to a fixed directory there. Otherwise, it will just build it as a directory in the project's shared directory. The structure has been defined in such a way that we can later easily add different standard shared-memory locations (for different operating systems). This completes task #15336. --- .file-metadata | Bin 6179 -> 6106 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to '.file-metadata') diff --git a/.file-metadata b/.file-metadata index c5db26b..b74b9e0 100644 Binary files a/.file-metadata and b/.file-metadata differ -- cgit v1.2.1