如何在高故障排除期间解释“调试数据平面 pow 性能”的输出 DP CPU
60729
Created On 12/31/18 06:45 AM - Last Modified 06/09/23 09:24 AM
Objective
这SSO(调度/同步/排序)单元是管理数据包调度和排序的数据平面的组件。 它也被称为POW(数据包/订单/工作)。 它负责根据QOS优先级和工作组。 它还维护数据包入口顺序。
A工作组是一组应用程序,每个核心都可以分配给多个工作组。 工作组用于平衡不同内核之间的处理负载。 数据包的工作组值在入口处自动设置,可以通过软件更改。
功能是由工作组中的核心执行的任务子集。
本文介绍了一些如何解释 pow 性能数据的建议。
Environment
此输出对所有人通用PAN-OS防火墙hardware或虚拟。
Procedure
的输出“调试数据平面 pow 性能”简要介绍每个工作组的使用情况,并DP最后一个采样周期的功能:
- 安排工作组和功能的次数。
- 每个工作组和功能的平均处理时间是多少微秒 (us)。
- 每个工作组和功能的最大处理时间是多少微秒 (us)。
示例输出:
第 1 栏:工作组 [或DP功能】名称
第 2 列:该工作组在上一个采样周期中的最大处理时间
第 3 列:该工作组在上一个采样周期中的平均处理时间
第 4 列:该工作组的次数 [或DP功能]被预定
工作组说明:
flow_np : Network Processor. Very first program to decide if it is slow path or fast path. flow_lookup : Responsible for existing session/flow lookup. flow_mgmt : Installation and clearing of session table. flow_fastpath : Fastpath processing of packet (Includes post slowpath processing and content inspection). flow_slowpath : Slow path processing of packet (route and policy lookup and session setup). flow_forwarding : Handles forwarding stage of packets. dfa_result : Appid signature matching module_internal : Control messages between internal components . aho_result : Threat signature matching. zip_result : Used for ZIP processing. pktlog_forwarding : Responsible for forwarding logs to MP. flow_host : Process handling packets destined to Firewall flow_ctrl : Aging sessions and handling net-messages nac_result : Analyzing result of appid signature match output
上面的输出给了我们非常必要的洞察DP.
- count 的相对值让我们了解哪个工作组或函数被调用的次数更多。
- 与 flow_fastpath 相比,一般处理 flow_slowpath 的计数会更小。如果我们从历史上比较这些数据dp显示器日志文件,我们可以看到任何特定工作组的计数是否在特定时间窗口内增加。
- 模块_内部用于控制内部组件之间的消息,例如URL查询等Amodule_internal 的高计数可能表示大量内部消息传递。
- 一般算作flow_fastpath, flow_forwarding, flow_np应该为每个中转流量调用。 所以他们的数量会比较高。
- aho_result、dfa_result、nac_result会让我们了解第 7 层的数量firewall.
- A Max Proc us 的高值很好,但是 ave 的高值。对我们不利。
NOTE:我们可以将每个工作组的 count 与 ave proc us 相乘,以了解哪个工作组使用最多CPU时间。 - 当从工作组的角度来看事情看起来很正常时DP CPU在负载下,我们应该继续检查功能以了解哪个功能正在使用多少CPU.
Additional Information
案例分析:
例如,CPU是 100%,工作组如下所示:
:group max. proc us ave. proc us count :flow_lookup 0 0 0 :flow_fastpath 122087 55 33971601 :flow_slowpath 199 72 345516 :flow_forwarding 75 2 8910565 :flow_mgmt 57 29 69 :flow_ctrl 100 6 302011 :nac_result 50 1 2015416 :flow_np 66 4 33255061 :dfa_result 21794 242 2059391 :module_internal 525 18 173530 :aho_result 119981 154 2014275 :zip_result 16771 234 197454 :pktlog_forwarding 84 7 287854 :lwm 0 0 0 :flow_host 52 11 5494
我们从上面知道 fastpath 是最高的,但是要找出哪个组件使用更多的原因CPU让我们看一下相同的功能:
:func max. proc us ave. proc us count :dfa_match 0 0 0 :policy_lookup 125 10 2239062 :user_group_policy 87 1 477903 :get_gid 41 0 1061755 :regex_lookup 6217 102 2233481 :regex_postfpga 910 16 1039761 :reg_expr_match 0 0 0 :sml_vm 208 6 31643903 :detector_run_p1 2342 34 906163 :detector_run_p2 31327 79 889286 :ssl_proxy_proc 63072 600 2500540 :ssl_encode 202 36 805522 :rsa_operation_pub_enc 766 309 6688 :rsa_operation_pub_dec 648 263 116 :rsa_operation_priv_enc 8216 8168 14362 :rsa_operation_priv_dec 8260 8178 6427 :rsa_key_gen 40126 23467 43 :rsa_RSA_sign 13840 13236 33704 :rsa_RSA_verify 963 430 71904 :ecdhe_key_gen 22925 7559 18 :ecdhe_key_gen_mul 0 0 0 :ecdhe_key_compute_mul 22121 6640 82229 :ecdhe_key_compute 22565 6856 82224 :ecdhe_generate_xchg_key 23514 7948 18 :ecdhe_gen_key_exchange_msg 22630 6949 43919 :ecdhe_get_key_exchange_msg 22656 6932 38261 :ecdhe_parse_server_key_exchange_msg 320 244 45817 :ecdhe_gen_server_key_exchange_msg 78 29 43561 :dhe_gen_para 0 0 0 :dhe_gen_key 0 0 0 :dhe_key_compute 0 0 0 :bn_mod_exp 8226 6196 27618 :cipher_enc 142 9 1956671 :zip_deflate 50 2 197543 :pktlog_log 0 0 0 :pktlog_send 0 0 0 :tunnel_encap 0 0 0 :tunnel_decap 0 0 0 :tunnel_esp 0 0 0 :tunnel_esp_decap 0 0 0 :tunnel_ah_decap 0 0 0 :tunnel_ah 0 0 0 :tunnel_fwd 0 0 0 :tunnel_prepare 0 0 0 :tunnel_post 0 0 0 :appid_result 0 0 0 :ctd_token 21789 239 2060687 :dos_update 17 0 212713 :urlcache_update 20065 178 2555 :urlcache_lookup 107402 125 540508 :urlcache_insert 0 0 0 :urlcache_delete 0 0 0 :urlcache_lru 0 0 0 :session_install 59 8 217532 :session_age 36 0 875144 :session_delete 165 11 212717 :session_purge 0 0 0 :inline_switch 0 0 0 :age_arp 20 2 595 :age_pbf_ret_mac 1 0 595 :stack_trace 0 0 0 :ctd_pw_check 0 0 0 :ctd_pw_md4 0 0 0 :ctd_pw_extract 0 0 0 :prl_rewrite 0 0 0 :pkt_rewrite 0 0 0 :vpn_send_to_client 0 0 0 :vpn_cookie_response 0 0 0 :raven_match 46 2 131751 :raven_match_header 52 2 187227 :raven_match_body 51 14 6 :raven_sig_get_action 0 0 0 :age_mfib 1 0 595
在上面,如果你将计数乘以平均时间,你可以清楚地知道什么是使用最多的CPU. 例如,见下文(仅针对最常用的函数截断输出)
:func max. proc us ave. proc us count count*avg :ssl_proxy_proc 63072 600 2500540 1500324000 :ecdhe_key_compute 22565 6856 82224 563727744 :ecdhe_key_compute_mul 22121 6640 82229 546000560 :ctd_token 21789 239 2060687 492504193 :rsa_RSA_sign 13840 13236 33704 446106144 :ecdhe_gen_key_exchange_msg 22630 6949 43919 305193131 :ecdhe_get_key_exchange_msg 22656 6932 38261 265225252 :regex_lookup 6217 102 2233481 227815062 :sml_vm 208 6 31643903 189863418 :bn_mod_exp 8226 6196 27618 171121128 :rsa_operation_priv_enc 8216 8168 14362 117308816 :detector_run_p2 31327 79 889286 70253594 :urlcache_lookup 107402 125 540508 67563500 :rsa_operation_priv_dec 8260 8178 6427 52560006 :rsa_RSA_verify 963 430 71904 30918720 :detector_run_p1 2342 34 906163 30809542 :ssl_encode 202 36 805522 28998792 :policy_lookup 125 10 2239062 22390620 :cipher_enc 142 9 1956671 17610039 :regex_postfpga 910 16 1039761 16636176 :ecdhe_parse_server_key_exchange_msg 320 244 45817 11179348
您可以看到大多数最常用的功能都与SSL解密。 因此,这让我们很好地了解要采取哪些进一步措施来缓解这种情况。