{"id":305316,"date":"2021-01-15T08:06:20","date_gmt":"2021-01-15T00:06:20","guid":{"rendered":"http:\/\/4563.org\/?p=305316"},"modified":"2021-01-15T08:06:20","modified_gmt":"2021-01-15T00:06:20","slug":"%e4%bd%8e%e5%bb%b6%e6%97%b6%e7%b3%bb%e7%bb%9f%ef%bc%8c-java-%e5%ba%94%e7%94%a8%e5%a6%82%e4%bd%95%e9%85%8d%e7%bd%ae%e7%ba%bf%e7%a8%8b%e6%95%b0","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=305316","title":{"rendered":"\u4f4e\u5ef6\u65f6\u7cfb\u7edf\uff0c Java \u5e94\u7528\u5982\u4f55\u914d\u7f6e\u7ebf\u7a0b\u6570"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u4f4e\u5ef6\u65f6\u7cfb\u7edf\uff0c Java \u5e94\u7528\u5982\u4f55\u914d\u7f6e\u7ebf\u7a0b\u6570               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 0576coder <\/span>  <span><i><\/i> 6<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<ul>\n<li>\u670d\u52a1\u5668<\/li>\n<\/ul>\n<p>3 \u53f0\u666e\u901a\u4e91\u670d\u52a1\u5668\u5382\u5546\u5e38\u89c4\u7684 8 \u6838 8G \u524d\u9762\u6709\u4e2a ng \u505a\u8d1f\u8f7d<\/p>\n<ul>\n<li>\u8fd0\u884c\u65b9\u5f0f<\/li>\n<\/ul>\n<p>spring-boot \u5185\u7f6e\u7684 tomcat \u91c7\u7528 nio \u6a21\u5f0f jar \u5305\u542f\u52a8<\/p>\n<ul>\n<li>\u7cfb\u7edf\u63a5\u53e3\u5e73\u5747\u54cd\u5e94\u65f6\u95f4<\/li>\n<\/ul>\n<p>10-20 \u6beb\u79d2<\/p>\n<ul>\n<li>\u6bcf\u5929\u63a5\u53d7\u5230\u7684\u8bf7\u6c42\u6570<\/li>\n<\/ul>\n<p>800 \u4e07<\/p>\n<ul>\n<li>\u7cfb\u7edf\u5cf0\u503c qps<\/li>\n<\/ul>\n<p>300+ \u5e73\u5747\u6bcf\u53f0 100 \u5de6\u53f3<\/p>\n<ul>\n<li>tomcat \u914d\u7f6e <\/li>\n<\/ul>\n<p>100 \u7ebf\u7a0b accetpt 1000 max 1000<\/p>\n<ul>\n<li>\u7a0b\u5e8f\u903b\u8f91<\/li>\n<\/ul>\n<p>\u8bf7\u6c42\u8fdb\u6765 \u4ece ThreadPoolExecutor()\u91cc execut \u8ba1\u7b97\u540e\u8fd4\u56de \uff08 IO \u8ba1\u7b97\uff0chbase redis \u7b49\u67e5\u8be2\uff09<\/p>\n<ul>\n<li>\u80cc\u666f <\/li>\n<\/ul>\n<p>\u968f\u7740\u4e1a\u52a1\u589e\u52a0 \u7cfb\u7edf\u590d\u6742\u5ea6\u589e\u9ad8\u3002\u5e73\u5747\u63a5\u53e3\u54cd\u5e94\u65f6\u95f4\u589e\u52a0\u3002 \u5bfc\u81f4\u9ad8\u5cf0\u671f\u54cd\u5e94\u65f6\u95f4\u8d85\u8fc7 50 \u6beb\u79d2\u7684\u63a5\u53e3\u54cd\u5e94\u6570\u589e\u52a0\u3002<\/p>\n<p>\u4e1a\u52a1\u65b9\u9700\u8981\u6bd4\u8f83\u7a33\u5b9a\u7684\u63a5\u53e3\u54cd\u5e94\u65f6\u95f4 \u4e14&lt;=50 \u6beb\u79d2 \u4eca\u5929\u589e\u52a0\u4e86\u90e8\u5206\u4e1a\u52a1\u903b\u8f91 \u5bfc\u81f4\u6574\u4f53\u63a5\u53e3\u54cd\u5e94\u65f6\u95f4\u4e0a\u5347\u4e86\u7ea6 1 \u6beb\u79d2 \u7ed3\u679c\u9ad8\u5cf0\u671f\u6574\u4f53\u7cfb\u7edf\u8d85\u8fc7 50 \u6beb\u79d2\u63a5\u53e3\u6570\u589e\u52a0\u4e86\u5f88\u591a\u4e2a<\/p>\n<p>\u7cfb\u7edf cup \u8d1f\u8f7d\u4e0d\u9ad8<\/p>\n<ul>\n<li>\u95ee\u9898<\/li>\n<\/ul>\n<p>tomcat \u914d\u7f6e\u5e94\u8be5\u53ef\u4ee5\u8c03\u4f4e\u7ebf\u7a0b\u6570 accept \u8ddf max \u53ef\u4ee5\u4e0d\u52a8<\/p>\n<p>ThreadPoolExecutor \u914d\u7f6e\u591a\u5c11\u7ebf\u7a0b\u5408\u7406<\/p>\n<p>redis \u8fde\u63a5\u6c60\u8bbe\u591a\u5927\u5408\u7406<\/p>\n<p>hbase poolsize \u8bbe\u591a\u5927<\/p>\n<p>g1gc \u591a\u4e45\u4e00\u6b21\u7b97\u6b63\u5e38<\/p>\n<p>hbase \u5076\u5c14\u6709\u51e0\u6761\u6bd4\u8f83\u9ad8\u7684\u8017\u65f6<\/p>\n<p>redis \u65e0\u538b\u529b<\/p>\n<p>\u76ee\u524d\u7cfb\u7edf\u8d1f\u8f7d\u4e48\u5565\u538b\u529b \u8bf7\u6c42\u91cf\u4e5f\u65e0\u5927\u7684\u4e0a\u5347 \u5c31\u662f\u6574\u4f53\u63a5\u53e3\u7684\u5e73\u5747\u8017\u65f6\u7a0d\u5fae\u589e\u52a0\u4e86\u4e00\u4e24\u6beb\u79d2 \u5bfc\u81f4\u67d0\u4e9b\u6838\u5fc3\u63a5\u53e3\u9700\u8981 50 \u6beb\u79d2\u5185\u8fd4\u56de\u7684 \u7ed3\u679c 50 \u6beb\u79d2\u5185\u6ca1\u80fd\u8fd4\u56de \u6392\u9664 hbase \u7684\u90a3\u51e0\u6b21\u8d85\u65f6 \u80fd\u5426\u901a\u8fc7\u5408\u7406\u7684\u7ebf\u7a0b\u6c60\u914d\u7f6e\u6765\u964d\u4f4e\u63a5\u53e3\u7684\u54cd\u5e94\u65f6\u95f4<\/p>\n<p>\u73b0\u5728\u6700\u7b80\u5355\u7684\u529e\u6cd5\u5c31\u662f\u589e\u52a0\u4e00\u4e24\u53f0\u7269\u7406\u673a \u5e94\u8be5\u5c31\u80fd\u51cf\u5c11\u8d85\u8fc7 50 \u6beb\u79d2\u7684\u63a5\u53e3\u4e86<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>9<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5144197\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yuanmomo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u4e4b\u524d\u505a dsp \u5e7f\u544a\u63a8\u8350\u7cfb\u7edf\uff0c\u8981\u6c42\u6240\u6709\u7684\u8bf7\u6c42\u5728\u670d\u52a1\u5668\u7684\u6267\u884c\u65f6\u95f4\u4e0d\u8d85\u8fc7 10ms \u3002\u7ebf\u7a0b\u6570\u91cf\u7684\u914d\u7f6e\uff0c\u9700\u8981\u6839\u636e\u5177\u4f53\u7684\u4e1a\u52a1\u6765\u770b\u3002\u5982\u679c\u662f io \u591a\uff0c\u7b49\u5f85\u8017\u65f6\uff0c\u7ebf\u7a0b\u6570\u53ef\u4ee5\u8c03\u5927\u3002\u5982\u679c\u662f cpu \u8ba1\u7b97\u7684\uff0c\u7ebf\u7a0b\u6570\u4e00\u822c\u662f cpu \u6838\u5fc3\u7684\u4e24\u500d\uff0c\u4e4b\u524d\u6211\u505a\u5f97\u6e38\u620f server\uff0c\u7528 netty \u505a\u5f97\u3002\u5982\u679c\u4e1a\u52a1\u6d88\u8017\u65f6\u95f4\u592a\u957f\uff0c\u53ef\u4ee5\u8003\u8651\u53bb\u4f18\u5316\u4e1a\u52a1\u3002\u6211\u4e4b\u524d\u5e7f\u544a\u7cfb\u7edf\u56e0\u4e3a\u5bf9\u6570\u636e\u7684\u51c6\u786e\u6027\u8981\u6c42\u6ca1\u90a3\u4e48\u9ad8\uff0c\u80fd\u8d70\u5185\u5b58\u8d70\u5185\u5b58\uff0c\u5176\u6b21\u662f Redis\uff0cdb \u4ec5\u4ec5\u662f\u62ff\u6765\u5f02\u6b65\u5b58\u50a8\u6570\u636e\u3002\u540e\u9762\u7684\u6e38\u620f\u5bf9\u6570\u636e\u8981\u6c42\u9ad8\uff0c\u662f\u4fdd\u8bc1 Redis \u7684\u7a33\u5b9a\u6027\u6765\u786e\u4fdd\u6570\u636e\u7684\u51c6\u786e\u6027\u3002\u624b\u673a\uff0c\u539f\u8c05\uff0c\u6ca1\u6709\u6392\u7248                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5144198\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : liuhuan475 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7b49\u4e00\u4e2a\u5927\u4f6c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5144199\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : heyjei <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             0576 \u8001\u4e61\u554a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5144200\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Jooooooooo <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6574\u4e2a\u4e1a\u52a1\u903b\u8f91\u5982\u679c io(\u5916\u90e8\u8c03\u7528)\u6bd4\u8f83\u591a, \u90a3\u53ef\u4ee5\u52a0\u5927\u7ebf\u7a0b\u6c60<\/p>\n<p>cpu \u4e0d\u9ad8\u8bf4\u660e\u673a\u5668\u8d1f\u8f7d\u4f4e, \u7ebf\u7a0b\u6c60\u90fd\u53ef\u4ee5\u52a0\u5927                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5144201\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zzh7982 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             ThreadPoolExecutor \u548c tomcat \u90fd\u6539\u6210 200                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5144202\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : huang119412 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6574\u4f53\u800c\u8a00\uff0c\u74f6\u9888\u5728 db\uff0c\u5176\u6b21\u624d\u662f GC\uff0cjava8 \u4ee5\u53ca\u4e4b\u524d\u6700\u597d\u7684\u662f CMS \u3002\u57fa\u672c\u4e0a\u662f\u4e1a\u52a1\u8c03\u4f18\u548c CMS \u7684\u8c03\u4f18\uff0c\u53c2\u8003\u7f8e\u56e2 tech<br \/>https:\/\/tech.meituan.com\/2020\/08\/06\/new-zgc-practice-in-meituan.html                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5144203\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Nillouise <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u600e\u4e48\u505a\u5230\u7a33\u5b9a 50ms \u4e00\u4e0b\u8fd9\u4e48\u4f4e\u5f97\u5ef6\u8fdf\uff1f\u73b0\u5728\u6211\u516c\u53f8\u7684\u7ebf\u4e0a\u9879\u76ee\u591a\u67e5\u4e24\u6b21\u6570\u636e\u5e93\uff0c\u5ef6\u8fdf\u5c31\u8d85\u8fc7 50 \u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5144204\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : 0576coder <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u52a0\u4e86\u4e0b\u7ebf\u7a0b\u6570 \u8c03\u5230\u4e86 200<br \/>\u770b\u4e0b\u4eca\u665a\u8d85\u8fc7 50 \u7684\u4f1a\u4e0d\u4f1a\u964d\u4f4e                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5144205\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : 0576coder <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @Nillouise <br \/>\u4e70\u597d\u7684\u6570\u636e\u5e93 \u670d\u52a1\u5668\u6b63\u5e38\u70b9 \u53ea\u8981\u6ca1\u6709\u5947\u602a\u7684\u4e1a\u52a1 \u6216\u8005\u4f9d\u8d56 3 \u65b9\u63a5\u53e3\u6570\u636e \u80af\u5b9a\u80fd\u7a33\u554a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u4f4e\u5ef6\u65f6\u7cfb\u7edf\uff0c Java \u5e94\u7528\u5982\u4f55\u914d&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/305316"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=305316"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/305316\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=305316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=305316"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=305316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}