Why does swapon invokes oom-killer when enabling large chunk of swap area?

Solution Verified - Updated -

Issue

  • Why does swapon invokes oom-killer when enabling large chunk of swap area?
kernel: swapon invoked oom-killer: gfp_mask=0x80d0, order=0, oom_score_adj=0
  • Swapon throws error couldn't allocate enough memory for swap_cgroup.
kernel: couldn't allocate enough memory for swap_cgroup.
kernel: swap_cgroup can be disabled by swapaccount=0 boot option
  • Swapon command fails when enabilng 6TiB of swap on a server with 4G of RAM as part of testing.

Environment

  • RHEL

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content