SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 pages/sec and context switches/sec too high
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sql-lover
Yak Posting Veteran

59 Posts

Posted - 07/15/2012 :  11:32:24  Show Profile  Reply with Quote
Hi,

I changed jobs a few weeks ago and taking care of new databases and servers.

As a proactive measure, I am running perfom on my servers for about a week (5 business days) On the most important one, I found these two values that grabbed my attention:

Pages/sec = 12.34
Context Switches/sec = 3500

Available RAM and page life expectancy look good, 2GB and 2060, so I do not see memory starvation here. I know there are lot of queries that need improvement plus the db suffers of over indexing (dealing with each issue at the time)

What could be the main reason for those two bad values on pages/sec and context switches, any ideas?

Thanks in advance...

Edited by - sql-lover on 07/15/2012 15:03:10

SwePeso
Patron Saint of Lost Yaks

Sweden
29138 Posts

Posted - 07/15/2012 :  14:46:44  Show Profile  Visit SwePeso's Homepage  Reply with Quote
Is that 12 thousand 348 pages per second, or 12 comma 348 pages per second?


N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

sql-lover
Yak Posting Veteran

59 Posts

Posted - 07/15/2012 :  15:02:24  Show Profile  Reply with Quote
12 comma 348 ... which still, I find too high ... that's average, for 5 days data , I believe.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
29138 Posts

Posted - 07/15/2012 :  18:25:32  Show Profile  Visit SwePeso's Homepage  Reply with Quote
All pages read are counted in this metrics. Even backups.
So 12.348 pages/sec indicates an average of 99kb/s which is not much.
I would be worried if the number went up to 100+ or even 1000+



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

sql-lover
Yak Posting Veteran

59 Posts

Posted - 07/15/2012 :  22:10:21  Show Profile  Reply with Quote
quote:
Originally posted by SwePeso

All pages read are counted in this metrics. Even backups.
So 12.348 pages/sec indicates an average of 99kb/s which is not much.
I would be worried if the number went up to 100+ or even 1000+



N 56°04'39.26"
E 12°55'05.63"




Hmmm ... Sorry, I disagree.

I have two very old servers, less powerful, which page/sec is close to zero. As a matter of fact, this is the only server which such value is not close to zero.

I would like to know what would be possible reasons for this value to be so high.
Go to Top of Page

jackv
Flowing Fount of Yak Knowledge

United Kingdom
1775 Posts

Posted - 07/16/2012 :  01:50:29  Show Profile  Visit jackv's Homepage  Reply with Quote
Could you supply : a) SELECT total_physical_memory_kb, available_physical_memory_kb,
total_page_file_kb, available_page_file_kb,
system_memory_state_desc
FROM sys.dm_os_sys_memory;
This will give us some good information on available memory and clues on memory pressure.Could you try and get this information through a busy period
b) Just to check if the number indicates memory mapped files sequential reads (as opposed to memory thrashing) - check Memory: Available Bytes versus Paging File:% usage


Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

sql-lover
Yak Posting Veteran

59 Posts

Posted - 07/16/2012 :  11:31:56  Show Profile  Reply with Quote
quote:
Originally posted by jackv

Could you supply : a) SELECT total_physical_memory_kb, available_physical_memory_kb,
total_page_file_kb, available_page_file_kb,
system_memory_state_desc
FROM sys.dm_os_sys_memory;
This will give us some good information on available memory and clues on memory pressure.Could you try and get this information through a busy period
b) Just to check if the number indicates memory mapped files sequential reads (as opposed to memory thrashing) - check Memory: Available Bytes versus Paging File:% usage


Jack Vamvas
--------------------
http://www.sqlserver-dba.com



Jack,

You just read my mind!

After further investigation and using that exact DMV this morning, I decided to go back and check MS-SQL memory settings. Upper limit was not set! (remember, I just received these servers, started to getting familiar with each)

I restarted my perfom but I noticed immediately that server's memory was pinned because MS-SQL. I do believe that was causing the paging issue on the server. Keeping an eye though, in order to confirm.

Regardless, I had to change that to a fix value. The server has 64GB, I put 18GB, initially...
Go to Top of Page

russell
Pyro-ma-ni-yak

USA
5000 Posts

Posted - 07/17/2012 :  14:54:26  Show Profile  Visit russell's Homepage  Reply with Quote
You didn't give SQL Server nearly enough memory (assuming this is the only instance on the box).

Start with 56-60GB.
Go to Top of Page

sql-lover
Yak Posting Veteran

59 Posts

Posted - 07/17/2012 :  17:22:35  Show Profile  Reply with Quote
quote:
Originally posted by russell

You didn't give SQL Server nearly enough memory (assuming this is the only instance on the box).

Start with 56-60GB.



Agree. Prior your post, I incremented the upper size limit more.

Thanks for reply.
Go to Top of Page

jackv
Flowing Fount of Yak Knowledge

United Kingdom
1775 Posts

Posted - 08/01/2012 :  01:52:35  Show Profile  Visit jackv's Homepage  Reply with Quote
In deciding the upper limit to set include: a) memory required by OS b) other software on the server which has memory requirements.
Quite often monitoring agents and other systems management tools require memory - which is constrained if the memory is set to high on the SQL Server

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.19 seconds. Powered By: Snitz Forums 2000