<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" 
  xmlns:content="http://purl.org/rss/1.0/modules/content/" 
  xmlns:dc="http://purl.org/dc/elements/1.1/" 
  xmlns:atom="http://www.w3.org/2005/Atom" 
  xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" 
  xmlns:media="http://search.yahoo.com/mrss/">
  <channel>
    <title>Performance on Mark 的滿紙方糖言</title>
    <link>https://blog.mygraphql.com/zh/tags/performance/</link>
    <description>Recent content in Performance on Mark 的滿紙方糖言</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh</language>
    <managingEditor>labile.zhu@gmail.com (Mark Zhu)</managingEditor>
    <webMaster>labile.zhu@gmail.com (Mark Zhu)</webMaster>
    <copyright>Mark Zhu ©2026, All Rights Reserved</copyright>
    <lastBuildDate>Wed, 29 Jun 2022 23:12:15 +0800</lastBuildDate>
    
        <atom:link href="https://blog.mygraphql.com/zh/tags/performance/index.xml" rel="self" type="application/rss+xml" />
    

      
      <item>
        <title>谁动了我的 CPU 频率 —— CPU 性能之迷 Part 2</title>
        <link>https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/</link>
        <pubDate>Wed, 29 Jun 2022 23:12:15 +0800</pubDate>
        <author>labile.zhu@gmail.com (Mark Zhu)</author>
        <atom:modified>Wed, 29 Jun 2022 23:12:15 +0800</atom:modified>
        <guid>https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/</guid>
        <description>&lt;p&gt;&lt;img src=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/index.assets/2018-02-20_2355-16564669211492.jpg&#34; alt=&#34;2018-02-20_2355&#34;&gt;&lt;/p&gt;
&lt;p&gt;目录：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#%e4%b8%ba%e4%bd%95%e6%9c%89%e6%9c%ac%e6%96%87&#34;&gt;为何有本文&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#%e4%bb%80%e4%b9%88%e6%98%af%e5%8a%a8%e6%80%81-cpu-%e9%a2%91%e7%8e%87&#34;&gt;什么是动态 CPU 频率&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#%e4%bb%80%e4%b9%88%e6%98%af-p-state&#34;&gt;什么是 p-state&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#linux-cpu-%e6%80%a7%e8%83%bd%e4%bc%b8%e7%bc%a9cpu-performance-scaling&#34;&gt;Linux CPU 性能伸缩(CPU performance scaling)&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#cpufreq-policycpu-%e9%a2%91%e7%8e%87%e7%bc%a9%e6%94%be%e7%ad%96%e7%95%a5&#34;&gt;CPUFreq Policy(CPU 频率缩放策略)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#cpufreq-policy-%e7%9a%84-sysfs-%e6%96%87%e4%bb%b6%e6%8e%a5%e5%8f%a3&#34;&gt;CPUFreq Policy 的 sysfs 文件接口&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#policy-%e9%80%9a%e7%94%a8%e5%b1%9e%e6%80%a7&#34;&gt;policy 通用属性&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#%e9%80%9a%e7%94%a8%e7%9a%84-scaling-governor&#34;&gt;通用的 Scaling Governor&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#performance---scaling-governor&#34;&gt;&lt;code&gt;performance&lt;/code&gt; - Scaling Governor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#powersave---scaling-governor&#34;&gt;&lt;code&gt;powersave&lt;/code&gt; - Scaling Governor&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#%e9%9d%9e-intel-cpu-%e7%9a%84-frequency-boost-support&#34;&gt;非 Intel CPU 的 Frequency Boost Support&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#%e9%9d%9e-intel-cpu-%e7%9a%84-boost-%e7%9a%84-sysfs-%e6%96%87%e4%bb%b6%e6%8e%a5%e5%8f%a3&#34;&gt;非 Intel CPU 的 boost 的 sysfs 文件接口&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#intel-cpu-%e7%9a%84-scaling-driver&#34;&gt;Intel CPU 的 Scaling Driver&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#%e6%93%8d%e4%bd%9c%e6%a8%a1%e5%bc%8f-operation-modes&#34;&gt;操作模式 (Operation Modes)&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#active-mode&#34;&gt;Active Mode&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#active-mode-%e4%b8%94%e5%bc%80%e5%90%af-hwp&#34;&gt;Active Mode 且开启 HWP&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#hwp--performance&#34;&gt;HWP + &lt;code&gt;performance&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#hwp--powersave&#34;&gt;HWP + &lt;code&gt;powersave&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#active-mode-%e4%b8%94%e7%a6%81%e7%94%a8-hwp&#34;&gt;Active Mode 且禁用 HWP&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#passive-mode&#34;&gt;Passive Mode&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#turbo-p-states-support&#34;&gt;Turbo P-states Support&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#sysfs-%e4%b8%ad%e7%9a%84-no_turbo-%e5%b1%9e%e6%80%a7&#34;&gt;&lt;code&gt;sysfs&lt;/code&gt; 中的 &lt;code&gt;no_turbo&lt;/code&gt; 属性&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#intel_pstate-%e7%9a%84-sysfs-%e9%85%8d%e7%bd%ae&#34;&gt;intel_pstate 的 sysfs 配置&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#global-attributes&#34;&gt;Global Attributes&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#%e5%ae%9e%e6%97%b6%e7%9b%91%e6%8e%a7-cpu-%e5%ae%9e%e9%99%85%e9%a2%91%e7%8e%87&#34;&gt;实时监控 CPU 实际频率&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#turbostat&#34;&gt;turbostat&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#cpupower&#34;&gt;cpupower&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#%e5%86%85%e6%a0%b8%e6%97%a5%e5%bf%97&#34;&gt;内核日志&lt;/a&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#hwp-%e6%98%af%e5%90%a6%e5%bc%80%e5%90%af&#34;&gt;HWP 是否开启&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://blog.mygraphql.com/zh/notes/low-tec/kernel/cpu-frequency/#%e9%9d%99%e6%80%81%e9%85%8d%e7%bd%ae&#34;&gt;静态配置&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;为何有本文&#34;&gt;为何有本文&lt;/h2&gt;
&lt;p&gt;很多人知道 CPU 频率会影响 CPU 性能，也知道频率会动态变化，且知道 Linux 有 performance/powersave 两种频率控制策略。但很少人知道背后的软件原理，更少人知道如何调优策略，和监控实际 CPU 频率。本文想聊聊这些。&lt;/p&gt;</description>
        
        <dc:creator>Mark Zhu</dc:creator>
        
        
        
        
          
            
              <category>performance</category>
            
          
            
              <category>hyper-threading</category>
            
          
            
              <category>超线程</category>
            
          
            
              <category>hardware</category>
            
          
            
              <category>动态调频</category>
            
          
            
              <category>turbo-boost</category>
            
          
            
              <category>p-state</category>
            
          
        
        
        
      </item>
      
      <item>
        <title>被误解的CPU利用率、超线程、动态调频 —— CPU 性能之迷 Part 1</title>
        <link>https://blog.mygraphql.com/zh/notes/hw/hyper-threading/</link>
        <pubDate>Sun, 26 Jun 2022 23:12:15 +0800</pubDate>
        <author>labile.zhu@gmail.com (Mark Zhu)</author>
        <atom:modified>Sun, 26 Jun 2022 23:12:15 +0800</atom:modified>
        <guid>https://blog.mygraphql.com/zh/notes/hw/hyper-threading/</guid>
        <description>&lt;p&gt;&lt;img src=&#34;https://blog.mygraphql.com/zh/notes/hw/hyper-threading/index.assets/image-20220619120147326.png&#34; alt=&#34;image-20220619120147326&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;引&#34;&gt;引&lt;/h2&gt;
&lt;p&gt;性能测试、压力测试、业务系统性能容量评估。这 3 件事，可以认为是大部分程序员/软件开发从业者都需要面对的事。但，奇怪的是，很多人花了很多时间去做完成这些&lt;strong&gt;工作任务&lt;/strong&gt;，却很少有人有计划地、系统地花时间去学习和研究相关的知识。&lt;/p&gt;</description>
        
        <dc:creator>Mark Zhu</dc:creator>
        
        
        
        
          
            
              <category>performance</category>
            
          
            
              <category>hyper-threading</category>
            
          
            
              <category>超线程</category>
            
          
            
              <category>CPU利用率</category>
            
          
            
              <category>hardware</category>
            
          
            
              <category>动态调频</category>
            
          
            
              <category>turbo-boost</category>
            
          
        
        
        
      </item>
      
      <item>
        <title>Java 容器化的历史坑（史坑） - 资源限制篇</title>
        <link>https://blog.mygraphql.com/zh/posts/cloud/containerize/java-containerize/java-containerize-resource-limit/</link>
        <pubDate>Sat, 10 Jul 2021 15:12:15 +0900</pubDate>
        <author>labile.zhu@gmail.com (Mark Zhu)</author>
        <atom:modified>Sat, 10 Jul 2021 15:12:15 +0900</atom:modified>
        <guid>https://blog.mygraphql.com/zh/posts/cloud/containerize/java-containerize/java-containerize-resource-limit/</guid>
        <description>&lt;p&gt;&lt;img src=&#34;https://blog.mygraphql.com/zh/posts/cloud/containerize/java-containerize/java-containerize-resource-limit/index.assets/head.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;由来&#34;&gt;由来&lt;/h2&gt;
&lt;p&gt;时间回到 2017 年，老东家要上 Kubernetes 了，有幸参与和学习（主要是学习）。当时遇到的一了所有 Java 容器化者都遇到的坑：JDK8 不为容器化设计综合症。最简单的例子是&lt;code&gt;Runtime.getRuntime().availableProcessors()&lt;/code&gt;返回了主机的 CPU 数，而非期望的容器自身的&lt;code&gt;cpu share/quota&lt;/code&gt;，或说 k8s 的 &lt;code&gt;cpu request/limit&lt;/code&gt;。&lt;/p&gt;</description>
        
        <dc:creator>Mark Zhu</dc:creator>
        
        
        
        
          
            
              <category>containerize</category>
            
          
            
              <category>java</category>
            
          
            
              <category>performance</category>
            
          
        
        
        
      </item>
      
      <item>
        <title>你的 Istio Mesh 性能及格吗？</title>
        <link>https://blog.mygraphql.com/zh/posts/cloud/istio/benchmark/fortio/</link>
        <pubDate>Tue, 01 Jun 2021 15:12:15 +0900</pubDate>
        <author>labile.zhu@gmail.com (Mark Zhu)</author>
        <atom:modified>Tue, 01 Jun 2021 15:12:15 +0900</atom:modified>
        <guid>https://blog.mygraphql.com/zh/posts/cloud/istio/benchmark/fortio/</guid>
        <description>&lt;p&gt;&lt;img src=&#34;https://blog.mygraphql.com/zh/posts/cloud/istio/benchmark/fortio/index.assets/image-20210601224250230.png&#34; alt=&#34;image-20210601224250230&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;前言&#34;&gt;前言&lt;/h2&gt;
&lt;p&gt;话说，一年前项目响应时代的号召，引入了 Istio，从此如刘备得卧龙、凤雏，走上了 Service Mesh 的光辉大道。现到准备益州之战(上线)之时。上线前，还得评估一下性能变化。&lt;/p&gt;</description>
        
        <dc:creator>Mark Zhu</dc:creator>
        
        
        
        
          
            
              <category>performance</category>
            
          
            
              <category>benchmark</category>
            
          
            
              <category>istio</category>
            
          
        
        
        
      </item>
      
      <item>
        <title>Benchmark Tools</title>
        <link>https://blog.mygraphql.com/zh/notes/performance/benchmarking/benchmark-tools/</link>
        <pubDate>Thu, 13 May 2021 15:12:15 +0900</pubDate>
        <author>labile.zhu@gmail.com (Mark Zhu)</author>
        <atom:modified>Thu, 13 May 2021 15:12:15 +0900</atom:modified>
        <guid>https://blog.mygraphql.com/zh/notes/performance/benchmarking/benchmark-tools/</guid>
        <description>&lt;h2 id=&#34;cpu-benchmark&#34;&gt;CPU Benchmark&lt;/h2&gt;
&lt;p&gt;The SysBench system benchmark suite has a simple CPU benchmark tool that calculates prime numbers. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# sysbench --num-threads=8 --test=cpu --cpu-max-prime=100000 run
sysbench 0.4.12:  multi-threaded system evaluation benchmark

Running the test with following options:
Number of threads: 8

Doing CPU performance benchmark

Threads started!
Done.

Maximum prime number checked in CPU test: 100000

Test execution summary:
    total time:                          30.4125s
    total number of events:              10000
    total time taken by event execution: 243.2310
    per-request statistics:
         min:                                 24.31ms
         avg:                                 24.32ms
         max:                                 32.44ms
         approx.  95 percentile:              24.32ms

Threads fairness:
    events (avg/stddev):           1250.0000/1.22
    execution time (avg/stddev):   30.4039/0.01
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This executed eight threads, with a maximum prime number of 100,000. The runtime was 30.4 s, which can be used for comparison with the results from other systems or configurations (assuming many things, such as that identical compiler options were used to build the software; see Chapter 12, Benchmarking).&lt;/p&gt;</description>
        
        <dc:creator>Mark Zhu</dc:creator>
        
        
        
        
          
            
              <category>performance</category>
            
          
            
              <category>benchmark</category>
            
          
        
        
        
      </item>
      
      <item>
        <title>Awesome load test tools</title>
        <link>https://blog.mygraphql.com/zh/notes/performance/performance-test/pt-tools/</link>
        <pubDate>Thu, 06 May 2021 15:12:15 +0900</pubDate>
        <author>labile.zhu@gmail.com (Mark Zhu)</author>
        <atom:modified>Thu, 06 May 2021 15:12:15 +0900</atom:modified>
        <guid>https://blog.mygraphql.com/zh/notes/performance/performance-test/pt-tools/</guid>
        <description>&lt;h3 id=&#34;k6&#34;&gt;k6&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/k6io/k6&#34;&gt;https://github.com/k6io/k6&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;locust&#34;&gt;Locust&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://docs.locust.io/en/stable/what-is-locust.html&#34;&gt;https://docs.locust.io/en/stable/what-is-locust.html&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;gatling&#34;&gt;gatling&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://gatling.io/docs/current/http/http_request/&#34;&gt;https://gatling.io/docs/current/http/http_request/&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;artillery&#34;&gt;artillery&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://artillery.io/docs/guides/overview/welcome.html&#34;&gt;https://artillery.io/docs/guides/overview/welcome.html&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;wrk&#34;&gt;wrk&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/wg/wrk&#34;&gt;https://github.com/wg/wrk&lt;/a&gt;&lt;/p&gt;</description>
        
        <dc:creator>Mark Zhu</dc:creator>
        
        
        
        
          
            
              <category>performance</category>
            
          
            
              <category>load test</category>
            
          
        
        
        
      </item>
      

    
  </channel>
</rss>
