{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,4]],"date-time":"2026-07-04T17:09:29Z","timestamp":1783184969521,"version":"3.54.6"},"reference-count":37,"publisher":"Association for Computing Machinery (ACM)","issue":"12","content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Proc. VLDB Endow."],"published-print":{"date-parts":[[2020,8]]},"abstract":"<jats:p>Facebook uses MySQL to manage tens of petabytes of data in its main database named the User Database (UDB). UDB serves social activities such as likes, comments, and shares. In the past, Facebook used InnoDB, a B+Tree based storage engine as the backend. The challenge was to find an index structure using less space and write amplification [1]. LSM-tree [2] has the potential to greatly improve these two bottlenecks. RocksDB, an LSM tree-based key\/value store was already widely used in variety of applications but had a very low-level key-value interface. To overcome these limitations, MyRocks, a new MySQL storage engine, was built on top of RocksDB by adding relational capabilities. With MyRocks, using the RocksDB API, significant efficiency gains were achieved while still benefiting from all the MySQL features and tools. The transition was mostly transparent to client applications.<\/jats:p>\n          <jats:p>Facebook completed the UDB migration from InnoDB to MyRocks in 2017. Since then, ongoing improvements in production operations, and additional enhancements to MySQL, MyRocks, and RocksDB, provided even greater efficiency wins. MyRocks also reduced the instance size by 62.3% for UDB data sets and performed fewer I\/O operations than InnoDB. Finally, MyRocks consumed less CPU time for serving the same production traffic workload. These gains enabled us to reduce the number of database servers in UDB to less than half, saving significant resources. In this paper, we describe our journey to build and run an OLTP LSM-tree SQL database at scale. We also discuss the features we implemented to keep pace with UDB workloads, what made migrations easier, and what operational and software development challenges we faced during the two years of running MyRocks in production.<\/jats:p>\n          <jats:p>Among the new features we introduced in RocksDB were transactional support, bulk loading, and prefix bloom filters, all are available for the benefit of all RocksDB users.<\/jats:p>","DOI":"10.14778\/3415478.3415546","type":"journal-article","created":{"date-parts":[[2020,9,14]],"date-time":"2020-09-14T18:46:46Z","timestamp":1600109206000},"page":"3217-3230","source":"Crossref","is-referenced-by-count":101,"title":["MyRocks"],"prefix":"10.14778","volume":"13","author":[{"given":"Yoshinori","family":"Matsunobu","sequence":"first","affiliation":[{"name":"Facebook"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Siying","family":"Dong","sequence":"additional","affiliation":[{"name":"Facebook"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Herman","family":"Lee","sequence":"additional","affiliation":[{"name":"Facebook"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2020,8]]},"reference":[{"key":"e_1_2_1_1_1","volume-title":"Proceedings of the International Conference on Extending Database Technology (EDBT) Conference","author":"Athanassoulis M.","year":"2016","unstructured":"M. Athanassoulis, M. S. Kester, L. M. Maas, R. I. Stoica, S. Idreos, A. Ailamaki, and M. Callaghan. Designing Access Methods: The RUM Conjecture. In Proceedings of the International Conference on Extending Database Technology (EDBT) Conference, 2016"},{"key":"e_1_2_1_2_1","first-page":"4","article-title":"The log-structured merge-tree (LSM-tree)","volume":"33","author":"O'Neil Patrick","year":"1996","unstructured":"Patrick O'Neil, Edward Cheng, Dieter Gawlick, and Elizabeth O'Neil. 1996. The log-structured merge-tree (LSM-tree). Acta Inf. 33, 4 (June 1996), 351--385.","journal-title":"Acta Inf."},{"key":"e_1_2_1_3_1","doi-asserted-by":"publisher","DOI":"10.1145\/2213836.2213957"},{"key":"e_1_2_1_4_1","unstructured":"Facebook's MySQL extensions. https:\/\/github.com\/facebook\/mysql-5.6"},{"key":"e_1_2_1_5_1","unstructured":"Data centers year in review. Facebook Engineering. https:\/\/engineering.fb.com\/data-center-engineering\/data-centers-2018\/."},{"key":"e_1_2_1_6_1","first-page":"351","volume-title":"12th USENIX Symposium on Networked Systems Design and Implementation (NSDI 15)","author":"Kotulski L.A.","unstructured":"Sharma, Y., Ajoux, P., Ang, P., Callies, D., Choudhary, A., Demailly, L., Fersch, T., Guz, L.A., Kotulski, A., Kulkarni, S. and Kumar, S., 2015. Wormhole: Reliable pub-sub to support geo-replicated internet services. In 12th USENIX Symposium on Networked Systems Design and Implementation (NSDI 15) (pp. 351--366)."},{"key":"e_1_2_1_7_1","unstructured":"Flashcache https:\/\/www.facebook.com\/notes\/mysql-at-facebook\/releasing-flashcache\/388112370932\/"},{"key":"e_1_2_1_8_1","unstructured":"MySQL Glossary for Covering Index https:\/\/dev.mysql.com\/doc\/refman\/5.6\/en\/glossary.html#glos_covering_index"},{"key":"e_1_2_1_9_1","unstructured":"RocksDB. https:\/\/github.com\/facebook\/rocksdb"},{"key":"e_1_2_1_10_1","volume-title":"Proceedings of the 2019 USENIX Conference on Usenix Annual Technical Conference (USENIX ATC '19). USENIX Association, USA, 977--991","author":"Tai Amy","year":"2019","unstructured":"Amy Tai, Andrew Kryczka, Shobhit O. Kanaujia, Kyle Jamieson, Michael J. Freedman, and Asaf Cidon. 2019. Who's afraid of uncorrectable bit errors? online recovery of flash errors with distributed redundancy. In Proceedings of the 2019 USENIX Conference on Usenix Annual Technical Conference (USENIX ATC '19). USENIX Association, USA, 977--991."},{"key":"e_1_2_1_11_1","doi-asserted-by":"publisher","DOI":"10.1145\/2882903.2904441"},{"key":"e_1_2_1_12_1","unstructured":"Arun Sharma. Dragon: A distributed graph query engine. https:\/\/engineering.fb.com\/data-infrastructure\/dragon-a-distributed-graph-query-engine\/"},{"key":"e_1_2_1_13_1","unstructured":"Ghemawat S. and Dean J. 2011. LevelDB. https:\/\/github.com\/google\/leveldb"},{"key":"e_1_2_1_14_1","first-page":"3","volume-title":"CIDR","volume":"3","author":"Dong S.","year":"2017","unstructured":"S. Dong, M. Callaghan, L. Galanis, D. Borthakur, T. Savor, and M. Strumm. Optimizing space amplification in RocksDB. In CIDR, volume 3, page 3, 2017."},{"key":"e_1_2_1_15_1","doi-asserted-by":"publisher","DOI":"10.1145\/2463676.2465296"},{"key":"e_1_2_1_16_1","doi-asserted-by":"publisher","DOI":"10.1145\/2184512.2184527"},{"key":"e_1_2_1_17_1","unstructured":"MySQL InnoDB Undo Logs https:\/\/dev.mysql.com\/doc\/refman\/5.6\/en\/innodb-undo-logs.html"},{"key":"e_1_2_1_18_1","volume-title":"HBase: the definitive guide: random access to your planet-size data. \"O'Reilly Media","year":"2011","unstructured":"George, Lars. HBase: the definitive guide: random access to your planet-size data. \"O'Reilly Media, Inc.\", 2011."},{"key":"e_1_2_1_19_1","volume-title":"Proceedings of the 12th USENIX conference on File and Storage Technologies (FAST'14)","author":"Harter Tyler","unstructured":"Tyler Harter, Dhruba Borthakur, Siying Dong, Amitanand Aiyer, Liyin Tang, Andrea C. Arpaci-Dusseau, and Remzi H. Arpaci-Dusseau. 2014. Analysis of HDFS under HBase: a facebook messages case study. In Proceedings of the 12th USENIX conference on File and Storage Technologies (FAST'14). USENIX Association, USA, 199--212."},{"key":"e_1_2_1_20_1","unstructured":"Xiang Li Thomas Georgiou. Migrating Messenger storage to optimize performance https:\/\/engineering.fb.com\/core-data\/migrating-messenger-storage-to-optimize-performance\/"},{"key":"e_1_2_1_21_1","unstructured":"Evans J. 2006 A Scalable Concurrent malloc(3) Implementation for FreeBSD"},{"key":"e_1_2_1_22_1","doi-asserted-by":"publisher","DOI":"10.1145\/358699.358703"},{"key":"e_1_2_1_23_1","doi-asserted-by":"publisher","DOI":"10.1145\/1365815.1365816"},{"key":"e_1_2_1_24_1","doi-asserted-by":"publisher","DOI":"10.1145\/1773912.1773922"},{"key":"e_1_2_1_25_1","volume-title":"Proceedings of the 2017 ACM International Conference on Management of Data (pp. 331--343)","author":"Bales D.F.","unstructured":"Bacon, D.F., Bales, N., Bruno, N., Cooper, B.F., Dickinson, A., Fikes, A., Fraser, C., Gubarev, A., Joshi, M., Kogan, E. and Lloyd, A., 2017, May. Spanner: Becoming a SQL system. In Proceedings of the 2017 ACM International Conference on Management of Data (pp. 331--343)."},{"key":"e_1_2_1_26_1","volume-title":"Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data (pp. 1493--1509)","author":"Bardea R.","unstructured":"Taft, R., Sharif, I., Matei, A., VanBenschoten, N., Lewis, J., Grieger, T., Niemi, K., Woods, A., Birzin, A., Poss, R. and Bardea, P., 2020, June. CockroachDB: The Resilient Geo-Distributed SQL Database. In Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data (pp. 1493--1509)."},{"key":"e_1_2_1_27_1","unstructured":"Yugabyte Inc. The Leading High-Performance Distributed SQL Database. https:\/\/www.yugabyte.com\/. Accessed: 2020-02-09."},{"key":"e_1_2_1_28_1","unstructured":"PingCAP. Tackling MySQL Scalability with TiDB: the most actively developed open source NewSQL database on GitHub. https:\/\/pingcap.com\/. Accessed: 2020-02-09."},{"key":"e_1_2_1_29_1","volume-title":"Proceedings of the 2017 ACM International Conference on Management of Data (pp. 1041--1052)","author":"Bao T.","unstructured":"Verbitski, A., Gupta, A., Saha, D., Brahmadesam, M., Gupta, K., Mittal, R., Krishnamurthy, S., Maurice, S., Kharatishvili, T. and Bao, X., 2017, May. Amazon aurora: Design considerations for high throughput cloud-native relational databases. In Proceedings of the 2017 ACM International Conference on Management of Data (pp. 1041--1052)."},{"key":"e_1_2_1_30_1","volume-title":"MariaDB performance,\" http:\/\/www.tokutek.com\/products\/tokudb-for-mysql\/","author":"Tokutek I.","year":"2013","unstructured":"I. Tokutek, \"TokuDB: MySQL performance, MariaDB performance,\" http:\/\/www.tokutek.com\/products\/tokudb-for-mysql\/, 2013."},{"key":"e_1_2_1_31_1","doi-asserted-by":"publisher","DOI":"10.14778\/3352063.3352141"},{"key":"e_1_2_1_32_1","volume-title":"Proceedings of the 2011 ACM SIGMOD International Conference on Management of data (pp. 301--312)","author":"Das A.J.","unstructured":"Elmore, A.J., Das, S., Agrawal, D. and El Abbadi, A., 2011, June. Zephyr: live migration in shared nothing databases for elastic cloud platforms. In Proceedings of the 2011 ACM SIGMOD International Conference on Management of data (pp. 301--312)."},{"key":"e_1_2_1_33_1","unstructured":"Netflix Technology Blog. Netflix Billing Migration to AWS --- Part III. https:\/\/netflixtechblog.com\/netflix-billing-migration-to-aws-part-iii-7d94ab9d1f59"},{"key":"e_1_2_1_34_1","unstructured":"Migrating from AWS RDS MySQL to AWS Aurora Serverless MySQL Database. https:\/\/www.adelatech.com\/migrating-from-aws-rds-mysql-to-aws-aurora-serverless-mysql-database\/"},{"key":"e_1_2_1_35_1","volume-title":"Proceedings of the 2017 ACM International Conference on Management of Data (pp. 79--94)","author":"Idreos M.","unstructured":"Dayan, N., Athanassoulis, M. and Idreos, S., 2017, May. Monkey: Optimal navigable key-value store. In Proceedings of the 2017 ACM International Conference on Management of Data (pp. 79--94)."},{"key":"e_1_2_1_36_1","unstructured":"Zhang Y. Li Y. Guo F. Li C. and Xu Y. 2018. ElasticBF: Fine-grained and Elastic Bloom Filter Towards Efficient Read for LSM-tree-based {KV} Stores. In 10th {USENIX} Workshop on Hot Topics in Storage and File Systems (HotStorage 18)."},{"key":"e_1_2_1_37_1","doi-asserted-by":"publisher","DOI":"10.1145\/3183713.3196931"}],"container-title":["Proceedings of the VLDB Endowment"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.14778\/3415478.3415546","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,9,17]],"date-time":"2025-09-17T02:34:55Z","timestamp":1758076495000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.14778\/3415478.3415546"}},"subtitle":["LSM-tree database storage engine serving Facebook's social graph"],"short-title":[],"issued":{"date-parts":[[2020,8]]},"references-count":37,"journal-issue":{"issue":"12","published-print":{"date-parts":[[2020,8]]}},"alternative-id":["10.14778\/3415478.3415546"],"URL":"https:\/\/doi.org\/10.14778\/3415478.3415546","relation":{},"ISSN":["2150-8097"],"issn-type":[{"value":"2150-8097","type":"print"}],"subject":[],"published":{"date-parts":[[2020,8]]}}}