1 |
On 2022-09-17 17:37+0800 johnstrass <johnstrass@×××.com> wrote: |
2 |
|
3 |
> At 2022-09-17 14:15:51, "Walter Dnes" <waltdnes@××××××××.org> wrote: |
4 |
> |
5 |
> >On Sat, Sep 17, 2022 at 10:40:53AM +0800, johnstrass wrote |
6 |
> > |
7 |
> >> Compiling gcc uses alot of memory, sometimes only less then 10MB |
8 |
> >> left free ( I am doing this on a small yeeloong netbook with only |
9 |
> >> 1GB memory). |
10 |
> > |
11 |
> > Ouch, I'm surprised it compiles at all. The Gentoo install |
12 |
> > handbook |
13 |
> >https://wiki.gentoo.org/wiki/Handbook:AMD64/Full/Installation#MAKEOPTS |
14 |
> >has a dire warning about memory usage... |
15 |
> |
16 |
> > |
17 |
> |
18 |
> |
19 |
> |
20 |
> Yep, I've got the gcc-12.2.0 natively compiled on this netbook using |
21 |
> gcc-11.3.0, after 5+ days + a crash + 5more days. |
22 |
> |
23 |
> I set up a large swap and I've also set up the ccache which may |
24 |
> speedup a little after the crash. |
25 |
> |
26 |
> |
27 |
> >> Warning |
28 |
> >> Using a large number of jobs can significantly impact memory |
29 |
> >> consumption. A good recommendation is to have at least 2 GiB of RAM |
30 |
> >> for every job specified (so, e.g. -j6 requires at least 12 GiB). To |
31 |
> >> avoid running out of memory, lower the number of jobs to fit the |
32 |
> >> available memory. |
33 |
> > |
34 |
> > You simply don't have enough ram. You might reduce the pain and |
35 |
> > the |
36 |
> >swapping by trying something like the following in make.conf |
37 |
> >(assuming you haven't already done it) |
38 |
> > |
39 |
> |
40 |
> >MAKEOPTS="-j1" |
41 |
> |
42 |
> |
43 |
> I will try next time. Thanks. |
44 |
> |
45 |
> |
46 |
> > |
47 |
> >> If this happens, what is the best way to reboot or shutdown? |
48 |
> > |
49 |
> |
50 |
> > Try ye olde {CTRL}{ALT}{DEL} |
51 |
> |
52 |
> |
53 |
> |
54 |
> |
55 |
> I remember that I did try "CTRL+ALT+DEL" in such situations before, |
56 |
> and most times it did not work but for one or two times it worked |
57 |
> occasionally. I will try it again next time. |
58 |
|
59 |
You could also use “Magic SysRQ”s[1] to reboot the system forcefully |
60 |
but somewhat controlled. The traditional sequence is: |
61 |
r e i s u b (raising elephants is so utterly boring)[2] |
62 |
|
63 |
[1] <https://wiki.gentoo.org/wiki/Magic_SysRQ> |
64 |
[2] <https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html#what-are-the-command-keys> |