The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
keep context in awk VTAWKVT Shell Programming and Scripting 2 05-23-2008 02:06 PM
thread context switches: detection, prevention fabulous2 UNIX for Advanced & Expert Users 2 03-23-2008 11:35 AM
[ES rehat 4] telnet and default context at login progressdll UNIX for Advanced & Expert Users 0 02-09-2006 11:59 AM
korn shellscript execution context - exit statement richgi UNIX for Dummies Questions & Answers 3 03-30-2005 12:48 AM
Context Free Grammar Nisha High Level Programming 4 08-13-2002 08:03 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-13-2002
keelba keelba is offline
Registered User
  
 

Join Date: Apr 2002
Location: Dallas, TX
Posts: 57
Context Switching

I know that this is a relative question but can someone give me an idea of what would be considered a high number of context switches?

I am running vmstat and show a cs value of between 5000 and 6000 on a 4 processor system. How can I deduce if this number is high or not?

Also, the timeslice kernel parameter set to 1 when I know the HP default is 10. What would be the benefits or detriments to changing this value?
  #2 (permalink)  
Old 11-14-2002
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
You need to spend time looking at these numbers. Then you can compare one system to the others. And you can see how the number change over time. This is how you deduce whether or not a number is normal.

5000-6000 is high and I'm not sure that I have ever seen a higher value. We have a very powerful and busy 4 cpu server whose cs's are in the 800 to 1200 range...which is high but not unusual for this server during a busy day.

Looking at stats is especially important if you are perforance tuning. You really want to know cs'es before and after the timeslice was tweaked. I have never tweaked the timeslice, but I would expect the the involuntary context switches would go way up and scheduling latency to drop somewhat. Why was this change made? Unless you were having some real-time scheduling problems or something, we might want to consider putting it back.
  #3 (permalink)  
Old 11-15-2002
roden roden is offline
Registered User
  
 

Join Date: Nov 2002
Posts: 14
Someone has reset the timeslice from 10 to 1. You should inquire why this has been done first of all, and maybe other settings has been changed as well that you need to be aware of.

If your througput is low - reset the timeslice to the default. If not - then it seems to be ok. You have approx 1000 cs / CPU which is high for an old system, but nothing to be concerned about for a new highperforming system, even with a timeslice of 10.

In general a timeslice of 1 millisecond is to short and the processes get timed out too soon, not that HPUX is a Unix kernel with pre-emptive multitasking and when higher priority processes/threads are available, processes and threads with lower priority will be pre-empted. Also when performing I/O the process/thread will be "put aside" until the I/O is completed and then it will rejoin. This is of course a very simplified description.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:01 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0