[lkml]   [2004]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Nice 19 process still gets some CPU
    Hash: SHA1

    Timothy Miller wrote:
    | Con Kolivas wrote:
    |> It definitely should _not_ starve. That is the unixy way of doing
    |> things. Everything must go forward. Around 5% cpu for nice 19 sounds
    |> just right. If you want scheduling only when there's spare cpu cycles
    |> you need a sched batch(idle) implementation.
    | Well, since I can't rewrite the app, I can't make it sched batch. Nice
    | values are an easy thing to get at for anything that's running.
    | Besides, comparing nice 0 to nice 19, I'd expect something more like a
    | 100:1 ratio or worse. (That is, I don't expect nice to be linear.)
    | Maybe this is just me, but when I set a process to the worst possible
    | priority (nice 19), I expect it only to run when nothing else needs the
    | CPU.

    Sched batch is a kernel modification, and a simple wrapper will allow
    you to run _any_ program as sched batch without modifying it's source.

    The design has had that ratio of 20:1 for a very long time so now is not
    the time to suddenly decide it should be different. However if you want
    to make it 100:1 for your machine feel free to edit kernel/sched.c
    and change
    #define MIN_TIMESLICE ( 10 * HZ / 1000)
    #define MIN_TIMESLICE ( 1 * HZ / 1000)

    That will give you more what you're looking for.

    Version: GnuPG v1.2.4 (GNU/Linux)
    Comment: Using GnuPG with Thunderbird -

    -----END PGP SIGNATURE-----
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:04    [W:0.023 / U:33.660 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site