On 24/05/16 11:26, Eike Rathke wrote:
Hi YuGiOhJCJ,
On Thursday, 2016-05-19 17:26:21 +0200, YuGiOhJCJ Mailing-List wrote:
Dumb question: how much system memory is available?
I have 4GB of memory:
That certainly is not enough and it will either grind your machine to
heavily swap, or break the build / abort things if no swap is available.
$ free -m
total used free shared buffers cached
Mem: 3995 559 3436 0 53 330
-/+ buffers/cache: 175 3819
Swap: 956 0 956
And why are you building under /tmp/ and how much free disk space is
there?
Well, I could do it in /home but as it is a NFS share, it is slower than in /tmp
Ok, but as Linoel already said, using /var/tmp/ might be a better
choice. Also, if disk space is limited under /tmp/ then building there
may conflict with temporary files the compiler and linker create, which
can become quite large.
Bear in mind, the LFS says that /tmp and /var/tmp behave differently. On
a "correctly" configured system, the contents of /tmp are NOT guaranteed
to survive a system crash. Which is why /tmp is often configured as a
tmpfs. On the other hand, the contents of /var/tmp ARE guaranteed to
survive, which is why vi and emacs and that sort of program all store
their replay logs there ...
and which is why the OP's choice of /tmp was probably correct :-)
although most distros don't seem to make the /tmp directory overly
large. (They also seem not to allocate much swap space.)
Do you think I don't have enough memory?
Is there a way to require less memory while building libreoffice or should I buy more memory?
Buy memory ;-) at least 8GB are needed, but when building with debug
and symbols even that might result in swapping if you forgot to quit
a previous gdb session before linking Calc for example.. 12GB or having
a larger swap than just 1GB is recommended.
My rule of thumb is simple. Disk space is cheap, I allocate twice
maximum ram per disk. In other words, my desktop is maxed out at 16Gb so
the two disks each have a 32Gb swap partition. My laptop maxes out at
8Gb so there should be a 16Gb swap partition on the drive (actually it's
32Gb :-)
The reason for that is - in the old days everybody said "swap should be
twice memory" which was thought to be an old wives' tale. Then kernel
2.4 came out, and it turned out (1) that this requirement was actually
part of the swap algorithm, and (2) the optimisations and hacks and
whatever that enabled smaller swaps were a heap of old crufty rubbish.
Linus ripped out all the hacks and vanilla 2.4 kernels started crashing
everywhere they had a swapspace of less than twice ram.
Obviously, new optimisations have gone in, presumably much better than
before, but nowhere have I found any reference to whether the
fundamental algorithm has been replaced. So I'm assuming it hasn't, and
allocate at least twice ram to ensure I get top performance.
Which means my fstab contains the following line
tmp /tmp tmpfs size=10G,mode=0777 0 0
and you'll notice the size=10G parameter, giving me a 10Gb /tmp directory.
(I run gentoo, so /var/tmp/portage is also a tmpfs, and that's declared
at 30Gb!)
Cheers,
Wol
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.