<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: context switching in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825343#M940456</link>
    <description>Thoughts? Yes, the last time I saw a ratio like that the primary SCSI path to a disk drive had died and it was talking a long time to complete disk I/O via the alternate path. The queue was small because the actual time to write, once it found a good hardware path, was very small. Take a look at sar -d and look for unusually long av times. &lt;BR /&gt;&lt;BR /&gt;I am not saying that you have a physical problem, but that ratio of thousands of voluntary to forced switches is not usual or normal. And if you think about it, if the system is waiting on a partially failed disk, the disk I/O rate would be unusually low.&lt;BR /&gt;&lt;BR /&gt;To further explain, a voluntary context switch occurs when the process does an I/O and takes itself out of the runqueue. When the I/O completes it puts itself back into the runque to take it's turn at the processor.&lt;BR /&gt;&lt;BR /&gt;A forced or involuntary context switch occurs when the process has used more than half of it's time slice, and gets switched out before it has completed, for a process with higher or equal priority. It is then placed by the system back in the runqueue.</description>
    <pubDate>Mon, 14 Oct 2002 16:40:20 GMT</pubDate>
    <dc:creator>John Dvorchak</dc:creator>
    <dc:date>2002-10-14T16:40:20Z</dc:date>
    <item>
      <title>context switching</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825337#M940450</link>
      <description>Hi,&lt;BR /&gt; &lt;BR /&gt;  We are having V class system running hpux 11.11. System has 16Gb mem and 12 CPUs. When I see the sar report I always see pswch/s value in thousands. We are not running many processes. I'm expecting minimal minimal context switching ... What may be the problem?</description>
      <pubDate>Mon, 14 Oct 2002 14:12:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825337#M940450</guid>
      <dc:creator>Arockia Jegan</dc:creator>
      <dc:date>2002-10-14T14:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: context switching</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825338#M940451</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Perhaps someone changed the timeslice kernel parameter :&lt;BR /&gt;&lt;BR /&gt;timeslice&lt;BR /&gt;Leave this set at 10. If this is set to 1, which used to happen because of that old sam&lt;BR /&gt;configuration template with a bug in it, excessive context switching overhead will usually&lt;BR /&gt;result. The system would spend, oh, 10 times what it normally does simply handling&lt;BR /&gt;timeslice interrupts. It can possibly also cause lock contention issues if set too low.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Jean-Louis.</description>
      <pubDate>Mon, 14 Oct 2002 14:39:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825338#M940451</guid>
      <dc:creator>Jean-Louis Phelix</dc:creator>
      <dc:date>2002-10-14T14:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: context switching</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825339#M940452</link>
      <description>timeslice is 10 from the beginning.</description>
      <pubDate>Mon, 14 Oct 2002 14:58:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825339#M940452</guid>
      <dc:creator>Arockia Jegan</dc:creator>
      <dc:date>2002-10-14T14:58:46Z</dc:date>
    </item>
    <item>
      <title>Re: context switching</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825340#M940453</link>
      <description>I don't know that thousands of context switches is all that unusual. Every process has switches, whether voluntary or forced. On a system with no applications running and just user shells you will have hundreds of switches per second. Remember that context switches are normal and each process, either a single command or an ongoing process, is switched before it finishes it's time slice. I/0 will cause voluntary context switching and an ongoing cpu intensive process will have a forced context switch before it's time slice completes, many times per second. Instead of looking for a raw number of c-switches look at the ratio of forced versus voluntary. If voluntary is many times higher than forced, I would suggest that ther might me an I/O problem, usually with a disk. That is where glance can be very useful to show the type of switch by process, rather than sar with is a global snapshot.</description>
      <pubDate>Mon, 14 Oct 2002 15:06:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825340#M940453</guid>
      <dc:creator>John Dvorchak</dc:creator>
      <dc:date>2002-10-14T15:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: context switching</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825341#M940454</link>
      <description>Contex tswitching is not in itself a prolem.  Even with few processes, if your individual processes are "long lived" they will be forced to yield CPU after each timeslice.  This results in a context switch.  A context switch will also be generated each time a process voluntarily abandons the CPU.&lt;BR /&gt;&lt;BR /&gt;Do you run glance?  IF so, then it might be worthwhile to examine some of your application processes in detail to see if they are being forced from CPU by timeslice or abandoning the CPU voluntarily.  If they are giving up CPU voluntarily (which is my guess) then what you are seeing is a symptom of the application code.</description>
      <pubDate>Mon, 14 Oct 2002 15:06:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825341#M940454</guid>
      <dc:creator>Alan Riggs</dc:creator>
      <dc:date>2002-10-14T15:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: context switching</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825342#M940455</link>
      <description>Thanks Guys. Most of the time the voluntary context switch is in thousands. Forced context switch is between 5 to 20. We are running a oracle job. Getting very low I/O rate(150 Phys IO rate). But there is no disk contention. Disk is not at all busy and the average queue is less than 1. If we start another oracle job then the IO is going down very low.&lt;BR /&gt;When I was looking at the sar reports/ Glance view I couldn't find anything strange other than context switching... any thoughts...</description>
      <pubDate>Mon, 14 Oct 2002 15:19:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825342#M940455</guid>
      <dc:creator>Arockia Jegan</dc:creator>
      <dc:date>2002-10-14T15:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: context switching</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825343#M940456</link>
      <description>Thoughts? Yes, the last time I saw a ratio like that the primary SCSI path to a disk drive had died and it was talking a long time to complete disk I/O via the alternate path. The queue was small because the actual time to write, once it found a good hardware path, was very small. Take a look at sar -d and look for unusually long av times. &lt;BR /&gt;&lt;BR /&gt;I am not saying that you have a physical problem, but that ratio of thousands of voluntary to forced switches is not usual or normal. And if you think about it, if the system is waiting on a partially failed disk, the disk I/O rate would be unusually low.&lt;BR /&gt;&lt;BR /&gt;To further explain, a voluntary context switch occurs when the process does an I/O and takes itself out of the runqueue. When the I/O completes it puts itself back into the runque to take it's turn at the processor.&lt;BR /&gt;&lt;BR /&gt;A forced or involuntary context switch occurs when the process has used more than half of it's time slice, and gets switched out before it has completed, for a process with higher or equal priority. It is then placed by the system back in the runqueue.</description>
      <pubDate>Mon, 14 Oct 2002 16:40:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825343#M940456</guid>
      <dc:creator>John Dvorchak</dc:creator>
      <dc:date>2002-10-14T16:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: context switching</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825344#M940457</link>
      <description>Make sure you are matching context switch metrics with I/O metrics. As mentioned, a context switch (potentially) can occur on a busy system for every I/O (including: once per keystroke, once per LAN I/O and once per disk or tape I/O). If you have more than 12 active processes and more than 12 active users on the system, seeing thousands of context switches with 150 disk I/O's/sec plus 200 LAN I/O's/sec and 50 users typing at the same time which will generate several hundred I/O's/sec...now the thousands metric looks normal.</description>
      <pubDate>Mon, 14 Oct 2002 18:54:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825344#M940457</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2002-10-14T18:54:41Z</dc:date>
    </item>
    <item>
      <title>Re: context switching</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825345#M940458</link>
      <description>Just as something to check. Make sure that not all the disks in the Volume group's use the same primary path to the disks.&lt;BR /&gt;Try to balance the IO as much possible over the primary and alternate paths.&lt;BR /&gt;It makes a big difference even on Fibre channel.&lt;BR /&gt;&lt;BR /&gt;-ETL</description>
      <pubDate>Mon, 14 Oct 2002 22:31:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825345#M940458</guid>
      <dc:creator>Evert Ladrak</dc:creator>
      <dc:date>2002-10-14T22:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: context switching</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825346#M940459</link>
      <description>&lt;BR /&gt;Do you have EMS running?&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Mon, 14 Oct 2002 22:50:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/context-switching/m-p/2825346#M940459</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-10-14T22:50:10Z</dc:date>
    </item>
  </channel>
</rss>

