On 29/05/16 09:21, YuGiOhJCJ Mailing-List wrote: > On Sun, 29 May 2016 01:35:47 +0100 > Wols Lists <antli...@youngman.org.uk> wrote: > >> 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 > > In my /etc/fstab file I got this line on Slackware 14.1: > $ grep "tmp" /etc/fstab > tmpfs /dev/shm tmpfs defaults 0 0 > It is a bit different than your line in /etc/fstab but I don't know if that > matters. > > OK, so I see three things I can do in this order: > 1) Try to build libre office in an other directory than /tmp (because it is a > tmpfs) and /home (because it is an NFS share)
With no size option, /tmp will default to half of ram. I would just add the "size" option, so change the fourth parameter to "size=10G,defaults", and you'll have a 10gig /tmp. MAKE SURE that ram+swap is bigger, or a "/tmp is full" will crash your machine! > 2) Try to increase the size of my swap partition (as I have 4GB of RAM, I > need a swap space of 8GB instead of 1GB) If you've not got any free space on your local disk, you could always add a swap file instead of a partition, but if you follow my suggestion of a 10Gb /tmp, you need to add at least four more gig of ram or swap. > 3) Try to buy more RAM in order to get 8GB instead of 4GB > YES. I don't know what ram your machine takes, but DDR3 is about GBP15 for a 4Gb stick at the moment. If your machine will take more, go for it... Oh - and as with most things linux, it'll only use the huge /tmp space if it needs it, so you can "set and forget" and you'll have all your ram for normal use unless the /tmp steals it ... Cheers, Wol _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice