Scheduling question - OS2

This is a discussion on Scheduling question - OS2 ; Hi folks, which priority class would you suggest in the following situation: A background thread is capturing some data an writes it to disk. This task is relatively unimportant and should interfere with the rest of the system as little ...

+ Reply to Thread
Results 1 to 12 of 12

Thread: Scheduling question

  1. Scheduling question

    Hi folks,

    which priority class would you suggest in the following
    situation:

    A background thread is capturing some data an writes it
    to disk. This task is relatively unimportant and should
    interfere with the rest of the system as little as possible.

    Currently I use idle class (0). However, it seems that the
    thread gets an IO boost due to disk activity. Would it be
    better to use something like foreground server (-31) or even
    a lower number within the idle class ?

    Any comments ?


    --
    Ruediger "Rudi" Ihle [S&T Systemtechnik GmbH, Germany]
    http://www.s-t.de
    Please remove all characters left of the "R" in my email address


  2. Re: Scheduling question

    Ruediger Ihle wrote:
    > Hi folks,
    >
    > which priority class would you suggest in the following
    > situation:
    >
    > A background thread is capturing some data an writes it
    > to disk. This task is relatively unimportant and should
    > interfere with the rest of the system as little as possible.
    >
    > Currently I use idle class (0). However, it seems that the
    > thread gets an IO boost due to disk activity. Would it be
    > better to use something like foreground server (-31) or even
    > a lower number within the idle class ?
    >
    > Any comments ?


    If it's heavy disk IO, which will fill the write cache, then the
    filesystem you're writing to has more of an influence on how much the
    rest of the system is "disturbed" than your thread priority. For
    example, HPFS (non-HPFS386) can cause hiccups in timecritical threads
    when the cache is filled from an idle thread. JFS doesn't show this
    performance issue.

    --
    [Reverse the parts of the e-mail address to reply.]

  3. Re: Scheduling question

    On Wed, 28 May 2008 10:47:03 UTC in comp.os.os2.programmer.misc, "Ruediger Ihle"
    wrote:

    > However, it seems that the
    > thread gets an IO boost due to disk activity. Would it be
    > better to use something like foreground server (-31) or even
    > a lower number within the idle class ?


    [I:\tmpinst]grep -i priority h:\config.sys
    PRIORITY_DISK_IO=YES

    ?

    --
    Trevor Hemsley, Brighton, UK
    Trevor dot Hemsley at ntlworld dot com

  4. Re: Scheduling question

    [A complimentary Cc of this posting was sent to
    Ruediger Ihle
    ], who wrote in article :
    > Hi folks,
    >
    > which priority class would you suggest in the following
    > situation:
    >
    > A background thread is capturing some data an writes it
    > to disk. This task is relatively unimportant and should
    > interfere with the rest of the system as little as possible.
    >
    > Currently I use idle class (0). However, it seems that the
    > thread gets an IO boost due to disk activity. Would it be
    > better to use something like foreground server (-31) or even
    > a lower number within the idle class ?


    In each class, priorities go from 0 to 31. There is no lower priority
    than Idle/0. Foreground-server/0 is a very high "requested priority"
    (higher than any "normal" process having no focus).

    [The *actual*, "scheduler" priority has little ;-) relation to the
    "requested" one... - As you discovered...]

    Yours,
    Ilya

  5. Re: Scheduling question

    On Wed, 28 May 2008 16:19:33 UTC, Marty wrote:

    > If it's heavy disk IO, which will fill the write cache, then the
    > filesystem you're writing to has more of an influence on how much
    > the rest of the system is "disturbed" than your thread priority.


    Yes, that could be.


    > For example, HPFS (non-HPFS386) can cause hiccups in timecritical
    > threads when the cache is filled from an idle thread.


    That's would explain something...


    > JFS doesn't show this performance issue.


    The particular program, which boils down to an SQLite database,
    runs *MUCH* better on JFS anyway. However, I cannot assume that
    anyone is using JFS...



    --
    Ruediger "Rudi" Ihle [S&T Systemtechnik GmbH, Germany]
    http://www.s-t.de
    Please remove all characters left of the "R" in my email address


  6. Re: Scheduling question

    On Wed, 28 May 2008 23:52:15 UTC, "Rich Walsh"
    wrote:


    > You haven't described what problem you're seeing as a result
    > of this setting. Is there any? As Marty suggests, you may
    > be causing problems by being too "laid-back" - particularly
    > if there are other idle priority threads with a higher delta
    > than yours.


    I think Marty pointed to the right direction. See my reply
    to him.


    > How much data are you talking about and at what
    > rate does it come in?


    It's metadata associated with digital TV streams and it's not
    just written to disk, but insterted into an SQLite database.
    Disk activity can be quite heavy, temporary. Even though I
    cannot really tell, what the exact rate is.



    --
    Ruediger "Rudi" Ihle [S&T Systemtechnik GmbH, Germany]
    http://www.s-t.de
    Please remove all characters left of the "R" in my email address


  7. Re: Scheduling question


    "Ruediger Ihle" schrieb im Newsbeitrag
    news:Bd1D8ggkpXsj-pn2-Ko0ExnbkNBOs@Tobias...
    > Hi folks,
    >
    > which priority class would you suggest in the following
    > situation:
    >
    > A background thread is capturing some data an writes it
    > to disk. This task is relatively unimportant and should
    > interfere with the rest of the system as little as possible.
    >
    > Currently I use idle class (0). However, it seems that the
    > thread gets an IO boost due to disk activity. Would it be
    > better to use something like foreground server (-31) or even
    > a lower number within the idle class ?


    I thought you can prevent IO boost (and priority increase of executing
    thread of foreground app and priority increase of "starving" threads) by
    specifying
    PRIORITY=ABSOLUTE

    in config.sys ? Ok, that is a global solution of course ...

    Lars



  8. Re: Scheduling question

    Ruediger Ihle wrote:
    > On Wed, 28 May 2008 16:19:33 UTC, Marty wrote:
    >
    >>If it's heavy disk IO, which will fill the write cache, then the
    >>filesystem you're writing to has more of an influence on how much
    >>the rest of the system is "disturbed" than your thread priority.

    >
    > Yes, that could be.
    >
    >>For example, HPFS (non-HPFS386) can cause hiccups in timecritical
    >>threads when the cache is filled from an idle thread.

    >
    > That's would explain something...
    >
    >>JFS doesn't show this performance issue.

    >
    > The particular program, which boils down to an SQLite database,
    > runs *MUCH* better on JFS anyway. However, I cannot assume that
    > anyone is using JFS...


    The only "solution" I've found on standard HPFS is to disable lazy
    writing, but that's not something you can expect a user to do and it's
    hardly a "solution" given the impact to the rest of your operations on
    the disk.

    Maybe a terrible hack such as a 1 second sleep after writing 2MB of data
    (one cache size's worth) would help. Again not something I would call a
    "solution" by any stretch.

    If you gain any more insight into the problem I'd be very interested to
    hear.

    --
    [Reverse the parts of the e-mail address to reply.]

  9. Re: Scheduling question

    On Wed, 28 May 2008 21:55:24 UTC, Ilya Zakharevich
    wrote:

    > In each class, priorities go from 0 to 31. There is no lower priority
    > than Idle/0. Foreground-server/0 is a very high "requested priority"
    > (higher than any "normal" process having no focus).


    Thanks for the clarification. It's been too long ago that I read
    about this and I'm not so sure that I understood everything back
    then...



    --
    Ruediger "Rudi" Ihle [S&T Systemtechnik GmbH, Germany]
    http://www.s-t.de
    Please remove all characters left of the "R" in my email address


  10. Re: Scheduling question

    Marty wrote:
    > Ruediger Ihle wrote:
    >
    >> On Wed, 28 May 2008 16:19:33 UTC, Marty wrote:
    >>
    >>> If it's heavy disk IO, which will fill the write cache, then the
    >>> filesystem you're writing to has more of an influence on how much
    >>> the rest of the system is "disturbed" than your thread priority.

    >>
    >>
    >> Yes, that could be.
    >>
    >>> For example, HPFS (non-HPFS386) can cause hiccups in timecritical
    >>> threads when the cache is filled from an idle thread.

    >>
    >>
    >> That's would explain something...
    >>
    >>> JFS doesn't show this performance issue.

    >>
    >>
    >> The particular program, which boils down to an SQLite database, runs
    >> *MUCH* better on JFS anyway. However, I cannot assume that
    >> anyone is using JFS...

    >
    >
    > The only "solution" I've found on standard HPFS is to disable lazy
    > writing, but that's not something you can expect a user to do and it's
    > hardly a "solution" given the impact to the rest of your operations on
    > the disk.
    >
    > Maybe a terrible hack such as a 1 second sleep after writing 2MB of data
    > (one cache size's worth) would help. Again not something I would call a
    > "solution" by any stretch.
    >
    > If you gain any more insight into the problem I'd be very interested to
    > hear.
    >


    Is there a way to tell HPFS to flush the cache?


  11. Re: Scheduling question

    If you specify PRIORITY=ABSOLUTE the requested priority DOES have a strong
    relation to the real priority. Foreground apps do not get higher prio,
    "starving" threads are not raised in prio etc.
    And PRIORITY_DISK_IO=NO will prevent IO boost due to disk activity.

    Lars

    "Ruediger Ihle" schrieb im Newsbeitrag
    news:Bd1D8ggkpXsj-pn2-C7wDOKBXbJ8S@Tobias...
    > On Wed, 28 May 2008 21:55:24 UTC, Ilya Zakharevich
    > wrote:
    >
    >> In each class, priorities go from 0 to 31. There is no lower priority
    >> than Idle/0. Foreground-server/0 is a very high "requested priority"
    >> (higher than any "normal" process having no focus).

    >
    > Thanks for the clarification. It's been too long ago that I read
    > about this and I'm not so sure that I understood everything back
    > then...
    >
    >
    >
    > --
    > Ruediger "Rudi" Ihle [S&T Systemtechnik GmbH, Germany]
    > http://www.s-t.de
    > Please remove all characters left of the "R" in my email address
    >




  12. Re: Scheduling question

    On Fri, 30 May 2008 06:05:30 UTC, "Lars Erdmann"
    wrote:

    > If you specify PRIORITY=ABSOLUTE the requested priority DOES have a strong
    > relation to the real priority. Foreground apps do not get higher prio,
    > "starving" threads are not raised in prio etc.
    > And PRIORITY_DISK_IO=NO will prevent IO boost due to disk activity.


    I'm not in the position to enforce those settings on the system
    running the software.


    --
    Ruediger "Rudi" Ihle [S&T Systemtechnik GmbH, Germany]
    http://www.s-t.de
    Please remove all characters left of the "R" in my email address


+ Reply to Thread