Thanks to some applied discipline, Facebook is reaping greater benefits from its efforts around open source software.
The social network has relied on open source since its inception, but it didn't formalized those efforts until 2013 when infrastructure engineer Blake Matheny started overseeing its open source projects.
With so many users, "we faced a lot of new challenges that the software wasn't designed for," Matheny said Wednesday in a talk at the Linux Summit in Santa Rosa, California. "So we work hard to try to improve them."
Relying on open source also helps Facebook's new technical hires get up to speed quickly. "If you have to wait six months for an engineer to get trained on some proprietary internal system, that is time wasted, " Matheny said.
Facebook has maintained 235 open source projects on GitHub, consisting of more than 10 million lines of code. The software covers all aspects of running an Internet service, including data management, security, Web design, mobile computing, and infrastructure management.
Posting code it developed in house has helped Facebook in numerous ways. "It makes us write better software," Matheny said. Knowing their work will be exposed to other developers means its engineers write cleaner, more modular code that's less inextricably tied to other Facebook programs.
When Matheny assumed the role as open source steward, he wrote a series of scripts to get information from GitHub about how the software is being used by outside parties. He can see how many external developers a project attracts, how many suggested changes or bug reports they submit and how quickly those changes are applied.
"You can see which projects are doing well and which projects have issues," Matheny said.
This data has spurred project owners to update their code more quickly. When Matheny first started keeping tabs, the average pull request, or suggested change, was over a year. That time is now down to three months.
The company has also increased its contributions to other open source projects. In 2014, Facebook engineers contributed 214 changes to the Linux kernel, up from 6 in 2013.
Having its own modifications implemented in the Linux kernel means Facebook engineers don't have to re-implement their changes each time the kernel is updated. It also ensures that Linux-tested equipment from hardware manufacturers will be ready to operate within Facebook, Matheny said.