{"id":4546,"date":"2020-04-22T22:32:39","date_gmt":"2020-04-23T02:32:39","guid":{"rendered":"https:\/\/www.hajim.wdev.rochester.edu\/senior-design-day\/safe-fast-sharing-of-memcached-as-a-protected-library\/"},"modified":"2020-05-05T20:24:22","modified_gmt":"2020-05-06T00:24:22","slug":"safe-fast-sharing-of-memcached-as-a-protected-library","status":"publish","type":"post","link":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/safe-fast-sharing-of-memcached-as-a-protected-library\/","title":{"rendered":"Safe, Fast Sharing of Memcached as a Protected Library"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Team Members<\/h2>\n\n\n\n<p>Chris Kjellqvist<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Supervisors<\/h4>\n\n\n\n<p>Michael Scott<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Customers<\/h4>\n\n\n\n<p>None<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Description<\/h2>\n\n\n\n<p>Memcached is a widely used key-value (KV) store. It is structured<br>as a multithreaded user-level server, accessed over socket<br>connections by a potentially distributed collection of clients.<br>Because socket communication is so much more expensive<br>than a single operation on a KV store, much of the client<br>library is devoted to batching of requests. Batching is not<br>always feasible, however, and the cost of communication<br>seems particularly unfortunate when\u2014as is often the case\u2014<br>clients are co-located on a single machine with the server,<br>and have access to the same physical memory.<br><\/p>\n\n\n\n<p>Fortunately, recent work on protected libraries has shown<br>that it is possible, on current Intel processors, to amplify access<br>rights quickly when calling into a specially configured<br>user-level library. Library instances in separate processes<br>can then share data safely, even in the face of independent<br>process failures. We have used protected libraries to implement<br>a new version of memcached in which client threads<br>execute the code of the server themselves, without the need<br>to send messages. Compared to the original, our new version<br>is both significantly simpler, containing 24% less code, and<br>dramatically faster, with a 11\u201356\u00d7 reduction in latency and<br>a roughly 2\u00d7 increase in throughput.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"725\" height=\"597\" src=\"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-content\/uploads\/2020\/05\/our_model4.png\" alt=\"\" class=\"wp-image-36252\" srcset=\"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-content\/uploads\/2020\/05\/our_model4.png 725w, https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-content\/uploads\/2020\/05\/our_model4-300x247.png 300w\" sizes=\"auto, (max-width: 725px) 100vw, 725px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Memcached is a widely used key-value (KV) store. It is structured<br \/>\nas a multithreaded user-level server, accessed over socket<br \/>\nconnections by a potentially distributed collection of clients.<br \/>\nBecause socket communication is so much more expensive<br \/>\nthan a single operation on a KV store, much of the client<br \/>\nlibrary is devoted to batching of requests. Batching is not<br \/>\nalways feasible, however, and the cost of communication<br \/>\nseems particularly unfortunate when\u2014as is often the case\u2014<br \/>\nclients are co-located on a single machine with the server,<br \/>\nand have access to the same physical memory.<\/p>\n<p>Fortunately, recent work on protected libraries has shown<br \/>\nthat it is possible, on current Intel processors, to amplify access<br \/>\nrights quickly when calling into a specially configured<br \/>\nuser-level library. Library instances in separate processes<br \/>\ncan then share data safely, even in the face of independent<br \/>\nprocess failures. We have used protected libraries to implement<br \/>\na new version of memcached in which client threads<br \/>\nexecute the code of the server themselves, without the need<br \/>\nto send messages. Compared to the original, our new version<br \/>\nis both significantly simpler, containing 24% less code, and<br \/>\ndramatically faster, with a 11\u201356\u00d7 reduction in latency and<br \/>\na roughly 2\u00d7 increase in throughput.<br \/>\n\ufeff<\/p>\n","protected":false},"author":6242,"featured_media":3756,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[96],"tags":[],"coauthors":[8612],"class_list":["post-4546","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-csc-archive"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Safe, Fast Sharing of Memcached as a Protected Library - Senior Design Day<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hajim.rochester.edu\/senior-design-day\/safe-fast-sharing-of-memcached-as-a-protected-library\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Safe, Fast Sharing of Memcached as a Protected Library - Senior Design Day\" \/>\n<meta property=\"og:description\" content=\"Memcached is a widely used key-value (KV) store. It is structured as a multithreaded user-level server, accessed over socket connections by a potentially distributed collection of clients. Because socket communication is so much more expensive than a single operation on a KV store, much of the client library is devoted to batching of requests. Batching is not always feasible, however, and the cost of communication seems particularly unfortunate when\u2014as is often the case\u2014 clients are co-located on a single machine with the server, and have access to the same physical memory. Fortunately, recent work on protected libraries has shown that it is possible, on current Intel processors, to amplify access rights quickly when calling into a specially configured user-level library. Library instances in separate processes can then share data safely, even in the face of independent process failures. We have used protected libraries to implement a new version of memcached in which client threads execute the code of the server themselves, without the need to send messages. Compared to the original, our new version is both significantly simpler, containing 24% less code, and dramatically faster, with a 11\u201356\u00d7 reduction in latency and a roughly 2\u00d7 increase in throughput. \ufeff\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hajim.rochester.edu\/senior-design-day\/safe-fast-sharing-of-memcached-as-a-protected-library\/\" \/>\n<meta property=\"og:site_name\" content=\"Senior Design Day\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-23T02:32:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-06T00:24:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-content\/uploads\/2020\/04\/79-our_model.png\" \/>\n\t<meta property=\"og:image:width\" content=\"725\" \/>\n\t<meta property=\"og:image:height\" content=\"597\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/safe-fast-sharing-of-memcached-as-a-protected-library\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/safe-fast-sharing-of-memcached-as-a-protected-library\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/#\\\/schema\\\/person\\\/351018fbcf84ed8cac6d8072ba5b347c\"},\"headline\":\"Safe, Fast Sharing of Memcached as a Protected Library\",\"datePublished\":\"2020-04-23T02:32:39+00:00\",\"dateModified\":\"2020-05-06T00:24:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/safe-fast-sharing-of-memcached-as-a-protected-library\\\/\"},\"wordCount\":198,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/safe-fast-sharing-of-memcached-as-a-protected-library\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/79-our_model.png\",\"articleSection\":[\"CSC Archive\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/safe-fast-sharing-of-memcached-as-a-protected-library\\\/\",\"url\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/safe-fast-sharing-of-memcached-as-a-protected-library\\\/\",\"name\":\"Safe, Fast Sharing of Memcached as a Protected Library - Senior Design Day\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/safe-fast-sharing-of-memcached-as-a-protected-library\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/safe-fast-sharing-of-memcached-as-a-protected-library\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/79-our_model.png\",\"datePublished\":\"2020-04-23T02:32:39+00:00\",\"dateModified\":\"2020-05-06T00:24:22+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/#\\\/schema\\\/person\\\/351018fbcf84ed8cac6d8072ba5b347c\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/safe-fast-sharing-of-memcached-as-a-protected-library\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/safe-fast-sharing-of-memcached-as-a-protected-library\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/safe-fast-sharing-of-memcached-as-a-protected-library\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/79-our_model.png\",\"contentUrl\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/wp-content\\\/uploads\\\/2020\\\/04\\\/79-our_model.png\",\"width\":725,\"height\":597,\"caption\":\"Visual Representation of our work as a diagram.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/safe-fast-sharing-of-memcached-as-a-protected-library\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Safe, Fast Sharing of Memcached as a Protected Library\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/#website\",\"url\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/\",\"name\":\"Senior Design Day\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/#\\\/schema\\\/person\\\/351018fbcf84ed8cac6d8072ba5b347c\",\"name\":\"admin\",\"url\":\"https:\\\/\\\/www.hajim.rochester.edu\\\/senior-design-day\\\/author\\\/seniordesign\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Safe, Fast Sharing of Memcached as a Protected Library - Senior Design Day","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/safe-fast-sharing-of-memcached-as-a-protected-library\/","og_locale":"en_US","og_type":"article","og_title":"Safe, Fast Sharing of Memcached as a Protected Library - Senior Design Day","og_description":"Memcached is a widely used key-value (KV) store. It is structured as a multithreaded user-level server, accessed over socket connections by a potentially distributed collection of clients. Because socket communication is so much more expensive than a single operation on a KV store, much of the client library is devoted to batching of requests. Batching is not always feasible, however, and the cost of communication seems particularly unfortunate when\u2014as is often the case\u2014 clients are co-located on a single machine with the server, and have access to the same physical memory. Fortunately, recent work on protected libraries has shown that it is possible, on current Intel processors, to amplify access rights quickly when calling into a specially configured user-level library. Library instances in separate processes can then share data safely, even in the face of independent process failures. We have used protected libraries to implement a new version of memcached in which client threads execute the code of the server themselves, without the need to send messages. Compared to the original, our new version is both significantly simpler, containing 24% less code, and dramatically faster, with a 11\u201356\u00d7 reduction in latency and a roughly 2\u00d7 increase in throughput. \ufeff","og_url":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/safe-fast-sharing-of-memcached-as-a-protected-library\/","og_site_name":"Senior Design Day","article_published_time":"2020-04-23T02:32:39+00:00","article_modified_time":"2020-05-06T00:24:22+00:00","og_image":[{"url":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-content\/uploads\/2020\/04\/79-our_model.png","width":725,"height":597,"type":"image\/png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/safe-fast-sharing-of-memcached-as-a-protected-library\/#article","isPartOf":{"@id":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/safe-fast-sharing-of-memcached-as-a-protected-library\/"},"author":{"name":"admin","@id":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/#\/schema\/person\/351018fbcf84ed8cac6d8072ba5b347c"},"headline":"Safe, Fast Sharing of Memcached as a Protected Library","datePublished":"2020-04-23T02:32:39+00:00","dateModified":"2020-05-06T00:24:22+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/safe-fast-sharing-of-memcached-as-a-protected-library\/"},"wordCount":198,"commentCount":0,"image":{"@id":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/safe-fast-sharing-of-memcached-as-a-protected-library\/#primaryimage"},"thumbnailUrl":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-content\/uploads\/2020\/04\/79-our_model.png","articleSection":["CSC Archive"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/safe-fast-sharing-of-memcached-as-a-protected-library\/","url":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/safe-fast-sharing-of-memcached-as-a-protected-library\/","name":"Safe, Fast Sharing of Memcached as a Protected Library - Senior Design Day","isPartOf":{"@id":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/safe-fast-sharing-of-memcached-as-a-protected-library\/#primaryimage"},"image":{"@id":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/safe-fast-sharing-of-memcached-as-a-protected-library\/#primaryimage"},"thumbnailUrl":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-content\/uploads\/2020\/04\/79-our_model.png","datePublished":"2020-04-23T02:32:39+00:00","dateModified":"2020-05-06T00:24:22+00:00","author":{"@id":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/#\/schema\/person\/351018fbcf84ed8cac6d8072ba5b347c"},"breadcrumb":{"@id":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/safe-fast-sharing-of-memcached-as-a-protected-library\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hajim.rochester.edu\/senior-design-day\/safe-fast-sharing-of-memcached-as-a-protected-library\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/safe-fast-sharing-of-memcached-as-a-protected-library\/#primaryimage","url":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-content\/uploads\/2020\/04\/79-our_model.png","contentUrl":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-content\/uploads\/2020\/04\/79-our_model.png","width":725,"height":597,"caption":"Visual Representation of our work as a diagram."},{"@type":"BreadcrumbList","@id":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/safe-fast-sharing-of-memcached-as-a-protected-library\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/"},{"@type":"ListItem","position":2,"name":"Safe, Fast Sharing of Memcached as a Protected Library"}]},{"@type":"WebSite","@id":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/#website","url":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/","name":"Senior Design Day","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/#\/schema\/person\/351018fbcf84ed8cac6d8072ba5b347c","name":"admin","url":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/author\/seniordesign\/"}]}},"_links":{"self":[{"href":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-json\/wp\/v2\/posts\/4546","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-json\/wp\/v2\/users\/6242"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-json\/wp\/v2\/comments?post=4546"}],"version-history":[{"count":4,"href":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-json\/wp\/v2\/posts\/4546\/revisions"}],"predecessor-version":[{"id":36242,"href":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-json\/wp\/v2\/posts\/4546\/revisions\/36242"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-json\/wp\/v2\/media\/3756"}],"wp:attachment":[{"href":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-json\/wp\/v2\/media?parent=4546"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-json\/wp\/v2\/categories?post=4546"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-json\/wp\/v2\/tags?post=4546"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.hajim.rochester.edu\/senior-design-day\/wp-json\/wp\/v2\/coauthors?post=4546"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}