📜 ⬆️ ⬇️

How Facebook saved 75% of the energy required to store photos of cats and user selfie


Oregon's “cold” data center

One of the reasons for the popularity of services like Facebook is high performance, due to which there are practically no delays and lags in the work of the site (or almost none). If delays in uploading photos and videos would happen all the time, then Facebook probably could not have developed as actively as it happened before and is happening now. But the high popularity of the service means the need to constantly increase productivity, and so quickly, as much as possible.

It uses not only extensive, but also intensive methods of increasing productivity. In other words, you want to optimize everything and everyone. And here - another problem, because even in a small company, large amounts of money are often spent on optimizing the operation of a computer network. What can we say about such a giant as Facebook - here the costs of optimization are considered tens, if not hundreds of millions. However, on such a scale, even a small successful optimization example can save millions of dollars.

The “infrastructure” Facebook team spends almost all its time thinking about ways to improve the efficiency of hardware or software (local or cloud - there is no particular difference). Earlier this year, the team developed an interesting plan for optimizing the social network, and this plan turned out to be very effective.
')
For example, two Facebook data centers were designed and built for almost the sole purpose - to save all user photos and videos, plus quality service of the corresponding traffic. Since these data centers (they were called “cold storage” data centers) were “sharpened” for a small number of tasks, the team was able to optimize a very large number of systems, reducing energy consumption by the data center, and also using less expensive storage equipment.

How it works?



The company began to use not the most difficult, but very effective way of storing media files. Thus, each image of Facebook users is stored in several copies posted in the DC of the company. Copies are stored both in the main data centers and in the “cold storage” centers.

Newer, more popular files are stored in more copies in hot data centers than older photos that few people see. The main function of “cold storage” systems is to make sure that all files are always available, at any time.

Since the systems of "cold storage" are placed copies of not too popular photos, the engineers decided not to use backup electrical infrastructure or emergency generators. This is one way to save money.

Cold storage systems are a slightly modified version of Open Vault, a storage standard developed as part of the Open Compute Project. Here the interesting point is that in the basket only one hard disk is working at a time.


Modified storage system Open Rack, with a small number of batteries, coolers and other elements

Special software controls each of the disks, including only the one that is needed at the moment. Thus, “cold” data storage systems consume the energy required for simultaneous operation of only 6% of all hard drives that operate in the system. As a result, only 25% of energy is consumed, which is used by traditional data storage systems, where all hard drives work at once. In turn, this allows using only one power shelve instead of three in Open Rack. It also uses 5 power sources instead of 7. And the number of conductive buses in Open Rack is reduced from 3 to 1. Yes, and the number of coolers is reduced from three to one, all for the same reason - a very small number of hard drives are running at a time.

10 + 10 = 14



In addition to optimizing the hardware, Facebok engineers are optimizing software. For example, data storage systems use error correction technology called Reed-Solomon. It allows you to reduce the amount of memory required to save copies of media files. The technology provides storage of copies not entirely, but in parts. If necessary, Reed-Solomon collects from parts the entire file, from all the areas that are currently available.

So, if the file is divided into 10 parts, it will be stored in two (for example) places not 20 parts, but only 14.


Explaining Facebook Reed-Solomon Technology

What's next?



Despite the fact that “cold” data storage systems work fine, and in two data centers there is quite enough space for storing more information than now, the Facebook team is considering its next move.

So, today the data stored in the “hot” data center of the West Coast is duplicated in the “cold” data storage system on the East Coast, and vice versa. The next step for the company will be to use Reed-Solomon technology in all “cold” storage systems.

When the third such system is built, the third “cold” data center, the system will be virtually error-free, ultra-reliable. Even if one of the data centers goes offline, the data stored in the other two DCs will be enough to maintain Facebook’s normal operation. Well, the probability of shutting down two data centers at once is extremely small.

Source: https://habr.com/ru/post/257699/


All Articles