blob: 91da753d5bf5ee41ecefe45ff9b958270d0687c7 [file] [log] [blame]
<!doctype html>
<html lang="zh-CN" dir="ltr" class="docs-wrapper docs-doc-page docs-version-1.10.0 plugin-docs plugin-id-default docs-doc-id-modules/tubemq/tubemq_perf_test_vs_Kafka">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v2.3.1">
<title data-rh="true">TubeMQ VS Kafka | Apache InLong</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://inlong.apache.org/zh-CN/docs/1.10.0/modules/tubemq/tubemq_perf_test_vs_Kafka"><meta data-rh="true" name="docusaurus_locale" content="zh-CN"><meta data-rh="true" name="docsearch:language" content="zh-CN"><meta data-rh="true" name="docusaurus_version" content="1.10.0"><meta data-rh="true" name="docusaurus_tag" content="docs-default-1.10.0"><meta data-rh="true" name="docsearch:version" content="1.10.0"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-1.10.0"><meta data-rh="true" property="og:title" content="TubeMQ VS Kafka | Apache InLong"><meta data-rh="true" name="description" content="1 背景"><meta data-rh="true" property="og:description" content="1 背景"><link data-rh="true" rel="icon" href="/zh-CN/img/logo.svg"><link data-rh="true" rel="canonical" href="https://inlong.apache.org/zh-CN/docs/1.10.0/modules/tubemq/tubemq_perf_test_vs_Kafka"><link data-rh="true" rel="alternate" href="https://inlong.apache.org/docs/1.10.0/modules/tubemq/tubemq_perf_test_vs_Kafka" hreflang="en"><link data-rh="true" rel="alternate" href="https://inlong.apache.org/zh-CN/docs/1.10.0/modules/tubemq/tubemq_perf_test_vs_Kafka" hreflang="zh-CN"><link data-rh="true" rel="alternate" href="https://inlong.apache.org/docs/1.10.0/modules/tubemq/tubemq_perf_test_vs_Kafka" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://YUW9QEL53E-dsn.algolia.net" crossorigin="anonymous"><link rel="alternate" type="application/rss+xml" href="/zh-CN/blog/rss.xml" title="Apache InLong RSS Feed">
<link rel="alternate" type="application/atom+xml" href="/zh-CN/blog/atom.xml" title="Apache InLong Atom Feed">
<link rel="search" type="application/opensearchdescription+xml" title="Apache InLong" href="/zh-CN/opensearch.xml">
<script src="https://www.apachecon.com/event-images/snippet.js" async></script><link rel="stylesheet" href="/zh-CN/assets/css/styles.09deabdb.css">
<link rel="preload" href="/zh-CN/assets/js/runtime~main.933f32cb.js" as="script">
<link rel="preload" href="/zh-CN/assets/js/main.32851df5.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function e(e){document.documentElement.setAttribute("data-theme",e)}var t=function(){var e=null;try{e=localStorage.getItem("theme")}catch(e){}return e}();null!==t?e(t):window.matchMedia("(prefers-color-scheme: dark)").matches?e("dark"):(window.matchMedia("(prefers-color-scheme: light)").matches,e("light"))}()</script><div id="__docusaurus">
<div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="主导航" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="切换导航栏" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/zh-CN/"><div class="navbar__logo"><img src="/zh-CN/img/logo.svg" alt="Apache" class="themedImage_ToTc themedImage--light_HNdA"><img src="/zh-CN/img/logo.svg" alt="Apache" class="themedImage_ToTc themedImage--dark_i4oU"></div><b class="navbar__title text--truncate">Apache InLong</b></a></div><div class="navbar__items navbar__items--right"><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a class="navbar__link" aria-haspopup="true" aria-expanded="false" role="button" href="/zh-CN/docs/introduction">文档</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/zh-CN/docs/next/introduction">Next</a></li><li><a class="dropdown__link" href="/zh-CN/docs/introduction">1.11.0</a></li><li><a class="dropdown__link" href="/zh-CN/docs/1.10.0/introduction">1.10.0</a></li><li><a class="dropdown__link" href="/zh-CN/docs/1.9.0/introduction">1.9.0</a></li><li><a class="dropdown__link" href="/zh-CN/docs/1.8.0/introduction">1.8.0</a></li><li><a class="dropdown__link" href="/zh-CN/versions/">All versions</a></li></ul></div><a class="navbar__item navbar__link" href="/zh-CN/downloads">下载</a><a class="navbar__item navbar__link" href="/zh-CN/community/how-to-contribute">社区</a><a class="navbar__item navbar__link" href="/zh-CN/blog">博客</a><a class="navbar__item navbar__link" href="/zh-CN/team">团队</a><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">Apache</a><ul class="dropdown__menu"><li><a href="https://www.apache.org/" target="_blank" rel="noopener noreferrer" class="dropdown__link">Apache Software Foundation</a></li><li><a href="https://www.apache.org/licenses/" target="_blank" rel="noopener noreferrer" class="dropdown__link">证书</a></li><li><a href="https://www.apache.org/events/current-event" target="_blank" rel="noopener noreferrer" class="dropdown__link">事件</a></li><li><a href="https://www.apache.org/security/" target="_blank" rel="noopener noreferrer" class="dropdown__link">安全</a></li><li><a href="https://www.apache.org/foundation/sponsorship.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">赞助</a></li><li><a href="https://www.apache.org/foundation/policies/privacy.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">Privacy</a></li><li><a href="https://www.apache.org/foundation/thanks.html" target="_blank" rel="noopener noreferrer" class="dropdown__link">致谢</a></li></ul></div><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link"><svg viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" class="iconLanguage_nlXk"><path fill="currentColor" d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path></svg>简体中文</a><ul class="dropdown__menu"><li><a href="/docs/1.10.0/modules/tubemq/tubemq_perf_test_vs_Kafka" target="_self" rel="noopener noreferrer" class="dropdown__link" lang="en">English</a></li><li><a href="/zh-CN/docs/1.10.0/modules/tubemq/tubemq_perf_test_vs_Kafka" target="_self" rel="noopener noreferrer" class="dropdown__link dropdown__link--active" lang="zh-CN">简体中文</a></li></ul></div><a href="https://github.com/apache/inlong" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="切换浅色/暗黑模式(当前为浅色模式)" aria-label="切换浅色/暗黑模式(当前为浅色模式)" aria-live="polite"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_ZlJk"><button type="button" class="DocSearch DocSearch-Button" aria-label="搜索"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">搜索</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0 docsWrapper_BCFX"><button aria-label="回到顶部" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docPage__5DB"><aside class="theme-doc-sidebar-container docSidebarContainer_b6E3"><div class="sidebarViewport_Xe31"><div class="sidebar_njMd"><nav aria-label="文档侧边栏" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/zh-CN/docs/1.10.0/introduction">简介</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.10.0/design_and_concept/basic_concept">设计和概念</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.10.0/quick_start/how_to_build">快速开始</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.10.0/deployment/standalone">安装部署</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" aria-expanded="true" href="/zh-CN/docs/1.10.0/modules/agent/overview">组件介绍</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/zh-CN/docs/1.10.0/modules/agent/overview">Agent</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/zh-CN/docs/1.10.0/modules/dataproxy/overview">DataProxy</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" aria-expanded="true" tabindex="0" href="/zh-CN/docs/1.10.0/modules/tubemq/overview">TubeMQ</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.10.0/modules/tubemq/overview">总览</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.10.0/modules/tubemq/quick_start">快速开始</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.10.0/modules/tubemq/producer_example">生产者示例</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.10.0/modules/tubemq/consumer_example">消费者示例</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-3 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/zh-CN/docs/1.10.0/modules/tubemq/tubemq-manager/overview">tubemq-manager</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.10.0/modules/tubemq/commandline_tools">命令行工具</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.10.0/modules/tubemq/client_partition_assign_introduction">客户端分区分配</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.10.0/modules/tubemq/client_rpc">客户端RPC</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.10.0/modules/tubemq/clients_java">JAVA SDK API</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.10.0/modules/tubemq/configure_introduction">配置参数</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.10.0/modules/tubemq/console_introduction">TubeMQ管控台操作指引</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.10.0/modules/tubemq/error_code">错误码定义</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.10.0/modules/tubemq/http_access_api">HTTP API介绍</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-CN/docs/1.10.0/modules/tubemq/tubemq_metrics">TubeMQ指标</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/zh-CN/docs/1.10.0/modules/tubemq/tubemq_perf_test_vs_Kafka">TubeMQ VS Kafka</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/zh-CN/docs/1.10.0/modules/sort/overview">Sort</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/zh-CN/docs/1.10.0/modules/manager/overview">Manager</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/zh-CN/docs/1.10.0/modules/dashboard/overview">Dashboard</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/zh-CN/docs/1.10.0/modules/sort-standalone/overview">Sort Standalone</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" tabindex="0" href="/zh-CN/docs/1.10.0/modules/audit/overview">Audit</a></div></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.10.0/data_node/extract_node/overview">数据节点</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.10.0/sdk/dataproxy-sdk/cpp">SDK</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.10.0/user_guide/dashboard_usage">用户指引</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.10.0/development/inlong_msg">开发指引</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-CN/docs/1.10.0/administration/user_management">Administration</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/zh-CN/docs/1.10.0/contact">联系我们</a></li></ul></nav></div></div></aside><main class="docMainContainer_gTbr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="theme-doc-version-banner alert alert--warning margin-bottom--md" role="alert"><div>This is documentation for <!-- -->Apache InLong<!-- --> <b>1.10.0</b>, which is no longer actively maintained.</div><div class="margin-top--md">For up-to-date documentation, see the <b><a href="/zh-CN/docs/modules/tubemq/tubemq_perf_test_vs_Kafka">latest version</a></b> (<!-- -->1.11.0<!-- -->).</div></div><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="页面路径"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="主页面" class="breadcrumbs__link" href="/zh-CN/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">组件介绍</span><meta itemprop="position" content="1"></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">TubeMQ</span><meta itemprop="position" content="2"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">TubeMQ VS Kafka</span><meta itemprop="position" content="3"></li></ul></nav><span class="theme-doc-version-badge badge badge--secondary">版本:1.10.0</span><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>TubeMQ VS Kafka</h1></header><h2 class="anchor anchorWithStickyNavbar_LWe7" id="1-背景">1 背景<a href="#1-背景" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h2><p>TubeMQ是腾讯大数据自研的分布式消息中间件。其系统架构思想源于<a href="http://kafka.apache.org/" target="_blank" rel="noopener noreferrer">Apache Kafka</a>。在实现上,则完全采取自适应的方式,结合实战做了很多优化及研发工作,如分区管理、分配机制和全新节点通讯流程,自主开发高性能的底层RPC通讯模块等。
这些实现使得TubeMQ在保证实时性和一致性的前提下,具有很好的健壮性及更高的吞吐能力。结合目前主流消息中间件使用情况,以Kafka为参照做性能对比测试,对比常规应用场景下两套系统性能。</p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="2-测试场景方案">2 测试场景方案<a href="#2-测试场景方案" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h2><p>如下是我们根据实际应用场景设计的测试方案:
<img loading="lazy" src="/zh-CN/assets/images/perf_scheme-5891d0d1941fd8838b5e5883961b5430.png" width="1375" height="789" class="img_ev3q"></p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="3-测试结论">3 测试结论<a href="#3-测试结论" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h2><p>用&quot;复仇者联盟&quot;里的角色来形容:</p><table><thead><tr><th align="center">角色</th><th align="center">测试场景</th><th>要点</th></tr></thead><tbody><tr><td align="center">闪电侠</td><td align="center">场景五</td><td>快 (数据生产消费时延 TubeMQ 10ms vs kafka 250ms )</td></tr><tr><td align="center">绿巨人</td><td align="center">场景三,场景四</td><td>抗击打能力 (随着topic数由100,200,到500,1000逐步增大,TubeMQ系统能力不减,吞吐量随负载的提升下降微小且能力持平 vs kafka吞吐量明显下降且不稳定;过滤消费时,TubeMQ入出流量提升直接完胜kafka的入流量下降且吞吐量下降)</td></tr><tr><td align="center">蜘蛛侠</td><td align="center">场景八</td><td>各个场景来去自如(不同机型下对比测试,TubeMQ吞吐量稳定 vs Kafka在BX1机型下性能更低的问题)</td></tr><tr><td align="center">钢铁侠</td><td align="center">场景二,场景三,场景六</td><td>自动化(系统运行中TubeMQ可以动态实时的调整系统设置、消费行为来提升系统性能)</td></tr></tbody></table><p>具体的数据分析来看:</p><ol><li>单Topic单实例配置下,TubeMQ吞吐量要远低于Kafka;单Topic多实例配置下,TubeMQ在4个实例时吞吐量追上Kafka对应5个分区配置,同时TubeMQ的吞吐量随实例数增加而增加,Kafka出现不升反降的情况;TubeMQ可以在系统运行中通过调整各项参数来动态的控制吞吐量的提升;</li><li>多Topic多实例配置下,TubeMQ吞吐量维持在一个非常稳定的范围,且资源消耗,包括文件句柄、网络连接句柄数等非常的低;Kafka吞吐量随Topic数增多呈现明显的下降趋势,且资源消耗急剧增大;在SATA盘存储条件下,随着机型的配置提升,TubeMQ吞吐量可以直接压到磁盘瓶颈,而Kafka呈现不稳定状态;在CG1机型SSD盘情况下,Kafka的吞吐量要好于TubeMQ;</li><li>在过滤消费时,TubeMQ可以极大地降低服务端的网络出流量,同时还会因过滤消费消耗的资源少于全量消费,反过来促进TubeMQ吞吐量提升;kafka无服务端过滤,出流量与全量消费一致,流量无明显的节约;</li><li>资源消耗方面各有差异:TubeMQ由于采用顺序写随机读,CPU消耗很大,Kafka采用顺序写块读,CPU消耗很小,但其他资源,如文件句柄、网络连接等消耗非常的大。在实际的SAAS模式下的运营环境里,Kafka会因为zookeeper依赖出现系统瓶颈,会因生产、消费、Broker众多,受限制的地方会更多,比如文件句柄、网络连接数等,资源消耗会更大;</li></ol><h2 class="anchor anchorWithStickyNavbar_LWe7" id="4-测试环境及配置">4 测试环境及配置<a href="#4-测试环境及配置" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="41-软件版本及部署环境">4.1 【软件版本及部署环境】<a href="#41-软件版本及部署环境" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h3><table><thead><tr><th align="center"><strong>角色</strong></th><th><strong>TubeMQ</strong></th><th><strong>Kafka</strong></th></tr></thead><tbody><tr><td align="center"><strong>软件版本</strong></td><td>tubemq-3.8.0</td><td>Kafka<!-- -->_<!-- -->2.11-0.10.2.0</td></tr><tr><td align="center"><strong>zookeeper部署</strong></td><td>与Broker不在同一台机器上,单机</td><td>与Broker配置不在同一台机器,单机</td></tr><tr><td align="center"><strong>Broker部署</strong></td><td>单机</td><td>单机</td></tr><tr><td align="center"><strong>Master部署</strong></td><td>与Broker不在同一台机器上,单机</td><td>不涉及</td></tr><tr><td align="center"><strong>Producer</strong></td><td>1台M10 + 1台CG1</td><td>1台M10 + 1台CG1</td></tr><tr><td align="center"><strong>Consumer</strong></td><td>6台TS50万兆机</td><td>6台TS50万兆机</td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="42-broker硬件机型配置">4.2 【Broker硬件机型配置】<a href="#42-broker硬件机型配置" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h3><table><thead><tr><th align="center"><strong>机型</strong></th><th>配置</th><th><strong>备注</strong></th></tr></thead><tbody><tr><td align="center"><strong>TS60</strong></td><td>(E5-2620v3<!-- -->*<!-- -->2/16G<!-- -->*<!-- -->4/SATA3-2T<!-- -->*<!-- -->12/SataSSD-80G<!-- -->*<!-- -->1/10GE<!-- -->*<!-- -->2) Pcs</td><td>若未作说明,默认都是在TS60机型上进行测试对比</td></tr><tr><td align="center"><strong>BX1-10G</strong></td><td>SA5212M5(6133<!-- -->*<!-- -->2/16G<!-- -->*<!-- -->16/4T<!-- -->*<!-- -->12/10GE<!-- -->*<!-- -->2) Pcs</td><td></td></tr><tr><td align="center"><strong>CG1-10G</strong></td><td>CG1-10G<!-- -->_<!-- -->6.0.2.12<!-- -->_<!-- -->RM760-FX(6133<!-- -->*<!-- -->2/16G<!-- -->*<!-- -->16/5200-480G<!-- -->*<!-- -->6 RAID/10GE<!-- -->*<!-- -->2)-ODM Pcs</td><td></td></tr></tbody></table><h3 class="anchor anchorWithStickyNavbar_LWe7" id="43-broker系统配置">4.3 【Broker系统配置】<a href="#43-broker系统配置" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h3><table><thead><tr><th align="center"><strong>配置项</strong></th><th><strong>TubeMQ Broker</strong></th><th><strong>Kafka Broker</strong></th></tr></thead><tbody><tr><td align="center"><strong>日志存储</strong></td><td>Raid10处理后的SATA盘或SSD盘</td><td>Raid10处理后的SATA盘或SSD盘</td></tr><tr><td align="center"><strong>启动参数</strong></td><td>BROKER_JVM_ARGS=&quot;-Dcom.sun.management.jmxremote -server -Xmx24g -Xmn8g -XX:SurvivorRatio=6 -XX:+UseMembar -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+CMSScavengeBeforeRemark -XX:ParallelCMSThreads=4 -XX:+UseCMSCompactAtFullCollection -verbose:gc -Xloggc:$BASE_DIR/logs/gc.log.<code>date +%Y-%m-%d-%H-%M-%S</code> -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+CMSClassUnloadingEnabled -XX:CMSInitiatingOccupancyFraction=75 -XX:CMSFullGCsBeforeCompaction=1 -Dsun.net.inetaddr.ttl=3 -Dsun.net.inetaddr.negative.ttl=1 -Dtubemq.fast_boot=false -Dtubemq.home=$tubemq_home -cp $CLASSPATH&quot;</td><td>KAFKA_HEAP_OPTS=&quot;-Xms24g -Xmx24g -XX:PermSize=48m -XX:MaxPermSize=48m -XX:+UseG1GC -XX:MaxGCPauseMillis=20 -XX:InitiatingHeapOccupancyPercent=35</td></tr><tr><td align="center"><strong>配置文件</strong></td><td>在tubemq-3.8.0版本broker.ini配置文件上改动: consumerRegTimeoutMs=35000<br>tcpWriteServiceThread=50<br>tcpReadServiceThread=50<br>primaryPath为SATA盘日志目录</td><td>kafka_2.11-0.10.2.0版本server.properties配置文件上改动:<br>log.flush.interval.messages=5000<br>log.flush.interval.ms=10000<br>log.dirs为SATA盘日志目录<br>socket.send.buffer.bytes=1024000<br>socket.receive.buffer.bytes=1024000<br>socket.request.max.bytes=2147483600<br>log.segment.bytes=1073741824<br>num.network.threads=25<br>num.io.threads=48<br>log.retention.hours=5</td></tr><tr><td align="center"><strong>其它</strong></td><td>除测试用例里特别指定,每个topic创建时设置:<br>memCacheMsgSizeInMB=5<br>memCacheFlushIntvl=20000<br>memCacheMsgCntInK=10 <br>unflushThreshold=5000<br>unflushInterval=10000<br>unFlushDataHold=5000</td><td>客户端代码里设置:<br>生产端:<br>props.put(&quot;key.serializer&quot;, &quot;org.apache.kafka.common.serialization.StringSerializer&quot;);<br>props.put(&quot;value.serializer&quot;, &quot;org.apache.kafka.common.serialization.StringSerializer&quot;);<br>props.put(&quot;linger.ms&quot;, &quot;200&quot;);<br>props.put(&quot;block.on.buffer.full&quot;, false);<br>props.put(&quot;max.block.ms&quot;, &quot;10&quot;);<br>props.put(&quot;batch.size&quot;, 50000);<br>props.put(&quot;buffer.memory&quot;, 1073741824 );<br>props.put(&quot;metadata.fetch.timeout.ms&quot;, 30000);<br>props.put(&quot;metadata.max.age.ms&quot;, 1000000);<br>props.put(&quot;request.timeout.ms&quot;, 1000000);<br>消费端:<br>props.put(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG, &quot;30000&quot;); <br>props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, &quot;org.apache.kafka.common.serialization.StringDeserializer&quot;);<br>props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, &quot;org.apache.kafka.common.serialization.StringDeserializer&quot;);<br>props.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, true/false);<br>props.put(ConsumerConfig.AUTO_COMMIT_INTERVAL_MS_CONFIG, &quot;10000&quot;);</td></tr></tbody></table><h2 class="anchor anchorWithStickyNavbar_LWe7" id="5-测试场景及结论">5 测试场景及结论<a href="#5-测试场景及结论" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="51-场景一基础场景单topic情况一入两出模型分别使用不同的消费模式不同大小的消息包分区逐步做横向扩展对比tubemq和kafka性能">5.1 场景一:基础场景,单topic情况,一入两出模型,分别使用不同的消费模式、不同大小的消息包,分区逐步做横向扩展,对比TubeMQ和Kafka性能<a href="#51-场景一基础场景单topic情况一入两出模型分别使用不同的消费模式不同大小的消息包分区逐步做横向扩展对比tubemq和kafka性能" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h3><p> <img loading="lazy" src="/zh-CN/assets/images/perf_scenario_1-d1251ed947b865d18b31f44f398acbe4.png" width="1262" height="216" class="img_ev3q"></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="511-结论">5.1.1 【结论】<a href="#511-结论" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><p>在单topic不同分区的情况下:</p><ol><li>TubeMQ吞吐量不随分区变化而变化,同时TubeMQ属于顺序写随机读模式,单实例情况下吞吐量要低于Kafka,CPU要高于Kafka;</li><li>Kafka随着分区增多吞吐量略有下降,CPU使用率很低;</li><li>TubeMQ分区由于是逻辑分区,增加分区不影响吞吐量;Kafka分区为物理文件的增加,但增加分区入出流量反而会下降;</li></ol><p>####5.1.2 【指标】
<img loading="lazy" src="/zh-CN/assets/images/perf_scenario_1_index-ea628ceea163215f8fc98999d789279f.png" width="1266" height="576" class="img_ev3q"></p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="52-场景二单topic情况一入两出模型固定消费包大小横向扩展实例数对比tubemq和kafka性能情况">5.2 场景二:单topic情况,一入两出模型,固定消费包大小,横向扩展实例数,对比TubeMQ和Kafka性能情况<a href="#52-场景二单topic情况一入两出模型固定消费包大小横向扩展实例数对比tubemq和kafka性能情况" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h3><p> <img loading="lazy" src="/zh-CN/assets/images/perf_scenario_2-4a1a57e5bfe93bbd22a7baca30369088.png" width="1254" height="156" class="img_ev3q"></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="521-结论">5.2.1 【结论】<a href="#521-结论" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><p>从场景一和场景二的测试数据结合来看:</p><ol><li>TubeMQ随着实例数增多,吞吐量增长,在4个实例的时候吞吐量与Kafka持平,磁盘IO使用率比Kafka低,CPU使用率比Kafka高;</li><li>TubeMQ的消费方式影响到系统的吞吐量,内存读取模式(301)性能低于文件读取模式(101),但能降低消息的时延;</li><li>Kafka随分区实例数增多,没有如期提升系统吞吐量;</li><li>TubeMQ按照Kafka等同的增加实例(物理文件)后,吞吐量量随之提升,在4个实例的时候测试效果达到并超过Kafka
5个分区的状态;TubeMQ可以根据业务或者系统配置需要,调整数据读取方式,可以动态提升系统的吞吐量;Kafka随着分区增加,入流量有下降;</li></ol><h4 class="anchor anchorWithStickyNavbar_LWe7" id="522-指标">5.2.2 【指标】<a href="#522-指标" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><p><strong>注1 :</strong> 如下场景中,均为单Topic测试下不同分区或实例、不同读取模式场景下的测试,单条消息包长均为1K;</p><p><strong>注2 :</strong>
读取模式通过admin<!-- -->_<!-- -->upd<!-- -->_<!-- -->def<!-- -->_<!-- -->flow<!-- -->_<!-- -->control<!-- -->_<!-- -->rule设置qryPriorityId为对应值.
<img loading="lazy" src="/zh-CN/assets/images/perf_scenario_2_index-c704f7b90cebbed8902c727a4f409a4e.png" width="1230" height="392" class="img_ev3q"></p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="53-场景三多topic场景固定消息包大小实例及分区数考察1002005001000个topic场景下tubemq和kafka性能情况">5.3 场景三:多topic场景,固定消息包大小、实例及分区数,考察100、200、500、1000个topic场景下TubeMQ和Kafka性能情况<a href="#53-场景三多topic场景固定消息包大小实例及分区数考察1002005001000个topic场景下tubemq和kafka性能情况" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h3><p> <img loading="lazy" src="/zh-CN/assets/images/perf_scenario_3-d44a94956ed71a35969b898f8c060bd6.png" width="1280" height="184" class="img_ev3q"></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="531-结论">5.3.1 【结论】<a href="#531-结论" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><p>按照多Topic场景下测试:</p><ol><li>TubeMQ随着Topic数增加,生产和消费性能维持在一个均线上,没有特别大的流量波动,占用的文件句柄、内存量、网络连接数不多(1k
topic下文件句柄约7500个,网络连接150个),但CPU占用比较大;</li><li>TubeMQ通过调整消费方式由内存消费转为文件消费方式后,吞吐量有比较大的增长,CPU占用率有下降,对不同性能要求的业务可以进行区别服务;</li><li>Kafka随着Topic数的增加,吞吐量有明显的下降,同时Kafka流量波动较为剧烈,长时间运行存消费滞后,以及吞吐量明显下降的趋势,以及内存、文件句柄、网络连接数量非常大(在1K
Topic配置时,网络连接达到了1.2W,文件句柄达到了4.5W)等问题;</li><li>数据对比来看,TubeMQ相比Kafka运行更稳定,吞吐量以稳定形势呈现,长时间跑吞吐量不下降,资源占用少,但CPU的占用需要后续版本解决;</li></ol><h4 class="anchor anchorWithStickyNavbar_LWe7" id="532-指标">5.3.2 【指标】<a href="#532-指标" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><p><strong>注:</strong> 如下场景中,包长均为1K,分区数均为10。
<img loading="lazy" src="/zh-CN/assets/images/perf_scenario_3_index-5e779cbf395ed76341b6f1f5c83dce43.png" width="1304" height="442" class="img_ev3q"></p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="54-场景四100个topic一入一全量出五份部分过滤出一份全量topic的pull消费过滤消费采用5个不同的消费组从同样的20个topic中过滤出10消息内容">5.4 场景四:100个topic,一入一全量出五份部分过滤出:一份全量Topic的Pull消费;过滤消费采用5个不同的消费组,从同样的20个Topic中过滤出10%消息内容<a href="#54-场景四100个topic一入一全量出五份部分过滤出一份全量topic的pull消费过滤消费采用5个不同的消费组从同样的20个topic中过滤出10消息内容" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h3><h4 class="anchor anchorWithStickyNavbar_LWe7" id="541-结论">5.4.1 【结论】<a href="#541-结论" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><ol><li>TubeMQ采用服务端过滤的模式,出流量指标与入流量存在明显差异;</li><li>TubeMQ服务端过滤提供了更多的资源给到生产,生产性能比非过滤情况有提升;</li><li>Kafka采用客户端过滤模式,入流量没有提升,出流量差不多是入流量的2倍,同时入出流量不稳定;</li></ol><h4 class="anchor anchorWithStickyNavbar_LWe7" id="542-指标">5.4.2 【指标】<a href="#542-指标" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><p><strong>注:</strong> 如下场景中,topic为100,包长均为1K,分区数均为10
<img loading="lazy" src="/zh-CN/assets/images/perf_scenario_4_index-0d5bb2ad4c8a241281b1b7fe2f42a3e1.png" width="1272" height="372" class="img_ev3q"></p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="55-场景五tubemqkafka数据消费时延比对">5.5 场景五:TubeMQ、Kafka数据消费时延比对<a href="#55-场景五tubemqkafka数据消费时延比对" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h3><table><thead><tr><th>类型</th><th>时延</th><th>Ping时延</th></tr></thead><tbody><tr><td>TubeMQ</td><td>90%数据在10ms±</td><td>C-&gt;B:0.05ms ~ 0.13ms, P-&gt;B:2.40ms ~ 2.42ms</td></tr><tr><td>Kafka</td><td>90%集中在250ms±</td><td>C-&gt;B:0.05ms ~ 0.07ms, P-<!-- -->&gt;<!-- -->B:2.95ms <!-- -->~<!-- --> 2.96ms</td></tr></tbody></table><p>备注:TubeMQ的消费端存在一个等待队列处理消息追平生产时的数据未找到的情况,缺省有200ms的等待时延。测试该项时,TubeMQ消费端要调整拉取时延(ConsumerConfig.setMsgNotFoundWaitPeriodMs())为10ms,或者设置频控策略为10ms。</p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="56-场景六调整topic配置的内存缓存大小memcachemsgsizeinmb对吞吐量的影响">5.6 场景六:调整Topic配置的内存缓存大小(memCacheMsgSizeInMB)对吞吐量的影响<a href="#56-场景六调整topic配置的内存缓存大小memcachemsgsizeinmb对吞吐量的影响" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h3><h4 class="anchor anchorWithStickyNavbar_LWe7" id="561-结论">5.6.1 【结论】<a href="#561-结论" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><ol><li>TubeMQ调整Topic的内存缓存大小能对吞吐量形成正面影响,实际使用时可以根据机器情况合理调整;</li><li>从实际使用情况看,内存大小设置并不是越大越好,需要合理设置该值;</li></ol><h4 class="anchor anchorWithStickyNavbar_LWe7" id="562-指标">5.6.2 【指标】<a href="#562-指标" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><p> <strong>注:</strong> 如下场景中,消费方式均为读取内存(301)的PULL消费,单条消息包长均为1K
<img loading="lazy" src="/zh-CN/assets/images/perf_scenario_6_index-299d765ac2d0fe177e1d3bd625287af0.png" width="1302" height="270" class="img_ev3q"></p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="57-场景七消费严重滞后情况下两系统的表现">5.7 场景七:消费严重滞后情况下两系统的表现<a href="#57-场景七消费严重滞后情况下两系统的表现" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h3><h4 class="anchor anchorWithStickyNavbar_LWe7" id="571-结论">5.7.1 【结论】<a href="#571-结论" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><ol><li>消费严重滞后情况下,TubeMQ和Kafka都会因磁盘IO飙升使得生产消费受阻;</li><li>在带SSD系统里,TubeMQ可以通过SSD转存储消费来换取部分生产和消费入流量;</li><li>按照版本计划,目前TubeMQ的SSD消费转存储特性不是最终实现,后续版本中将进一步改进,使其达到最合适的运行方式;</li></ol><h4 class="anchor anchorWithStickyNavbar_LWe7" id="572-指标">5.7.2 【指标】<a href="#572-指标" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><p> <img loading="lazy" src="/zh-CN/assets/images/perf_scenario_7-c46e3a1d6d6591c1f0728d16bfbfabdd.png" width="1479" height="706" class="img_ev3q"></p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="58-场景八评估多机型情况下两系统的表现">5.8 场景八:评估多机型情况下两系统的表现<a href="#58-场景八评估多机型情况下两系统的表现" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h3><p> <img loading="lazy" src="/zh-CN/assets/images/perf_scenario_8-f47ed2cb931218a3072e6010e1d192bd.png" width="1416" height="116" class="img_ev3q"></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="581结论">5.8.1【结论】<a href="#581结论" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><ol><li>TubeMQ在BX1机型下较TS60机型有更高的吞吐量,同时因IO util达到瓶颈无法再提升,吞吐量在CG1机型下又较BX1达到更高的指标值;</li><li>Kafka在BX1机型下系统吞吐量不稳定,且较TS60下测试的要低,在CG1机型下系统吞吐量达到最高,万兆网卡跑满;</li><li>在SATA盘存储条件下,TubeMQ性能指标随着硬件配置的改善有明显的提升;Kafka性能指标随硬件机型的改善存在不升反降的情况;</li><li>在SSD盘存储条件下,Kafka性能指标达到最好,TubeMQ指标不及Kafka;</li><li>CG1机型数据存储盘较小(仅2.2T),RAID 10配置下90分钟以内磁盘即被写满,无法测试两系统长时间运行情况。</li></ol><h4 class="anchor anchorWithStickyNavbar_LWe7" id="582-指标">5.8.2 【指标】<a href="#582-指标" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><p><strong>注1:</strong> 如下场景Topic数均配置500个topic,10个分区,消息包大小为1K字节;</p><p><strong>注2:</strong> TubeMQ采用的是301内存读取模式消费;
<img loading="lazy" src="/zh-CN/assets/images/perf_scenario_8_index-db4e624b7ce3f48501d45a96f41b86cf.png" width="1022" height="242" class="img_ev3q"></p><h2 class="anchor anchorWithStickyNavbar_LWe7" id="6-附录">6 附录<a href="#6-附录" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="61-附录1-不同机型下资源占用情况图">6.1 附录1 不同机型下资源占用情况图:<a href="#61-附录1-不同机型下资源占用情况图" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h3><h4 class="anchor anchorWithStickyNavbar_LWe7" id="611-bx1机型测试">6.1.1 【BX1机型测试】<a href="#611-bx1机型测试" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><p><img loading="lazy" src="/zh-CN/assets/images/perf_appendix_1_bx1_1-2569bf69ff5bc660661e354ada7c30a0.png" width="793" height="283" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_1_bx1_2-a99a18e0aec82cb1b27d63f7b35016b1.png" width="789" height="281" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_1_bx1_3-9f41ba75bfea06d9c5d13be7ea65a3b8.png" width="791" height="266" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_1_bx1_4-cb0135eb550f26c0b12b7767a6455690.png" width="791" height="262" class="img_ev3q"></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="612-cg1机型测试">6.1.2 【CG1机型测试】<a href="#612-cg1机型测试" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><p><img loading="lazy" src="/zh-CN/assets/images/perf_appendix_1_cg1_1-816e49626e8c00fc5fb81d9401d2d166.png" width="1226" height="404" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_1_cg1_2-018b101b947eb70b924455162d341e7a.png" width="1212" height="414" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_1_cg1_3-d293633615408f445546a8729a1b2e76.png" width="777" height="275" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_1_cg1_4-889b8b22b29b5f238d5e8708cded2ba7.png" width="791" height="275" class="img_ev3q"></p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="62-附录2-多topic测试时的资源占用情况图">6.2 附录2 多Topic测试时的资源占用情况图:<a href="#62-附录2-多topic测试时的资源占用情况图" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h3><h4 class="anchor anchorWithStickyNavbar_LWe7" id="621-100个topic">6.2.1 【100个topic】<a href="#621-100个topic" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><p><img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_100_1-e9529684389a1a1ed8a82327cc131031.png" width="791" height="258" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_100_2-779c578376c46cba5aa35486de2d04a1.png" width="793" height="260" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_100_3-81b2240434b1e09a9b5a8269ae6875d3.png" width="791" height="262" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_100_4-1692e86ee3fdeb6c9efa128b1de9682d.png" width="795" height="262" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_100_5-3d2289d05c837a697da821d144f4c7e2.png" width="781" height="258" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_100_6-4ad23b2f655faece485dde80e75a305a.png" width="785" height="260" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_100_7-69303e0b51eb9b60ce7323901a7ddb37.png" width="783" height="256" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_100_8-d59956c71c05b2f2794cbe7a80c47729.png" width="789" height="258" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_100_9-27be3ec8731f4f9db842f005508d18db.png" width="785" height="260" class="img_ev3q"></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="622-200个topic">6.2.2 【200个topic】<a href="#622-200个topic" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><p><img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_200_1-5dc4f7f5ad0ed34af6fe8d13b25c076a.png" width="777" height="254" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_200_2-60b77f89edbe4e2e86fd74f3dd01e961.png" width="775" height="254" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_200_3-105c9f9374062031fb9b0cb420215a35.png" width="779" height="256" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_200_4-29d9f00f5ca13d4a0b7a1c8f432cde1c.png" width="779" height="256" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_200_5-a993693e37187dc59b6968cda1ec7707.png" width="779" height="256" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_200_6-ac481d7c3c44120233f24a5e32c3c604.png" width="781" height="256" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_200_7-4fa33cbb903722f864270c73f94069dd.png" width="777" height="254" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_200_8-1bcda1b61732b473eaad79e6fed04be8.png" width="779" height="252" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_200_9-1c88286d4d391537b06ee301f3bcdaf8.png" width="783" height="256" class="img_ev3q"></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="623-500个topic">6.2.3 【500个topic】<a href="#623-500个topic" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><p><img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_500_1-bd738111f6384cee823eaecd0ecfc989.png" width="779" height="256" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_500_2-9c640d48c3bb17761d64605bb7234cff.png" width="783" height="258" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_500_3-90effa18711727a006173ce84e2d9319.png" width="779" height="254" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_500_4-85ff48098c98820c28efb8941800960e.png" width="785" height="258" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_500_5-77b80f60ce13afa28791c7fc6c645642.png" width="779" height="256" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_500_6-1f35e03545b9318e8db98d72d1631025.png" width="785" height="258" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_500_7-771b417d4b51bde730ff8c2e054decc6.png" width="781" height="258" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_500_8-7bcd4a002127cf4bfb3d80a000bd9c3d.png" width="785" height="258" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_500_9-af5076488ae5d9a19cdd9c6d297fa124.png" width="781" height="256" class="img_ev3q"></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="624-1000个topic">6.2.4 【1000个topic】<a href="#624-1000个topic" class="hash-link" aria-label="Direct link to heading" title="Direct link to heading"></a></h4><p><img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_1000_1-1ca03ac889455e743218a39275eaf3a5.png" width="781" height="256" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_1000_2-da82ae78bad8b756ce7c4c0a40a5db13.png" width="777" height="258" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_1000_3-f973676d2b7473cba9eaddd99bfaaa2f.png" width="781" height="258" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_1000_4-a49a4c06f83335cbf25cccb34ad62174.png" width="781" height="256" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_1000_5-08c68e9947e31aafc0d11590518a10fa.png" width="781" height="256" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_1000_6-8cf474f484f303e2b7d29fb1c85df6c7.png" width="781" height="256" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_1000_7-3ed1c7626a8fbc622d0153960500bd32.png" width="783" height="256" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_1000_8-f4a78c6fe32dbd576eecf35ff707d24c.png" width="785" height="258" class="img_ev3q">
<img loading="lazy" src="/zh-CN/assets/images/perf_appendix_2_topic_1000_9-348080291e8b178ee5086daef9e8256b.png" width="781" height="256" class="img_ev3q"></p><hr><a href="#top">Back to top</a></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/apache/inlong-website/edit/master/versioned_docs/version-1.10.0/modules/tubemq/tubemq_perf_test_vs_Kafka.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_Z9Sw" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>Edit this page</a></div><div class="col lastUpdated_vwxv"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="Docs pages navigation"><a class="pagination-nav__link pagination-nav__link--prev" href="/zh-CN/docs/1.10.0/modules/tubemq/tubemq_metrics"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">TubeMQ指标</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/zh-CN/docs/1.10.0/modules/sort/overview"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">总览</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#1-背景" class="table-of-contents__link toc-highlight">1 背景</a></li><li><a href="#2-测试场景方案" class="table-of-contents__link toc-highlight">2 测试场景方案</a></li><li><a href="#3-测试结论" class="table-of-contents__link toc-highlight">3 测试结论</a></li><li><a href="#4-测试环境及配置" class="table-of-contents__link toc-highlight">4 测试环境及配置</a><ul><li><a href="#41-软件版本及部署环境" class="table-of-contents__link toc-highlight">4.1 【软件版本及部署环境】</a></li><li><a href="#42-broker硬件机型配置" class="table-of-contents__link toc-highlight">4.2 【Broker硬件机型配置】</a></li><li><a href="#43-broker系统配置" class="table-of-contents__link toc-highlight">4.3 【Broker系统配置】</a></li></ul></li><li><a href="#5-测试场景及结论" class="table-of-contents__link toc-highlight">5 测试场景及结论</a><ul><li><a href="#51-场景一基础场景单topic情况一入两出模型分别使用不同的消费模式不同大小的消息包分区逐步做横向扩展对比tubemq和kafka性能" class="table-of-contents__link toc-highlight">5.1 场景一:基础场景,单topic情况,一入两出模型,分别使用不同的消费模式、不同大小的消息包,分区逐步做横向扩展,对比TubeMQ和Kafka性能</a></li><li><a href="#52-场景二单topic情况一入两出模型固定消费包大小横向扩展实例数对比tubemq和kafka性能情况" class="table-of-contents__link toc-highlight">5.2 场景二:单topic情况,一入两出模型,固定消费包大小,横向扩展实例数,对比TubeMQ和Kafka性能情况</a></li><li><a href="#53-场景三多topic场景固定消息包大小实例及分区数考察1002005001000个topic场景下tubemq和kafka性能情况" class="table-of-contents__link toc-highlight">5.3 场景三:多topic场景,固定消息包大小、实例及分区数,考察100、200、500、1000个topic场景下TubeMQ和Kafka性能情况</a></li><li><a href="#54-场景四100个topic一入一全量出五份部分过滤出一份全量topic的pull消费过滤消费采用5个不同的消费组从同样的20个topic中过滤出10消息内容" class="table-of-contents__link toc-highlight">5.4 场景四:100个topic,一入一全量出五份部分过滤出:一份全量Topic的Pull消费;过滤消费采用5个不同的消费组,从同样的20个Topic中过滤出10%消息内容</a></li><li><a href="#55-场景五tubemqkafka数据消费时延比对" class="table-of-contents__link toc-highlight">5.5 场景五:TubeMQ、Kafka数据消费时延比对</a></li><li><a href="#56-场景六调整topic配置的内存缓存大小memcachemsgsizeinmb对吞吐量的影响" class="table-of-contents__link toc-highlight">5.6 场景六:调整Topic配置的内存缓存大小(memCacheMsgSizeInMB)对吞吐量的影响</a></li><li><a href="#57-场景七消费严重滞后情况下两系统的表现" class="table-of-contents__link toc-highlight">5.7 场景七:消费严重滞后情况下两系统的表现</a></li><li><a href="#58-场景八评估多机型情况下两系统的表现" class="table-of-contents__link toc-highlight">5.8 场景八:评估多机型情况下两系统的表现</a></li></ul></li><li><a href="#6-附录" class="table-of-contents__link toc-highlight">6 附录</a><ul><li><a href="#61-附录1-不同机型下资源占用情况图" class="table-of-contents__link toc-highlight">6.1 附录1 不同机型下资源占用情况图:</a></li><li><a href="#62-附录2-多topic测试时的资源占用情况图" class="table-of-contents__link toc-highlight">6.2 附录2 多Topic测试时的资源占用情况图:</a></li></ul></li></ul></div></div></div></div></main></div></div><footer class="footer"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">事件</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://www.apachecon.com/" target="_blank" rel="noopener noreferrer" class="footer__link-item">ApacheCon<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a class="acevent" data-format="square" data-mode="dark" data-event="random"></a></li></ul></div><div class="col footer__col"><div class="footer__title">社区</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://twitter.com/ApacheInlong" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="https://inlong.apache.org/img/apache-inlong-wechat.jpg" target="_blank" rel="noopener noreferrer" class="footer__link-item">WeChat<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a href="mailto:dev@inlong.apache.org" target="_blank" rel="noopener noreferrer" class="footer__link-item">Email</a></li></ul></div><div class="col footer__col"><div class="footer__title">更多</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/zh-CN/blog">Blog</a></li><li class="footer__item"><a href="https://github.com/apache/inlong" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li></ul></div></div><div class="footer__bottom text--center"><div class="margin-bottom--sm"><img src="/zh-CN/img/asf_logo.svg" alt="Apache InLong" class="themedImage_ToTc themedImage--light_HNdA footer__logo"><img src="/zh-CN/img/asf_logo.svg" alt="Apache InLong" class="themedImage_ToTc themedImage--dark_i4oU footer__logo"></div><div class="footer__copyright"><div style="font-family: Avenir-Medium;font-size: 14px;color: #999;">
<div>Copyright © 2020-2024 The Apache Software Foundation. Licensed under the Apache License, Version 2.0.</div>
<div style="margin-top: 20px; padding-top: 20px; border-top: 1px solid #666;line-height: 20px;">The Apache Software Foundation Apache InLong, InLong, Apache, the Apache feather, and the Apache InLong project logo are either registered trademarks or trademarks of the Apache Software Foundation.</div>
</div></div></div></div></footer></div>
<script src="/zh-CN/assets/js/runtime~main.933f32cb.js"></script>
<script src="/zh-CN/assets/js/main.32851df5.js"></script>
</body>
</html>