1 |
On Tuesday 27 Dec 2016 07:13:36 J. Roeleveld wrote: |
2 |
> On Monday, December 26, 2016 09:45:47 PM Francesco Turco wrote: |
3 |
> > Hello. |
4 |
> > |
5 |
> > I have a Vultr VPS instance with Arch Linux but I'd like to replace it |
6 |
> > with Gentoo Linux. The last time I tried that I couldn't build some |
7 |
> > packages because the kernel killed gcc after a while. Please notice this |
8 |
> > VPS instance has only 768 MiB of RAM. What can I try besides removing |
9 |
> > -pipe from C(XX)FLAGS and setting MAKEOPTS to -j1? Should I add a swap |
10 |
> > partition? Currently there's only a single root btrfs filesystem with @, |
11 |
> > @boot and @home subvolumes. Btrfs doesn't support a swap file as far as |
12 |
> > I know. |
13 |
> > |
14 |
> > My VPS is currently used for the following things: |
15 |
> > - Static personal website |
16 |
> > - Shaarli (PHP application with no database) |
17 |
> > - Tiny Tiny RSS (PHP application with database) |
18 |
> > - ZNC server |
19 |
> > |
20 |
> > Thanks. |
21 |
> |
22 |
> You could try building all packages on your own system and then installing |
23 |
> using "-k". |
24 |
> That should avoid any out-of-memory issues. |
25 |
> |
26 |
> -- |
27 |
> Joost |
28 |
|
29 |
Many packages require a lot of memory these days to compile, gcc being one of |
30 |
them. With only 768 MiB of RAM you will *definitely* need a swap |
31 |
file/partition. In addition, with so little memory you won't be able to |
32 |
compile packages in tmpfs. Thrashing of your disks will go off scale as the |
33 |
machine will try to swap memory to disk and back again. |
34 |
|
35 |
For these reasons what Joost suggests is the best way. You could try to share |
36 |
/usr/portage via NFS, but since this is a remote server I am not sure the |
37 |
security model will be adequate for most use cases. It would be easier to |
38 |
copy your VPS filesystem over to your local machine which is not resouce |
39 |
constrained, chroot into it and then sync portage and emerge everything you |
40 |
need with --buildpckg. Then copy over the binary packages to the VPS and |
41 |
emerge them there with --usepkg or --usepkgonly. If you are disk space |
42 |
constrained on the server, you don't have to copy over the binary packages |
43 |
manually each time. Instead you can set up your home PC as a binary host and |
44 |
serve the binary packages over ssh or over http/s to the VPS client. |
45 |
|
46 |
Essentially, you will be creating your own bespoke binary distribution on your |
47 |
home PC, then downloading it and installing it at your VPS. Have a look here |
48 |
for some pointers: |
49 |
|
50 |
https://wiki.gentoo.org/wiki/Binary_package_guide |
51 |
|
52 |
-- |
53 |
Regards, |
54 |
Mick |