Intel cstate可能导致性能下降

Intel cstate可能导致性能下降

cstate may use more time to resume, so it will downgrade the system performance.

use script below to force c0


#!/usr/bin/env python

import sys, time, struct

def disable_cstates():
    f = open("/dev/cpu_dma_latency", "wb")
    f.write(struct.pack("i", 0))
    f.flush()
    while True:
        time.sleep(10)

disable_cstates()