HZ = 1000 slows down application

akanwar_at_digitarchy.com
Date: 09/22/03

  • Next message: Luigi Rizzo: "Re: IPFW2"
    To: freebsd-hackers@freebsd.org
    Date: Mon, 22 Sep 2003 14:43:40 -0400
    
    

    Hi all,
     
    I am expertmenting with kernel device polling on a 4.8-RELEASE system.
     
    The application I am running is a traffic pumping application that sits in
    an infinite while loop. At the time of this test it was doing 6Mbps in and
    5Mbps out traffic. CPU usage is 40% without polling enabled, typical CPU
    usage is roughly 1/3 user, 1/3 system and 1/3 interrupt. I am using the fxp
    driver.

    I customized my kernel with HZ=1000 and enabled polling via sysctl...CPU
    usage dropped from 40% to 30%. Great so far.

    But now I noticed that my application is occassionally doing slower
    iterations. Average iteration time used to be 0.2 ms without polling
    enabled. With the device polling changes, the average time is still around
    the same, but once every few minutes the application sees iterations that
    are 3.3 seconds (*seconds*, not a typo) long.

    This seems to happen as soon as I use the kernel with HZ=1000. Enabling or
    disabling device polling does not seem to make any difference to this
    behavior. I am trying to understand why there seem to be a few really long
    iterations. Could it happen that the application does not get any CPU for
    that long? Seems very counter intuitive that higher HZ should cause this.

    Could anyone shed any light on what is happening ?

    Thanks,
    -ansh

    --------------------------------------------------------------------
    mail2web - Check your email from the web at
    http://mail2web.com/ .

    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Luigi Rizzo: "Re: IPFW2"