|
|
Log in / Subscribe / Register

Meta: Transparent memory offloading

This Meta blog post by Johannes Weiner and Dan Schatzberg describes a set of memory-management changes used there that they call "transparent memory offloading".

Transparent Memory Offloading (TMO) is Meta’s solution for heterogeneous data center environments. It introduces a new Linux kernel mechanism that measures the lost work due to resource shortage across CPU, memory, and I/O in real time. Guided by this information and without any prior application knowledge, TMO automatically adjusts the amount of memory to offload to a heterogeneous device, such as compressed memory or an SSD.

The article doesn't say where to find the relevant code, not all of which is in the mainline kernel (and some of which runs in user space).


to post comments

Meta: Transparent memory offloading

Posted Jun 20, 2022 22:47 UTC (Mon) by ssmith32 (subscriber, #72404) [Link] (2 responses)

"more fundamental solution entails the kernel managing a hierarchy of offload back ends "

If this means what I think it means, I wonder why they didn't start with this approach?

Up until I got to the end I kept wondering why they didn't just adjust the swap algorithm instead of building another layer that seems to just be second-guessing the original swap algorithm.. and/or tweak the file cache to not cache aggressively on fast storage..

Meta: Transparent memory offloading

Posted Jun 21, 2022 0:36 UTC (Tue) by MattBBaker (guest, #28651) [Link] (1 responses)

It really feels like a large part of the problem is that many of these systems like what Facebook and Google runs are bigger than what a 'mere' single machine kernel can manage. So the local kernel is great at stashing memory on local disks and local compressed memory for local operations, but once you have a large distributed system suddenly the app has better information of the global system state than the local kernel does. Suddenly the app has better information about the working set than the kernel does.

Historically the kernel has been able to ignore local apps since the kernel had more complete information about the state of the system, but once the app runtime has better information about the state of a cluster, the local kernel needs to made to mind the larger picture.

Meta: Transparent memory offloading

Posted Jun 21, 2022 4:02 UTC (Tue) by wahern (subscriber, #37304) [Link]

I've always tended to think it was performance. macOS and Windows automatically grow swap. Perhaps not coincidentally, they've never been known for their speedy VM subsystems. Architecting and optimizing your VM subsystem in a manner that is exceptionally optimistic about memory pressure scenarios, and then assuming that when your expectations fail all bets are off and nobody is allowed to complain when you just start randomly killing processes, has traditionally worked exceptionally well for Linux, especially when it comes to general performance and in niches where Linux has come to dominate. But this approach is a serious buzz kill in some scenarios, especially for large cloud computing nodes with many different apps running (IOW, cases where processes *are* *not* coordinating resource allocation amongst themselves, outside the kernel), and unfortunately these scenarios are becoming difficult to ignore.

I guess another way to put it, perhaps some other OSs are trading away performance for reliability, and the strategy of trading away reliability for performance is finally catching up with Linux.

FaceBook (Meta)

Posted Jun 21, 2022 19:00 UTC (Tue) by Felix_the_Mac (guest, #32242) [Link] (18 responses)

I would suggest that from an editorial standpoint LWN doesn't endorse Facebook's rebranding attempt and refers to them as Facebook (Meta).

I don't believe it is necessary to my position but I will point out that the linked article is on fb.com, is headed by a picture of an Facebook data centre and has a cookie policy in the name of facebook.

FaceBook (Meta)

Posted Jun 22, 2022 2:49 UTC (Wed) by flussence (guest, #85566) [Link] (17 responses)

Yes please, for consistency's sake if nothing else. We don't talk about Alphabet's software...

FaceBook (Meta)

Posted Jun 22, 2022 3:21 UTC (Wed) by jake (editor, #205) [Link] (16 responses)

> We don't talk about Alphabet's software...

because Alphabet doesn't talk about Alphabet's software ... Google blogs still call themselves that ... should that change at some point, so will we ...

we like to use the names that people or organizations choose for themselves ...

jake

FaceBook (Meta)

Posted Jun 22, 2022 13:26 UTC (Wed) by scientes (guest, #83068) [Link]

> we like to use the names that people or organizations choose for themselves ...

How meta of you.

And initially meta just just meant after until it's the famous title "metaphysics" in Aristotle gave it a special meaning.

Perhaps you should still clarify that Meta Inc. runs Facebook, because their overly generic branding of "Messenger" (which they then claim trademark over) is really an afront to the English language.

FaceBook (Meta)

Posted Jun 22, 2022 15:31 UTC (Wed) by ballombe (subscriber, #9523) [Link] (14 responses)

Sorry, but in this instance, they do not: the site name is engineering.fb.com, etc.

At least replace 'meta' by 'meta (the social media company formally known as facebook)' so there is no confusion to the preexisting usages of meta.

We all know the renaming goal is to sow confusion and distract of facebook trouble. LWN role is to reduce confusion, not amplify it.

FaceBook (Meta)

Posted Jun 22, 2022 18:07 UTC (Wed) by rgmoore (✭ supporter ✭, #75) [Link]

Sorry, but in this instance, they do not: the site name is engineering.fb.com, etc.

The website is indeed engineering.fb.com, but the blog calls itself "Engineering at Meta", not "Engineering at Facebook". The post talks about technologies being used at Meta, not technologies used at Facebook. This makes sense, because they are probably using the same technology across their platforms. This is part of the reason they renamed the parent: they're a single big social media company with a bunch of different brands that are making use of a lot of the same technology under the surface. When talking about that technology, it makes more sense to talk about the corporation (Meta) rather than the product (Facebook) because it's not just one product using it.

FaceBook (Meta)

Posted Jun 22, 2022 20:55 UTC (Wed) by klindsay (guest, #7459) [Link] (12 responses)

> We all know ...

If an entity (person, organization, corporation, city, country, etc.) changes their name, it makes sense to me to refer to the entity by the name that they've chosen for themselves. To not do so, based on one's perception of the entity's intent, and how that perceived intent aligns with you own values, seems to me like a recipe for inconsistency and disrespect.

FaceBook (Meta)

Posted Jun 22, 2022 22:02 UTC (Wed) by mpr22 (subscriber, #60784) [Link]

I see no harm in referring to a large for-profit shareholder corporation that has a very prominent and still-active brand identity, and that brand used to be the company name, by that brand for as long as I please.

(And yes, I do distinguish between that class of entity, and the other collective entities on your list.)

FaceBook (Meta)

Posted Jun 24, 2022 10:13 UTC (Fri) by rqosa (subscriber, #24136) [Link] (3 responses)

> To not do so, based on one's perception of the entity's intent, and how that perceived intent aligns with you own values, seems to me like a recipe for inconsistency and disrespect.

"Respect" is something that needs to be earned, though… especially for big corporations. We wouldn't want LWN to just automatically treat people like Darl McBride or Steve Ballmer with (undue) respect when covering news stories such as the SCO vs. IBM lawsuit, right?

And, based on Facebook's actions in recent years, they deserve to be disrespected! (Which is no doubt a reason for the renaming, just like ballombe said in the parent post.)

FaceBook (Meta)

Posted Jun 26, 2022 8:24 UTC (Sun) by tzafrir (subscriber, #11501) [Link] (2 responses)

Which company exactly vs. IBM?

That company was, as we remember well, Caldera Systems (following some renames). Do we let the mere fact that the company was renamed let us call them "SCO" instead of "Caldera"?

FaceBook (Meta)

Posted Jun 26, 2022 11:42 UTC (Sun) by rqosa (subscriber, #24136) [Link] (1 responses)

You're missing the point. The reason why some of us prefer for LWN to continue calling that company "Facebook" is this:

> > > > We all know the renaming goal is to sow confusion and distract of facebook trouble. LWN role is to reduce confusion, not amplify it.

Or to put it another way: Facebook, and Zuckerberg personally, have earned a bad reputation for many reasons (such as this, this, this lawsuit, and requiring people to use their real names). And, possibly as a consequence of those things, Facebook recently had a decrease in their total amount of users for the first time in their history. That has to be a major reason why they've changed their corporate name: the name change is a PR effort intended "to deflect from recent negative attention", i.e. they're trying to dupe the general public into believing that they're somehow not the same bad guys that they used to be. So, when LWN calls them by their new name without mentioning that it's the company that runs Facebook, some LWN readers perceive that as "[endorsement of] Facebook's rebranding attempt" (as Felix_the_Mac said in the original post).

By contrast, the choice of whether to call SCO Group, Inc. "SCO" versus "Caldera" wouldn't have made any significant difference as to whether LWN's news coverage of that lawsuit was casting SCO in a positive light versus a negative light. (Well, except that it did hurt SCO's case to point out that they themselves had distributed the Linux kernel under the terms of the GPL as part of their "Caldera OpenLinux" product and were still doing so at the time of the lawsuit… but that fact was pointed out by news coverage of the lawsuit back then.)

(Also, another reason why it's obnoxious to see Facebook's new corporate name being used by LWN is because "the metaverse" is bullshit.)

FaceBook (Meta)

Posted May 2, 2024 13:25 UTC (Thu) by rqosa (subscriber, #24136) [Link]

> for many reasons (such as this, this, this lawsuit, and requiring people to use their real names)

And one more reason: this antitrust action.

FaceBook (Meta)

Posted Jun 24, 2022 12:38 UTC (Fri) by zdzichu (subscriber, #17118) [Link] (6 responses)

The behavior of not using one's chosen name has a name: https://en.wikipedia.org/wiki/Deadnaming
Doesn't matter if people or corporation, disrespecting name choice is just being a prick.

FaceBook (Meta)

Posted Jun 24, 2022 13:04 UTC (Fri) by harisphnx (subscriber, #139363) [Link]

Deadnaming maybe doesn't fit here, since the change of name is due to "transitioning" (as mentioned in wiki), which is done with a different reason than what Facebook changed its name for.

FaceBook (Meta)

Posted Jun 24, 2022 16:46 UTC (Fri) by mpr22 (subscriber, #60784) [Link] (2 responses)

I am not in any way contributing to the oppression of corporations when I refer to Meta Platforms, Inc., the owners of the Facebook brand, as "Facebook".

FaceBook (Meta)

Posted Jun 24, 2022 21:33 UTC (Fri) by zdzichu (subscriber, #17118) [Link] (1 responses)

They also own Oculus, Snapchat, Whatsapp, Instagram. So why single out Facebook ? It makes no sense.

FaceBook (Meta)

Posted Jun 25, 2022 11:04 UTC (Sat) by mpr22 (subscriber, #60784) [Link]

Short version:

They're still Facebook in all the ways that matter, and they're not a natural person whose liberty, privacy, mental health, and/or life are potentially endangered by being referred to by their previous name, so I see no reason to stop calling them Facebook.

Long version:

Facebook is the founding (and still active) part of the company's business.

Facebook is probably still the company's most prominent brand.

Facebook is the business that allowed the company now calling itself Meta, Inc. to accumulate the enormous pile of money with which they subsequently bought Oculus VR Inc., WhatsApp Inc., and Instagram (not "Inc." because Instagram went straight from "backed by venture capital" to "bought out by Facebook" without an IPO).

Facebook is also the core of the company's customer engagement framework, with the latest Oculus products and services requiring a Facebook account to use.

I should point out, as well, that Facebook does not own Snapchat. Snap, Inc. – the company behind Snapchat – is one of those weird "nominally publicly traded, but practically privately owned" corporations, because the top two entries on the shareholder list, both individuals, hold 48% and 47% of the voting shares respectively, and they were not interested in selling their company to Facebook.

So if I want to file a lawsuit against them, I will call them Meta, Inc., and if I want to talk about some part of their business that has absolutely nothing at all to do with Facebook and I'm feeling particularly effortful, I might deign to call them Meta, and the rest of the time, I will call them Facebook.

FaceBook (Meta)

Posted Jun 26, 2022 6:30 UTC (Sun) by rqosa (subscriber, #24136) [Link]

> Doesn't matter if people or corporation

That's a RIDICULOUS thing to say!

The concept of "corporate personhood" has had bad consequences for society, such as the Citizens United ruling which caused Super PACs to become legal in the US. So you shouldn't be saying things to the effect of "a corporation is entitled to human rights, just like an individual person is" like you did here.

FaceBook (Meta)

Posted Jun 29, 2022 4:24 UTC (Wed) by flussence (guest, #85566) [Link]

That's a false equivalence, and more than a bit disrespectful to people (and organisations) who change name for more honest reasons than corporate reputation laundering and trying to get in on the marketing doublespeak of cryptocurrency nutjobs.

But I'll have to concede jake's explanation above that this article's usage of it is *technically* correct and consistent, and leave it there.

Meta: Transparent memory offloading

Posted Jun 22, 2022 13:45 UTC (Wed) by dschatzberg (subscriber, #130997) [Link]

Hi, I'm an author on this work.

> The article doesn't say where to find the relevant code, not all of which is in the mainline kernel (and some of which runs in user space).

The vast majority of the code (PSI, reclaim improvements) has been upstreamed in the Linux kernel. The only piece which hasn't been (and isn't critical) is the memory.reclaim interface (one can use memory.high instead). We have ongoing discussions about upstreaming memory.reclaim as well: https://lwn.net/Articles/892328/

Our userspace logic (Senpai) is a bit tied to our internal infrastructure, but we've published a reference implementation here: https://github.com/facebookincubator/senpai - it works on upstream kernels.


Copyright © 2022, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds