{"id":89,"date":"2016-11-03T11:51:31","date_gmt":"2016-11-03T11:51:31","guid":{"rendered":"http:\/\/www.luo666.com\/?p=89"},"modified":"2019-01-19T04:45:15","modified_gmt":"2019-01-19T04:45:15","slug":"pause-loop-exiting-ple-gap-for-kvm-performance-tunning","status":"publish","type":"post","link":"http:\/\/www.luo666.com\/?p=89","title":{"rendered":"pause loop exiting &#038; ple gap for KVM performance tunning"},"content":{"rendered":"<p>A system feature called Pause-Loop Exiting can cause instability and performance degradation on a virtualized system that will have a web server running in a heavily utilized guest. Turn it off by setting the ple_gap module parameter to 0 for kvm_intel.<\/p>\n<hr \/>\n<div>Example: Add file kvmopts.conf to \/etc\/modprobe.d\/ with contents:<\/div>\n<div>\u00a0options kvm_intel ple_gap=0<\/div>\n<div>Restart the kvm_intel module if it is already running.<\/div>\n<div>\u00a0# modprobe -r kvm_intel<\/div>\n<div>\u00a0# modprobe kvm_intel<\/div>\n<div><\/div>\n<div>or<\/div>\n<div><\/div>\n<div>insmod kvm-intel ple_gap=0<\/div>\n<div>\n<hr \/>\n<\/div>\n<div><\/div>\n<div><strong>From Intel spec:<\/strong><\/div>\n<div><\/div>\n<div>If the \u201cPAUSE exiting\u201d VM-execution control is 0 and the \u201cPAUSE-loop exiting\u201d VM-execution control is 1, the following treatment applies.<\/div>\n<div><\/div>\n<div>The processor determines the amount of time between this execution of PAUSE and the previous<\/div>\n<div>execution of PAUSE at CPL 0. If this amount of time exceeds the value of the VM-execution control field<\/div>\n<div>PLE_Gap, the processor considers this execution to be the first execution of PAUSE in a loop. (It also<\/div>\n<div>does so for the first execution of PAUSE at CPL 0 after VM entry.)<\/div>\n<div><\/div>\n<div>Otherwise, the processor determines the amount of time since the most recent execution of PAUSE that<\/div>\n<div>was considered to be the first in a loop. If this amount of time exceeds the value of the VM-execution<\/div>\n<div>control field PLE_Window, a VM exit occurs.<\/div>\n<div><\/div>\n<div>For purposes of these computations, time is measured based on a counter that runs at the same rate as<\/div>\n<div>the timestamp counter (TSC).<\/div>\n<div>\n<hr \/>\n<p>\u3010\u4eba\u8bdd\u603b\u7ed3\u3011<\/p>\n<\/div>\n<div><\/div>\n<div>\u6c38\u8fdc\u628a\u4e24\u6b21\u95f4\u9694\u8d85\u8fc7ple_gap\u7684pause\u6307\u4ee4\u5176\u4e2d\u7684\u540e\u4e00\u6761\u4f5c\u4e3a\u7b2c\u4e00\u6b21loop\u5185pause\uff0c\u4ece\u8fd9\u4e2a\u7b2c\u4e00\u6b21loop\u5185pause\u5f00\u59cb\u8ba1\u7b97\u6b21\u6570\u76f4\u5230\u8d85\u8fc7PLE_window\u5c31\u89e6\u53d1exit<\/div>\n<div><\/div>\n<div>\u4e5f\u5c31\u662f\u95f4\u9694\u5728ple_gap\u4e4b\u5185\u7684\u8fde\u7eedpause\u6307\u4ee4\u6784\u6210\u4e86pause loop\uff0c\u5927\u4e8ePLE_window\u7684pause loop\u5c06\u89e6\u53d1\u9000\u51fa<\/div>\n","protected":false},"excerpt":{"rendered":"<p>A system feature called Pause-Loop Exiting can cause instability and performance degradation on a virtualized system that will have a web server running in a heavily utilized guest. Turn it off by setting the ple_gap module parameter to 0 for kvm_intel. Example: Add file kvmopts.conf to \/etc\/modprobe.d\/ with contents: \u00a0options kvm_intel ple_gap=0 Restart the kvm_intel &hellip; <a href=\"http:\/\/www.luo666.com\/?p=89\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;pause loop exiting &#038; ple gap for KVM performance tunning&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"footnotes":"","_jetpack_memberships_contains_paid_content":false,"jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[3],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7Dhki-1r","jetpack-related-posts":[],"_links":{"self":[{"href":"http:\/\/www.luo666.com\/index.php?rest_route=\/wp\/v2\/posts\/89"}],"collection":[{"href":"http:\/\/www.luo666.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.luo666.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.luo666.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.luo666.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=89"}],"version-history":[{"count":2,"href":"http:\/\/www.luo666.com\/index.php?rest_route=\/wp\/v2\/posts\/89\/revisions"}],"predecessor-version":[{"id":117,"href":"http:\/\/www.luo666.com\/index.php?rest_route=\/wp\/v2\/posts\/89\/revisions\/117"}],"wp:attachment":[{"href":"http:\/\/www.luo666.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=89"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.luo666.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=89"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.luo666.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=89"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}