HomeReviewsA new memory controller for Linux will save up to 42% RAM

A new memory controller for Linux will save up to 42% RAM

controller

An engineer on Facebook 's Linux team , Roman Gushchin, has discovered a "serious flaw" in the way the current memory controller in the Linux kernel works. According to him, the current kernel design causes low Slab usage and the reason behind this is that Slab pages are only used by a single memory cgroup (control group).

For those who don't know, Slab allocation in the case of the Linux kernel refers to a memory management system that allocates memory to different kernel objects. Slab allocation is an efficient memory management system that has the primary job of creating Slab caches. A Slab cache is a list of linked slabs, with each Slab representing a set of objects. Additionally, cgroup, or control group, is a feature of the Linux kernel that organizes processes in a hierarchical manner.

What is the defect?

According to Gushchin, “If there are only a few allocations of a given size made by a cgroup, or if some active objects (e.g. dentries) remain after the cgroup is deleted, or the cgroup contains a single single-threaded application, which allocates a few kernel objects and does so each time on a new CPU: in all these cases the resulting Slab usage is very low.”

He also adds that if kernel memory accounting is disabled, the kernel could use the free space in Slab pages for process allocation.

Gushchin says that the kmem controller was originally introduced as an optional feature that had to be enabled individually for each memory cgroup. Now the feature is enabled by default, which prevents the use of Slab.

The new memory controller proposed by Gushchin

Gushchin's new proposal improves memory usage by allocating Slab pages. Furthermore, the developer adds that in his new system, accounting is performed per object, instead of per page.

You can see Gushchin's proposed new memory controller here.

If all goes well, the proposed memory controller will be included in the Linux in 2020.

📧
Subscribe to the SecNews Newsletter

The most important Security & Technology news in your Inbox.

Absentee Mia
Absentee Miahttps://www.secnews.gr
Being your self, in a world that constantly tries to change you, is your greatest achievement

SEARCH

FOLLOW US

📧
Newsletter SecNews
The most important Security & Technology news in your inbox.

LIVE NEWS