Out-of-Memory (OOM) or Excessive Memory Usage

https://www.osc.edu/documentation/knowledge_base/out_of_memory_oom_or_excessive_memory_usage
Problem description
A common problem on our systems is that a user's job causes a node out of memory or uses more than its allocated memory if the node is shared with other jobs.

If a job exhausts both the physical memory and the swap space on a node, it causes the node to crash. With a parallel job, there may be many nodes that crash. When a node crashes, the OSC staff has to manually reboot and clean up the node. If other jobs were running on the same node, the users have to be notified that their jobs failed.

If your job requests less than a full node, for example, --ntasks-per-node=4, it may be scheduled on a node with other running jobs. In this case, your job is entitled to a memory allocation proportional to the number of cores requested. For example, if a system has 4.5 GB per core and you request one core, it is your responsibility to make sure your job uses no more than 4.5 GB. Otherwise your job will interfere with the execution of other jobs.

Example errors

OOM in a parallel program launched through srun

slurmstepd: error: Detected 1 oom-kill event(s) in StepId=14604003.0 cgroup. Some of your processes may have been killed by the cgroup out-of-memory handler.

srun: error: o0616: task 0: Out Of Memory

OOM in program run directly by the batch script of a job

slurmstepd: error: Detected 1 oom-kill event(s) in StepId=14604003.batch cgroup. Some of your processes may have been killed by the cgroup out-of-memory handler.

Suggested solutions

Here are some suggestions for fixing jobs that use too much memory. Feel free to contact OSC Helpfor assistance with any of these options.

Some of these remedies involve requesting more processors (cores) for your job. As a general rule, we require you to request a number of processors proportional to the amount of memory you require. You need to think in terms of using some fraction of a node rather than treating processors and memory separately. If some of the processors remain idle, that’s not a problem. Memory is just as valuable a resource as processors.

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌医增,老刑警劉巖佣蓉,帶你破解...
    沈念sama閱讀 206,839評論 6 482
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件坤候,死亡現(xiàn)場離奇詭異吨拗,居然都是意外死亡箕慧,警方通過查閱死者的電腦和手機(jī)检柬,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,543評論 2 382
  • 文/潘曉璐 我一進(jìn)店門献联,熙熙樓的掌柜王于貴愁眉苦臉地迎上來竖配,“玉大人,你說我怎么就攤上這事里逆〗瑁” “怎么了?”我有些...
    開封第一講書人閱讀 153,116評論 0 344
  • 文/不壞的土叔 我叫張陵原押,是天一觀的道長胁镐。 經(jīng)常有香客問我,道長诸衔,這世上最難降的妖魔是什么盯漂? 我笑而不...
    開封第一講書人閱讀 55,371評論 1 279
  • 正文 為了忘掉前任,我火速辦了婚禮笨农,結(jié)果婚禮上就缆,老公的妹妹穿的比我還像新娘。我一直安慰自己谒亦,他們只是感情好竭宰,可當(dāng)我...
    茶點(diǎn)故事閱讀 64,384評論 5 374
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著份招,像睡著了一般切揭。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上锁摔,一...
    開封第一講書人閱讀 49,111評論 1 285
  • 那天廓旬,我揣著相機(jī)與錄音,去河邊找鬼谐腰。 笑死嗤谚,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的怔蚌。 我是一名探鬼主播,決...
    沈念sama閱讀 38,416評論 3 400
  • 文/蒼蘭香墨 我猛地睜開眼旁赊,長吁一口氣:“原來是場噩夢啊……” “哼桦踊!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起终畅,我...
    開封第一講書人閱讀 37,053評論 0 259
  • 序言:老撾萬榮一對情侶失蹤籍胯,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后离福,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體杖狼,經(jīng)...
    沈念sama閱讀 43,558評論 1 300
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 36,007評論 2 325
  • 正文 我和宋清朗相戀三年妖爷,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了蝶涩。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 38,117評論 1 334
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖绿聘,靈堂內(nèi)的尸體忽然破棺而出嗽上,到底是詐尸還是另有隱情,我是刑警寧澤熄攘,帶...
    沈念sama閱讀 33,756評論 4 324
  • 正文 年R本政府宣布兽愤,位于F島的核電站,受9級特大地震影響挪圾,放射性物質(zhì)發(fā)生泄漏浅萧。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,324評論 3 307
  • 文/蒙蒙 一哲思、第九天 我趴在偏房一處隱蔽的房頂上張望洼畅。 院中可真熱鬧,春花似錦也殖、人聲如沸土思。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,315評論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽己儒。三九已至,卻和暖如春捆毫,著一層夾襖步出監(jiān)牢的瞬間闪湾,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 31,539評論 1 262
  • 我被黑心中介騙來泰國打工绩卤, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留途样,地道東北人。 一個(gè)月前我還...
    沈念sama閱讀 45,578評論 2 355
  • 正文 我出身青樓濒憋,卻偏偏與公主長得像何暇,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個(gè)殘疾皇子凛驮,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 42,877評論 2 345

推薦閱讀更多精彩內(nèi)容