Ivo vanokurudzira mutsva wekurangarira mutongi weLinux kernel

Linux Kernel

Yeyemaneja manejimendi iset subset yeiyo system inoshanda Iyo inogovera ndangariro pakati peanoshanda system uye akasiyana maficha. Izwi rekuti memory rinonyanya kureva main memory (RAM), asi manejimendi aro anoda mupiro wekubatsira ndangariro uye cache memory.

Ndangariro memory inonyanya kukoshesa kugovera zvakanaka ndangariro kuzvirongwa, zvinoreva kuti iwe unofanirwa kuverengera nzvimbo dzemahara dzechirangaridzo chiripo, govera ndangariro dzinodiwa pamaitiro matsva, uye kudzorera ndangariro kubva kuzvinhu zvinogumisa. Iyo process dispatcher mukati meLinux kernel ndiyo SLAB mutumwa.

SLAB inovimba neyakavharirwa uye cache system iyo inogonesa ndangariro zvikumbiro. Rudzi urwu rweyeuchidzo manejimendi inoderedza kupatsanurwa kunokonzerwa nekugovana uye kutamisa mashandiro

Chigadziro chemabhureki chinosanganisira kuitisa cache yechimwe chinhu rudzi / saizi iyo ine akati wandei akafanogovaniswa ndangariro mabhureki akachekwa kuita akagadzika-saizi zvidimbu izvo zvinokodzera kune chaiwo zvinhu.

SLAB inogadzirisa zvidimbu kuti kana kernel ikumbirwa kugovera ndangariro kuchinhu, Iwe unogona kugutsa chikumbiro icho nechikamu chekusiya kubva kune iripo block. SLAB inochengeta ndangariro dzakagoverwa kuti dzishandiswazve, padzinogovaniswa zvinotevera zvezvinhu zvakafanana, uye nekudaro inoderedza iyo yepamusoro misoro ine chekuita nekutangisa kwechinhu.

Ivo vanofunga kutsiva SLAB

Roman Gushchin, Nhengo yeLinux kernel engineering timu paFacebook, akawana izvo zvaanoona se "chakakomba chakakomba" mune yazvino memory maneja / mutongi. Uye rmunguva pfupi yapfuura yakatsanangudza new memory controller bhuroka iyo inovimbisa kuvandudza zvakanyanya ndangariro mashandisiro pakati peakawanda "mapoka" (kana kudzora mapoka) kubva mundangariro.

Tichifunga izvi, zvakakosha kuti uzive kuti makgroup anoreva chimwe chinhu cheLinux kernel iyo inobvumidza kudzikamisa, kuverenga uye kupatsanura kushandiswa kwesisitimu zviwanikwa (processor, ndangariro, dhisiki kushandiswa, nezvimwewo) uye izwi rekuti "peji yesadhi» inogona kuenderana neyekugovana ndangariro maitiro neSLAB.

Zvinoenderana naGushchin:

“Chikonzero chaicho dhizaini iriko inotungamira mukushandisa kwakaderera kweSLAB iri nyore: Mashizha eSlab anoshandiswa chete nedziva rimwe chete rekurangarira.

Kana paine zvikamu zvishoma chete zveimwe saizi yakaitwa nekgroup kana kana paine zvimwe zvinhu zvinoshanda zvakasara mushure mekunge boka racho rabviswa kana kana iro boka riine chishandiso chimwe chakamisikidzwa icho chinogovanisa zvisina kana tsanga, asi zvinodaro nguva dzese CPU nyowani: Muzviitiko zvese izvi, iko kunogadziriswa kweSLAB kwakaderera kwazvo.

Kana kmem kuverenga kukamhina, iyo kernel inogona kushandisa yemahara nzvimbo pane mataira mapeji ezvimwe zvikamu «.

Gushchin anoti izvi zvaisave dambudziko kana mutyairi wemakmem akaunzwa sechinhu chakasarudzika chaifanira kupihwa padziva rega rega rekurangarira.

Zvino zvakadaro, iyo kmem mutyairi inogoneswa nekusarudzika kwekgroup v1 uye v2. Uye sezvo masisitimu emazuva ano anowanzo gadzira nhamba hombe yemapoka c, kushandisa SLAB haina basa.

Sekureva kwake, nekugovana iwo slab mapeji pakati akasiyana siyana ndangariro mapoka uye nekushandisa reworked system uko accounting kunoitwa nechinhu kwete nepeji, mumwe aizove mu linux kernel yakagadziridzwa ndangariro controller iyo inopa yakanyanya kushanda danho rekushandisa.

Iyo chigamba chakarongedzerwa naGushchin chine zvinhu zviviri zvakazvimiririra: subpage mutoro API iyo inogona kushandiswa mune ramangwana rezvinangwa zve accounting uye mem_cgroup_ptr API.

Kuyedzwa kwakaitwa nemutongi mutsva ndangariro yaGushchin varatidza kuti zvinokwanisika kuwana pakati pe35% uye 42% imwe ndangariro muLinux pane yekumberi-yekupedzisira webhu, dhatabhesi cache uye DNS server, uye mamwe akawanda mabasa.

Chikumbiro chaGushchin parizvino chiri pasi pechiratidzo che "chikumbiro chekutaura." Kana ichigamuchirwa, inogona kusanganisirwa mu 2020 Linux kernel vhezheni.

mabviro: https://lkml.org/


Izvo zviri muchinyorwa zvinoomerera pamisimboti yedu ye tsika dzekunyora. Kuti utaure chikanganiso tinya pano.

Iva wekutanga kutaura

Siya yako yekutaura

Your kero e havazobvumirwi ichibudiswa. Raida minda anozivikanwa ne *

*

*

  1. Inotarisira data: AB Internet Networks 2008 SL
  2. Chinangwa cheiyo data: Kudzora SPAM, manejimendi manejimendi.
  3. Legitimation: Kubvuma kwako
  4. Kutaurirana kwedata
  5. Dhata yekuchengetedza: Dhatabhesi inobatwa neOccentus Networks (EU)
  6. Kodzero: Panguva ipi neipi iwe unogona kudzora, kupora uye kudzima ruzivo rwako