How Facebook Engineers Plan To Make Your Experience Faster And More Efficient In 2018

Moore’s Law is slowing down, so engineers have to find ways to get more efficiency out of software instead of just waiting for ever-more powerful hardware.

How Facebook Engineers Plan To Make Your Experience Faster And More Efficient In 2018
[Illustrations: ViewPixel/iStock; Jackie2k/iStock]

Facebook has more than 2 billion users, 1.37 billion of whom use it every day. Delivering the photos, videos, messages, and other content to that giant audience requires a monumental amount of computing power. And that’s why the common thread across the company’s engineering goals in 2018 is finding new efficiencies and utilizing software to reduce the cost of that computing.


In an exclusive interview with Fast Company, Facebook vice president of engineering David Mortenson laid out the broad themes that are expected to underpin the company’s engineering work next year.

To start, Facebook, like any technology company, has to grapple with the reality that Moore’s Law is slowing down. In the past, Mortenson explains, companies could depend on the hardware advantages of Moore’s Law to overcome the increasing demands of more and more powerful software. But not anymore, he argues.

That means Facebook is having to find new ways to adapt its software to run more and more efficiently on its hardware. And that begins, Mortenson says, with finding persistent, high-endurance memory, and reducing the amount of power-hungry memory on servers. Since CPUs are no longer going to be getting faster and more powerful at the rate they used to, that means such methods are the best way to take advantage of existing hardware, he says.

And in order to have more efficient data centers using less power as they handle computing at massive scale, it’ll be required to engineer storage partitioned across numerous compute nodes, rather than being tied to dedicated compute nodes. That will allow the most efficient use of storage, he says.

More Real-Time

Another theme for 2018 is enabling Facebook’s infrastructure to support real-time across the company’s services, and not just for things like Live video.


The idea, Mortenson explains, is to make it easier for engineers to make their product real-time and not have to write code specifically for that purpose.

For example, he says, imagine one of your Facebook friends launches a donation campaign. Today, Facebook’s clients–its mobile or desktop apps–are forced to ask its servers if there’s new content you want to see or that you should be shown. it’s a pull system, meaning your app must continually ping the servers looking for new content.

Instead, by pushing you content–like the donation campaign–that Facebook thinks you’ll want to see, you’ll see it sooner, and that will end up costing less in compute power.

Applying Machine Learning Across All Areas

One of the advantages Facebook engineers have when working on new products or services is that they can often re-use bits of code written for other projects, and pull that code from a massive repository. But sometimes, Mortenson says, the appropriate pieces of code can be hard to find.

So he’s hoping to utilize machine learning for semantic searches to make it easier for engineers to find the exact code they need without knowing precisely what they’re looking for.


Another area where he hopes machine learning will come in handy is in choosing the proper engineering tests required to expose problems in code.

For example, Mortenson says, if an engineer is making a minor change to code that handles how donations work—perhaps just making a donate button slightly different–it’s important to make sure that implementing that change doesn’t break anything else. In order to do that, the engineer would run tests to be sure all is well. By applying machine learning, he says, it should be easier to find the right tests to run.

This would allow engineers to more quickly iterate new products, and fix ones they’re working on. And that means shipping faster.

Plus, Mortenson says, utilizing machine learning to more quickly find the proper code lowers overhead and makes engineers more productive across the board. To illustrate that, he explained that Facebook tracks the amount of time its engineers have to wait for their changes to be committed to the code base–something that was particularly notable for engineers working on Facebook’s Android app. Over the last year, Facebook was able to reduce the time engineers spent waiting by 75% thanks to a variety of tactics. Now, it hopes machine learning will help it reduce that number even further.

Predicting The Demand For Fresh Content

Obviously, many Facebook users spend a lot of time on the service, and are frequently looking for fresh content. But it turns out there are times when they are most likely to want that content. So the company is working to be able to predict that timing more accurately, which would be yet another way the company thinks it can lower its computing overhead.


“If we can predict that efficiently,” Mortenson says, “and have [content] ready, especially if you come online when most other people come online, the system [can be] geared for peak demand…we can reduce the overall cost of infrastructure and do it with less power.”

He says that despite Facebook’s global user base, the most common usage time is in the morning Pacific time. By knowing when people are most likely to want content, the systems could get it ready, and “we can push it down to you much more efficiently.”

Mortenson points to the massive scale of the problem. Even a single post that includes a couple of photos and some reactions adds up to about a thousand objects in the company’s social graph database, he says. The challenge is keeping that post up to date when it’s cached. Expand that number to the billions of posts Facebook handles daily, and you see the scope of the engineering challenge.

One solution to this is to tweak the programming languages Facebook uses to do a better job at tracking the objects that change in users’ posts in order to minimize the computing power necessary to keep those posts up to date. There’s no need to recompute every element of a post if only one thing changes, he says.

And asked to quantify the benefits of tweaking the programming languages Facebook uses, Mortenson says “we certainly would not think a new language would be effective if it’s not five times more efficient.”

About the author

Daniel Terdiman is a San Francisco-based technology journalist with nearly 20 years of experience. A veteran of CNET and VentureBeat, Daniel has also written for Wired, The New York Times, Time, and many other publications