Cov txheej txheem:

Tus neeg tua neeg OOM yog dab tsi thaum nws khiav thiab nws ua dab tsi?
Tus neeg tua neeg OOM yog dab tsi thaum nws khiav thiab nws ua dab tsi?

Video: Tus neeg tua neeg OOM yog dab tsi thaum nws khiav thiab nws ua dab tsi?

Video: Tus neeg tua neeg OOM yog dab tsi thaum nws khiav thiab nws ua dab tsi?
Video: yog hmoov dab tsi tub huas xyooj 2024, Plaub Hlis Ntuj
Anonim

Cov OOM Killer ua haujlwm los ntawm kev tshuaj xyuas tag nrho khiav txheej txheem thiab muab lawv tus qhab nia phem. Cov txheej txheem uas tau qhab nia siab tshaj yog tus uas raug tua. Cov OOM Killer muab qhov qhab nia phem raws li ntau yam kev ntsuas.

Kuj paub, kuv yuav qhib OOM killer li cas?

oom ua -Tua yog siv rau pab thiab lov tes taw OOM - Killer . Yog koj xav tau pab OOM - Killer runtime, ces siv sysctl hais kom ua pab uas. Lwm tus txoj kev pab los yog lov tes taw yog sau cov panic_on_oom sib txawv, koj tuaj yeem tshawb xyuas tus nqi hauv /proc.

Tsis tas li ntawd, Oom_score yog dab tsi? Lub Linux kernel muab qhab nia rau txhua qhov kev khiav haujlwm hu ua oom_score uas qhia tau hais tias yuav ua li cas thiaj li raug txiav tawm thaum muaj kev nco tsawg. Cov qhab nias yog proportional rau tus nqi ntawm lub cim xeeb siv los ntawm tus txheej txheem. Cov oom_score ntawm tus txheej txheem tuaj yeem pom hauv /proc directory.

Xav txog qhov no, kuv yuav ua li cas lov tes taw OOM killer?

7 Teb

  1. Disable OOM Killer (Muab vm.oom-kill = 0 hauv /etc/sysctl.conf)
  2. Disable memory overcommit (Put vm.overcommit_memory = 2 in /etc/sysctl.conf) Nco ntsoov tias qhov no yog tus nqi trinary: 0 = "kwv yees yog tias peb muaj RAM txaus", 1 = "Hais ib txwm muaj", 2 = "hais tsis tau yog tias peb tsis muaj lub cim xeeb")

Yuav ua li cas thaum Linux khiav tawm ntawm lub cim xeeb?

Thaum lub operating system yog tawm ntawm RAM thiab tsis muaj kev sib pauv, nws pov tseg cov nplooj ntawv huv. Tsis muaj kev sib pauv, qhov system yuav khiav tawm ntawm virtual nco (hais lus nruj me ntsis, RAM + sib pauv) sai li sai tau thaum nws tsis muaj nplooj ntawv huv ntxiv kom tshem tawm. Ces nws yuav tau tua cov txheej txheem. Khiav tawm ntawm RAM yog kiag li qub.

Pom zoo: