{"id":769,"date":"2017-04-17T02:04:36","date_gmt":"2017-04-17T02:04:36","guid":{"rendered":"http:\/\/www.selinuxplus.com\/?p=769"},"modified":"2017-04-17T02:04:36","modified_gmt":"2017-04-17T02:04:36","slug":"ceph%e6%80%a7%e8%83%bd%e4%bc%98%e5%8c%96%e7%9a%84%e6%93%8d%e4%bd%9c%e7%ac%94%e8%ae%b0%ef%bc%883%ef%bc%89","status":"publish","type":"post","link":"http:\/\/www.selinuxplus.com\/?p=769","title":{"rendered":"ceph\u6027\u80fd\u4f18\u5316\u7684\u64cd\u4f5c\u7b14\u8bb0\uff083\uff09"},"content":{"rendered":"<p>Ceph\u5c42\u9762\u7684\u4f18\u5316<br \/>\n\u53c2\u6570\u7684\u67e5\u8be2<br \/>\n\u4e0b\u9762\u7684tuning\u53c2\u6570\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u83b7\u53d6<\/p>\n<pre class=\"lang:default decode:true \" >ceph daemon osd.x config show<\/pre>\n<p>\u4ee5\u4e0b\u547d\u4ee4\u7528\u6765\u89c2\u5bdfosd\u7684\u6027\u80fd\uff1a <\/p>\n<pre class=\"lang:default decode:true \" >ceph daemon osd.x perf dump\r\nceph osd perf\r\n<\/pre>\n<p>1 filestore\/object store \u7684\u53c2\u6570<br \/>\n  filestore queue max ops = 50000 \u6570\u636e\u76d8\u6700\u5927\u63a5\u53d7\u7684\u64cd\u4f5c\u6570<br \/>\n  filestore queue max bytes = 524288000 \u6570\u636e\u76d8\u4e00\u6b21\u64cd\u4f5c\u6700\u5927\u7684\u5b57\u8282\u6570\uff08bytes\uff09<br \/>\n  \u8ddf\u8e2aop_queue_reserve_throttle\u67e5\u770b\u662f\u5426\u6709waiting\u5927\u4e8emax_ops\u6216\u5927\u4e8emax_bytes. \u5f53\u961f\u5217\u7684\u64cd\u4f5c\u6570\u8fc7\u591a\uff0c\u6216\u8005\u961f\u5217\u4e2d\u64cd\u4f5c\u6570\u636e\u957f\u5ea6\u8fc7\u5927\uff0c\u963b\u585e\u7b49\u5f85\u3002\u5728\u67d0\u4e2a\u64cd\u4f5c\u5904\u7406\u7ed3\u675f\u540e\uff0c_void_process_finish\u4f1a\u5524\u9192<\/p>\n<p>  filestore queue committing max ops = 50000 #\u6570\u636e\u76d8\u80fd\u591fcommit\u7684\u64cd\u4f5c\u6570<br \/>\n  filestore queue committing max bytes = 524288000 #\u6570\u636e\u76d8\u80fd\u591fcommit\u7684\u6700\u5927\u5b57\u8282\u6570\uff08bytes)<\/p>\n<p>  filestore fd cache size: 128  #\u5bf9\u8c61\u6587\u4ef6\u53e5\u67c4\u7f13\u5b58\u5927\u5c0f 10000 objects. (10k files x 4M\/file = 40G) as cache\u3002\u5982\u679c\u6709100G\u5185\u5b58\u3002 100G \/10 osd = 10G \/4M = 2500(cache size)<br \/>\n  filestore fd cache shards: 16  #\u5bf9\u8c61\u6587\u4ef6\u53e5\u67c4\u7f13\u5b58\u5206\u7247\u4e2a\u6570<br \/>\n  \u9ed8\u8ba4\u503c128\u4e2aobject\u3002\u5982\u679c\u6bcf\u4e2aobject\u7684\u5927\u5c0f\u4e3a4M\uff0c\u6bcf\u4e2afilestore \u53ea\u80fdcache 128*4M = 512M \u3002\u7f13\u5b58\u6587\u4ef6\u53e5\u67c4\u80fd\u52a0\u5feb\u6587\u4ef6\u7684\u8bbf\u95ee\u901f\u5ea6\uff0c\u5efa\u8bae\u7f13\u5b58\u6240\u6709\u7684\u6587\u4ef6\u53e5\u67c4\uff0c\u8981\u8c03\u9ad8\u7cfb\u7edf\u7684\u53e5\u67c4\u9650\u5236\uff0c\u4ee5\u514d\u53e5\u67c4\u8017\u5c3d\u3002\u5efa\u8bae10240<\/p>\n<p>  filestore_fiemap: #\u5f00\u542f\u7a00\u758f\u8bfb\u5199\u7279\u6027\uff0c\u6709\u52a9\u4e8e\u52a0\u5feb\u514b\u9686\u548c\u6062\u590d\u901f\u5ea6<\/p>\n<p>  filestore_max_sync_interval: 5<br \/>\n  filestore_min_sync_interval: 0.01 <\/p>\n<p>  filestore_merge_threshold: 10  #pg\u5b50\u76ee\u5f55\u5408\u5e76\u7684\u6700\u5c0f\u6587\u4ef6\u6570<br \/>\n  filestore_split_multiple: 2 #pg\u5b50\u76ee\u5f55\u5206\u88c2\u4e58\u6570\uff0c\u9ed8\u8ba4\u4e3a2<br \/>\n  \u8fd9\u4e24\u4e2a\u503c\u51b3\u5b9a\u4e86\u4e00\u4e2a\u76ee\u5f55\u4e0b\uff0c\u5b58\u653eobject\u6587\u4ef6\u7684\u4e2a\u6570\u3002 \u9ed8\u8ba4\u4e3a 10 * 2 * 16 = 320\u4e2a\u3002 \u5982\u679c\u8d85\u8fc7\u8fd9\u4e2a\u6570\uff0c \u76ee\u5f55\u4f1a\u81ea\u52a8split\u3002 \u8fd9\u4f1a\u5f71\u54cd\u5230\u5185\u5b58\u4e2d\u5143\u6570\u636e\u7684\u8bbf\u95ee\uff0c \u8fdb\u800c\u5f71\u54cd\u6027\u80fd\u3002filestore_merge_threshold\u8868\u793a\uff0c \u5f53\u4e00\u4e2a\u76ee\u5f55\u4e0b\u7684object\u6587\u4ef6\u6570\u5c0f\u4e8e\u8be5\u503c\u65f6\uff0c \u76ee\u5f55\u4f1a\u81ea\u52a8\u5408\u5e76\u3002\u4e24\u4e2a\u53c2\u6570\u63a7\u5236pg\u76ee\u5f55\u7684\u5408\u5e76\u4e0e\u5206\u88c2\uff0c\u5f53\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6\u6570\u5c0f\u4e8efilestore_merge_threshold\u65f6\uff0c\u8be5\u76ee\u5f55\u7684\u5bf9\u8c61\u6587\u4ef6\u4f1a\u88ab\u5408\u5e76\u5230\u7236\u76ee\u5f55\uff1b\u5982\u679c\u76ee\u5f55\u7684\u6587\u4ef6\u6570\u5927\u4e8efilestore_merge_threshold*16*filestore_split_multiple,\u8be5\u76ee\u5f55\u4f1a\u5206\u88c2\u6210\u4e24\u4e2a\u5b50\u76ee\u5f55\u3002\u8bbe\u7f6e\u5408\u7406\u7684\u503c\u53ef\u4ee5\u52a0\u5feb\u5bf9\u8c61\u6587\u4ef6\u7684\u7d22\u5f15\u901f\u5ea6<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ceph\u5c42\u9762\u7684\u4f18\u5316 \u53c2\u6570\u7684\u67e5\u8be2 \u4e0b\u9762\u7684tuning&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[84],"tags":[180,162],"_links":{"self":[{"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=\/wp\/v2\/posts\/769"}],"collection":[{"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=769"}],"version-history":[{"count":1,"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=\/wp\/v2\/posts\/769\/revisions"}],"predecessor-version":[{"id":770,"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=\/wp\/v2\/posts\/769\/revisions\/770"}],"wp:attachment":[{"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=769"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=769"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.selinuxplus.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=769"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}