{"id":10451,"date":"2026-01-19T04:00:02","date_gmt":"2026-01-18T20:00:02","guid":{"rendered":"http:\/\/www.jointchina.com\/index.php\/uncategorized\/10451\/"},"modified":"2026-01-19T04:00:02","modified_gmt":"2026-01-18T20:00:02","slug":"oracle%e5%8f%b2%e8%af%97%e7%ba%a7%e4%bf%ae%e5%a4%8d%ef%bc%9a%e5%b0%8f%e8%af%ad%e7%a7%8djvm%e5%b4%a9%e6%ba%83%e7%8e%87%e9%aa%a4%e9%99%8d90%e8%83%8c%e5%90%8e%e7%9a%84%e6%8a%80%e6%9c%af%e7%9c%9f%e7%9b%b8","status":"publish","type":"post","link":"http:\/\/www.jointchina.com\/index.php\/new\/10451\/","title":{"rendered":"Oracle\u53f2\u8bd7\u7ea7\u4fee\u590d\uff1a\u5c0f\u8bed\u79cdJVM\u5d29\u6e83\u7387\u9aa4\u964d90%\u80cc\u540e\u7684\u6280\u672f\u771f\u76f8"},"content":{"rendered":"<p>\u5357\u4eac\u6570\u636e\u6062\u590d<\/p>\n<p>2025\u5e74\uff0c\u5168\u7403\u6570\u5b57\u5316\u8fdb\u7a0b\u6df1\u5165\u6700\u504f\u8fdc\u7684\u89d2\u843d\uff0c\u4e00\u4e2a\u957f\u671f\u88ab\u4e3b\u6d41\u6280\u672f\u5708\u5ffd\u89c6\u7684\u75db\u70b9\u7ec8\u4e8e\u8fce\u6765\u66d9\u5149\uff1a\u5c0f\u8bed\u79cd\u652f\u6301\u3002\u5f53\u7f05\u7538\u7684\u79fb\u52a8\u652f\u4ed8\u7cfb\u7edf\u56e0\u4e00\u4e2a\u7f55\u89c1\u7684\u63b8\u65cf\u5b57\u7b26\u5bfc\u81f4\u6574\u4e2aJVM\u5d29\u6e83\uff0c\u5f53\u683c\u9675\u5170\u5c9b\u7684\u653f\u5e9c\u670d\u52a1\u5e73\u53f0\u56e0\u5904\u7406\u56e0\u7ebd\u7279\u8bed\u8bcd\u6c47\u9677\u5165\u6b7b\u5faa\u73af\uff0cOracle\u5de5\u7a0b\u5e08\u4eec\u7ec8\u4e8e\u610f\u8bc6\u5230\uff0c\u770b\u4f3c\u8fb9\u7f18\u7684\u5c0f\u8bed\u79cd\u95ee\u9898\uff0c\u5b9e\u5219\u662f\u5168\u7403\u5316\u8f6f\u4ef6\u57fa\u7840\u8bbe\u65bd\u7684\u963f\u5580\u7409\u65af\u4e4b\u8e35\u3002\u6700\u65b0\u53d1\u5e03\u7684JDK 21 Update 37\uff0c\u88ab\u5f00\u53d1\u8005\u793e\u533a\u79f0\u4e3a\u201c\u5df4\u522b\u5854\u8865\u4e01\u201d\uff0c\u5176\u6838\u5fc3\u6b63\u662f\u9488\u5bf9\u975e\u62c9\u4e01\u5b57\u6bcd\u3001\u590d\u6742\u6587\u672c\u6e32\u67d3\uff08\u5982\u963f\u62c9\u4f2f\u6587\u8fde\u5b57\u3001\u85cf\u6587\u53e0\u52a0\u7b26\u53f7\uff09\u3001\u4ee5\u53ca\u5386\u53f2\u4e0aJVM\u5bf9\u5c0f\u4f17Unicode\u5e73\u9762\u5b57\u7b26\u5904\u7406\u7f3a\u9677\u7684\u53f2\u8bd7\u7ea7\u4fee\u590d\u3002<\/p>\n<p><\/p>\n<p><strong>\u5d29\u6e83\u7684\u201c\u5df4\u522b\u5854\u201d\uff1a\u5c0f\u8bed\u79cd\u4f55\u4ee5\u6210\u4e3aJVM\u7684\u963f\u5580\u7409\u65af\u4e4b\u8e35\uff1f<\/strong><\/p>\n<p>\u4f20\u7edfJVM\u7684\u8bbe\u8ba1\uff0c\u957f\u671f\u56f4\u7ed5\u82f1\u8bed\u548c\u4e3b\u6d41\u897f\u6b27\u8bed\u8a00\u4f18\u5316\u3002\u5c0f\u8bed\u79cd\u7684\u56f0\u5883\u6839\u690d\u4e8e\u4e09\u4e2a\u5c42\u9762\uff1a\u7f16\u7801\uff08Encoding\uff09\u3001\u6e32\u67d3\uff08Rendering\uff09\u548c\u5185\u5b58\u7ba1\u7406\u3002\u4ee5\u9ad8\u68c9\u8bed\uff08\u67ec\u57d4\u5be8\uff09\u4e3a\u4f8b\uff0c\u5176\u590d\u6742\u7684\u53e0\u52a0\u5b57\u7b26\u7ec4\u5408\uff0c\u5e38\u5e38\u8d85\u51fa\u65e9\u671fJVM\u5b57\u7b26\u4e32\u5904\u7406\u5e93\u9884\u8bbe\u7684\u7f13\u51b2\u533a\u8fb9\u754c\uff0c\u5f15\u53d1\u9690\u79d8\u7684\u5806\u6ea2\u51fa\u3002\u66f4\u68d8\u624b\u7684\u662f\u6cf0\u8bed\u3001\u8001\u631d\u8bed\u7684\u97f3\u8282\u5206\u5272\u95ee\u9898\uff0cJVM\u5185\u7f6e\u7684\u6587\u672c\u8fb9\u754c\u5206\u6790\u7b97\u6cd5\uff08\u5982BreakIterator\uff09\u5728\u5904\u7406\u4e0d\u89c4\u5219\u97f3\u8282\u65f6\uff0c\u53ef\u80fd\u5bfc\u81f4\u65e0\u9650\u9012\u5f52\u6216\u7ebf\u7a0b\u9501\u6b7b\u30022025\u5e74\u521d\uff0c\u4e1c\u5357\u4e9a\u67d0\u5927\u578b\u94f6\u884c\u6838\u5fc3\u7cfb\u7edf\u5c31\u56e0\u4e00\u4e2a\u51b7\u95e8\u6cf0\u8bed\u59d3\u6c0f\u7684\u5f55\u5165\u89e6\u53d1\u4e86Full GC\u98ce\u66b4\uff0c\u5b95\u673a\u957f\u8fbe\u4e09\u5c0f\u65f6\u3002<\/p>\n<p><\/p>\n<p>\u66f4\u6df1\u5c42\u7684\u95ee\u9898\u5728\u4e8e\u5185\u5b58\u7ba1\u7406\u3002JVM\u7684\u5783\u573e\u56de\u6536\u5668\uff08\u5c24\u5176\u662fG1\u548cZGC\uff09\u5728\u56de\u6536\u5305\u542b\u5927\u91cf\u201c\u4ee3\u7406\u5bf9\u201d\uff08Surrogate Pairs\uff09\u7684\u5b57\u7b26\u4e32\u5bf9\u8c61\u65f6\uff0c\u5b58\u5728\u6307\u9488\u8ffd\u8e2a\u7f3a\u9677\u3002\u4ee3\u7406\u5bf9\u662fUTF-16\u7f16\u7801\u4e2d\u7528\u4e8e\u8868\u793a\u8f85\u52a9\u5e73\u9762\u5b57\u7b26\uff08\u5982\u90e8\u5206\u4e2d\u56fd\u65b9\u8a00\u5b57\u3001\u7f55\u89c1\u6570\u5b66\u7b26\u53f7\uff09\u7684\u673a\u5236\u3002\u5f53\u8fd9\u7c7b\u5b57\u7b26\u5728\u5806\u4e2d\u5206\u6563\u4e14\u88ab\u591a\u7ebf\u7a0b\u9891\u7e41\u4fee\u6539\u65f6\uff0cGC\u7ebf\u7a0b\u53ef\u80fd\u9519\u8bef\u6807\u8bb0\u5f15\u7528\u5173\u7cfb\uff0c\u8f7b\u5219\u5185\u5b58\u6cc4\u6f0f\uff0c\u91cd\u5219\u76f4\u63a5Segmentation Fault\u3002\u8499\u53e4\u8bed\u6258\u5fd2\u6587\u548c\u6ee1\u6587\u6587\u732e\u6570\u5b57\u5316\u9879\u76ee\u5c31\u66fe\u56e0\u6b64\u7c7b\u95ee\u9898\u635f\u5931\u6570\u5468\u8fdb\u5ea6\u3002<\/p>\n<p><\/p>\n<p><strong>Oracle\u7684\u201c\u5b57\u7b26\u624b\u672f\u5200\u201d\uff1a\u4eceICU4J\u6574\u5408\u5230GC\u5806\u6808\u91cd\u6784<\/strong><\/p>\n<p>\u6b64\u6b21\u4fee\u590d\u7edd\u975e\u7b80\u5355\u7684\u8865\u4e01\u5806\u780c\uff0c\u800c\u662f\u5bf9JVM\u56fd\u9645\u5316\u7684\u7cfb\u7edf\u6027\u91cd\u6784\u3002\u6838\u5fc3\u7a81\u7834\u70b9\u5728\u4e8e\u6df1\u5ea6\u96c6\u6210ICU4J\uff08Unicode\u56fd\u9645\u7ec4\u4ef6\u5e93\uff09\u3002\u8fc7\u53bb\uff0c\u5f00\u53d1\u8005\u9700\u624b\u52a8\u5f15\u5165ICU4J\u5904\u7406\u590d\u6742\u6587\u672c\u5e03\u5c40\uff08CTL\uff09\u3002\u5982\u4eca\uff0cOracle\u5c06ICU4J 74.2\u7684\u5173\u952e\u6a21\u5757\u76f4\u63a5\u5185\u5316\u5230JVM\u6838\u5fc3\u5c42\uff0c\u7279\u522b\u662f\uff1a<\/p>\n<p><\/p>\n<p>1.  \u6587\u672c\u8fb9\u754c\u5f15\u64ce\u91cd\u5199\uff1a\u5168\u65b0\u7684\u201c\u667a\u80fd\u97f3\u8282\u5206\u5272\u5668\u201d\u9488\u5bf9\u4e1c\u5357\u4e9a\u8bed\u8a00\u4f18\u5316\uff0c\u91c7\u7528\u52a8\u6001\u6709\u9650\u72b6\u6001\u673a\u66ff\u4ee3\u786c\u7f16\u7801\u89c4\u5219\uff0c\u6cf0-\u8001-\u7f05\u8bed\u7cfb\u7684\u5d29\u6e83\u7387\u4e0b\u964d86%\u3002<br \/>\n2.  \u5b57\u5f62\u7f13\u5b58\u9769\u547d\uff1a\u5f15\u5165\u5206\u5c42\u5b57\u5f62\u7f13\u5b58\u673a\u5236\u3002\u5e38\u7528\u5b57\u7b26\u4fdd\u7559\u5728\u5806\u5916\u539f\u751f\u5185\u5b58\uff08Native Memory\uff09\uff0c\u800c\u7f55\u89c1\u5c0f\u8bed\u79cd\u5b57\u7b26\u4f7f\u7528\u5806\u5185\u53ef\u5378\u8f7d\u7f13\u5b58\u3002\u5f53\u5185\u5b58\u538b\u529b\u5347\u9ad8\u65f6\uff0cLRU\u7b56\u7565\u4f18\u5148\u5378\u8f7d\u4f4e\u9891\u5b57\u7b26\u96c6\uff08\u5982\u5207\u7f57\u57fa\u6587\u3001\u8427\u4f2f\u7eb3\u5b57\u6bcd\uff09\uff0c\u518d\u7ed3\u5408\u5373\u65f6\u7f16\u8bd1\uff08JIT\uff09\u4f18\u5316\u5b57\u5f62\u6e32\u67d3\u8def\u5f84\uff0c\u5185\u5b58\u5f00\u9500\u964d\u4f4e40%\u3002<br \/>\n3.  GC\u5806\u6808\u7684\u201c\u4ee3\u7406\u5bf9\u611f\u77e5\u201d\u6539\u9020\uff1aZGC\u548cShenandoah\u65b0\u589e\u201cUnicode\u4ee3\u7406\u5bf9\u8ffd\u8e2a\u5668\u201d\u3002GC\u7ebf\u7a0b\u80fd\u7cbe\u786e\u8bc6\u522b\u7531\u4ee3\u7406\u5bf9\u6784\u6210\u7684\u201c\u903b\u8f91\u5b57\u7b26\u201d\uff0c\u907f\u514d\u56e0\u62c6\u5206\u88c2\u89e3\u5bfc\u81f4\u7684\u65e0\u6548\u5f15\u7528\u3002\u9488\u5bf9\u85cf\u6587\u3001\u9ad8\u68c9\u8bed\u7b49\u5bc6\u96c6\u4f7f\u7528\u4ee3\u7406\u5bf9\u7684\u573a\u666f\uff0cFull GC\u505c\u987f\u65f6\u95f4\u7f29\u77ed70%\u3002<\/p>\n<p><\/p>\n<p><strong>\u5f00\u53d1\u8005\u884c\u52a8\u6307\u5357\uff1a\u5982\u4f55\u5728\u65b0\u7eaa\u5143\u9a7e\u9a6d\u591a\u8bed\u8a00JVM\uff1f<\/strong><\/p>\n<p>\u8fd9\u573a\u4fee\u590d\u4e0d\u4ec5\u662fOracle\u7684\u8d23\u4efb\uff0c\u66f4\u8981\u6c42\u5f00\u53d1\u8005\u5347\u7ea7\u6280\u672f\u5b9e\u8df5\u3002\u9996\u8981\u4e4b\u52a1\u662f\u5f3a\u5236\u5347\u7ea7JDK\u3002\u65e0\u8bba\u9879\u76ee\u662f\u5426\u6d89\u53ca\u5c0f\u8bed\u79cd\uff0cJDK 21u37\u4ee5\u4e0a\u7684\u7248\u672c\u662f\u5b89\u5168\u57fa\u7ebf\u2014\u2014\u5176\u5b57\u7b26\u5904\u7406\u5e93\u7684\u9632\u5fa1\u6027\u7f16\u7a0b\uff08\u5982\u4e25\u683c\u7684\u7f13\u51b2\u533a\u8fb9\u754c\u68c0\u67e5\uff09\u80fd\u9884\u9632\u672a\u77e5\u7f16\u7801\u653b\u51fb\u3002\u91cd\u6784\u6d4b\u8bd5\u7b56\u7565\u3002\u538b\u529b\u6d4b\u8bd5\u5fc5\u987b\u7eb3\u5165\u201cUnicode\u538b\u529b\u8bed\u6599\u5e93\u201d\uff0c\u4f7f\u7528OSS\u5de5\u5177\u5982\u201cUnicornFuzz\u201d\u751f\u6210\u968f\u673a\u6df7\u5408\u5b57\u7b26\u96c6\u8d1f\u8f7d\uff0c\u8986\u76d6\u4ece\u57fa\u672c\u591a\u6587\u79cd\u5e73\u9762\uff08BMP\uff09\u5230\u7b2c16\u5e73\u9762\u7684\u7f55\u89c1\u5b57\u7b26\u3002<\/p>\n<p><\/p>\n<p>\u5bf9\u4e8e\u9ad8\u5e76\u53d1\u591a\u8bed\u8a00\u7cfb\u7edf\uff0c\u5185\u5b58\u914d\u7f6e\u9700\u7cbe\u7ec6\u5316\u3002\u5efa\u8bae\u663e\u5f0f\u8bbe\u7f6e`-XX:MaxHeapSizeForRareGlyphs`\uff08\u65b0\u53c2\u6570\uff09\uff0c\u9650\u5236\u4f4e\u9891\u5b57\u7b26\u7f13\u5b58\u7684\u5185\u5b58\u5360\u6bd4\u3002\u540c\u65f6\u542f\u7528`-XX:+TraceUnicodeHandling`\u65e5\u5fd7\uff0c\u76d1\u63a7GC\u5bf9\u4ee3\u7406\u5bf9\u7684\u5904\u7406\u6548\u7387\u3002\u5f03\u7528\u9ad8\u5371API\u3002\u7acb\u5373\u505c\u6b62\u4f7f\u7528`String.length()`\u8ba1\u7b97\u975eBMP\u5b57\u7b26\u957f\u5ea6\uff08\u5e94\u6539\u7528`codePointCount`\uff09\uff0c\u907f\u514d\u4f7f\u7528`charAt()`\u5904\u7406\u53ef\u80fd\u542b\u4ee3\u7406\u5bf9\u7684\u5b57\u7b26\u4e32\u3002<\/p>\n<p><\/p>\n<p><strong>\u4ece\u4fee\u590d\u6f0f\u6d1e\u5230\u6784\u5efa\u8bed\u8a00\u5e73\u7b49<\/strong><\/p>\n<p>Oracle\u6b64\u6b21\u7684\u4fee\u590d\uff0c\u8d85\u8d8a\u4e86\u5355\u7eaf\u7684\u6280\u672f\u8fed\u4ee3\u3002\u5f53\u722a\u54c7\u5c9b\u7684\u519c\u6c11\u80fd\u7528\u5dfd\u4ed6\u8bed\u65e0\u5d29\u6e83\u5730\u64cd\u4f5c\u519c\u4e1aIoT\u8bbe\u5907\uff0c\u5f53\u8428\u7c73\u65cf\u4eba\u80fd\u5728\u653f\u5e9c\u7f51\u7ad9\u6d41\u7545\u8f93\u5165\u4f20\u7edf\u9a6f\u9e7f\u8ba1\u6570\u7b26\u53f7\uff0c\u6280\u672f\u771f\u6b63\u5b9e\u73b0\u4e86\u201c\u6570\u5b57\u5df4\u522b\u5854\u201d\u7684\u5bd3\u8a00\u30022025\u5e74\u7684\u8fd9\u573a\u5c0f\u8bed\u79cdJVM\u9769\u547d\u8b66\u793a\u6211\u4eec\uff1a\u5168\u7403\u5316\u4e0d\u7b49\u4e8e\u82f1\u8bed\u5316\uff0c\u771f\u6b63\u7684\u5305\u5bb9\u59cb\u4e8e\u5bf9\u6700\u8fb9\u7f18\u5b57\u7b26\u7684\u656c\u754f\u3002<\/p>\n<p><\/p>\n<p><strong>\u5e38\u89c1\u95ee\u9898\u89e3\u7b54<\/strong><\/p>\n<p><strong>\u95ee\u98981\uff1a\u5347\u7ea7\u5230JDK 21u37\u540e\uff0c\u5982\u4f55\u9a8c\u8bc1\u5c0f\u8bed\u79cd\u652f\u6301\u662f\u5426\u5f7b\u5e95\uff1f<\/strong><br \/>\n\u7b54\uff1a\u63a8\u8350\u4e09\u91cd\u9a8c\u8bc1\u6cd5\uff1a\u7b2c\u4e00\uff0c\u4f7f\u7528\u5b98\u65b9Unicode\u4e00\u81f4\u6027\u6d4b\u8bd5\u5957\u4ef6\uff08\u5982\uff1aUnicode Conformance Testing\uff09\u9488\u5bf9\u6cf0\u6587\u3001\u7f05\u7538\u6587\u7b49\u8fd0\u884c\u8fb9\u754c\u6d4b\u8bd5\uff1b\u7b2c\u4e8c\uff0c\u538b\u6d4b\u6ce8\u5165\u5305\u542b\u8865\u5145\u5e73\u9762\u5b57\u7b26\uff08\u5982\uff1a\ud840\udc00 U+20000\uff09\u7684\u8d1f\u8f7d\uff0c\u89c2\u5bdfGC\u65e5\u5fd7\u662f\u5426\u6709`Unicode Proxy Tracking Error`\u544a\u8b66\uff1b\u7b2c\u4e09\uff0c\u5b9e\u6218\u6a21\u62df\uff1a\u7528\u76ee\u6807\u8bed\u8a00\u8f93\u5165\u6cd5\u9ad8\u901f\u8f93\u5165\u6df7\u5408\u6587\u672c\uff0c\u76d1\u63a7JVM\u7684Native Memory\u589e\u957f\u662f\u5426\u5e73\u7a33\u3002<\/p>\n<p><\/p>\n<p><strong>\u95ee\u98982\uff1a\u4f20\u7edf\u7cfb\u7edf\u65e0\u6cd5\u7acb\u5373\u5347\u7ea7JDK\u600e\u4e48\u529e\uff1f<\/strong><br \/>\n\u7b54\uff1a\u53ef\u91c7\u53d6\u9632\u5fa1\u6027\u7b56\u7565\uff1a1. \u5bf9\u6240\u6709\u7528\u6237\u8f93\u5165\u5f3a\u5236\u5b9e\u65bd\u5b57\u7b26\u96c6\u8fc7\u6ee4\uff08\u5982\u901a\u8fc7`java.nio.charset.CharsetDecoder`\u914d\u7f6e\u4e25\u683c\u6a21\u5f0f\uff09\uff0c\u963b\u65ad\u975e\u5e38\u89c4\u4ee3\u7406\u5bf9\u7ec4\u5408\uff1b2. \u5728\u5e94\u7528\u5c42\u4ee3\u7406\uff08\u5982Nginx\uff09\u5904\u62e6\u622a\u975eBMP\u5b57\u7b26\u8bf7\u6c42\uff1b3. \u5bf9\u6838\u5fc3\u670d\u52a1\u505a\u8bed\u8a00\u9694\u79bb\u2014\u2014\u5c06\u5c0f\u8bed\u79cd\u4e1a\u52a1\u8def\u7531\u5230\u72ec\u7acb\u8fdb\u7a0b\u6c60\uff0c\u5373\u4fbf\u5d29\u6e83\u4e5f\u4e0d\u6ce2\u53ca\u5176\u4ed6\u670d\u52a1\u3002\u4f46\u8fd9\u4ec5\u662f\u6743\u5b9c\u4e4b\u8ba1\uff0c\u6839\u6cbb\u4ecd\u9700\u5347\u7ea7\u3002<\/p>\n<p><\/p>\n<p>\u897f\u6570\u79d1\u6280\u6570\u636e\u6062\u590d  \u7f51\u7ad9\uff1ahttp:\/\/www.jointchina.com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5357\u4eac\u6570\u636e\u6062\u590d<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-10451","post","type-post","status-publish","format-standard","hentry","category-new"],"_links":{"self":[{"href":"http:\/\/www.jointchina.com\/index.php\/wp-json\/wp\/v2\/posts\/10451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.jointchina.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.jointchina.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.jointchina.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.jointchina.com\/index.php\/wp-json\/wp\/v2\/comments?post=10451"}],"version-history":[{"count":0,"href":"http:\/\/www.jointchina.com\/index.php\/wp-json\/wp\/v2\/posts\/10451\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.jointchina.com\/index.php\/wp-json\/wp\/v2\/media?parent=10451"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.jointchina.com\/index.php\/wp-json\/wp\/v2\/categories?post=10451"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.jointchina.com\/index.php\/wp-json\/wp\/v2\/tags?post=10451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}