Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

sql pages out before hitting low memory Expand / Collapse
Author
Message
Posted Monday, March 18, 2013 9:55 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, June 27, 2013 7:15 AM
Points: 32, Visits: 94
What can I do to prevent SQL from paging out its memory?

Situation:

I receive calls about SQL App being slow.

event viewer shows

A significant part of sql server process memory has been paged out. This may result in a performance degradation. Duration: 0 seconds. Working set (KB): 57040, committed (KB): 1608152, memory utilization: 3%%


Memory monitor shows just over 4 gb still free.

graph shows memory available.

Post #1432241
Posted Monday, March 18, 2013 10:40 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Thursday, April 03, 2014 10:10 AM
Points: 2,792, Visits: 4,874
What is current settings of your SQL Server (max server memory)?


_____________________________________________
"The only true wisdom is in knowing you know nothing"
"O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!"
(So many miracle inventions provided by MS to us...)

How to post your question to get the best and quick help
Post #1432263
Posted Monday, March 18, 2013 10:47 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 9:59 AM
Points: 41,508, Visits: 34,425
SQL doesn't page out it's own memory. The OS may page SQL out if its under memory pressure. Older versions of the OS (Server 2003) were more agressive about this, later versions are a lot less prone to page SQL out.

You can enable locked pages, but then make very sure you're leaving enough memory for the OS.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1432268
Posted Monday, March 18, 2013 12:16 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, June 27, 2013 7:15 AM
Points: 32, Visits: 94
Our max server memory was unlimited. Consultant said he limited max server memory for another client with a similar issue.

After this discussion, I set max server memory to 1.5 gb. But the problem reoccurred today.

I may need to keep tweaking this setting. it confuses me why windows would page out the memory when 4gb is free. 6 gb total memory in the server.

i'll look into if we can set lock pages for this server. I'll need to confirm capatibility with the software vendor.

We may consider upgrading the server. We were trying to hold off until we upgraded the vendor software too.
Post #1432301
Posted Monday, March 18, 2013 12:54 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:25 AM
Points: 7,070, Visits: 12,523
32 or 64 bit SQL Server?

Server 2003 will do this to SQL 2005 quite a bit on some systems, and on others it's not an issue. It depends on what else is running and is difficult to predict which systems might be affected. The issue has mostly disappeared with Server 2008 running SQL 2008, and newer setups.

For your case, enabling 'locked pages in memory' (LPIM) is the way to go and is transparent to existing SQL Server operations. Before enabling LPIM set 'max server memory' very conservatively at first and then monitor the 'available megabytes' perfmon counter closely to ensure Windows always has enough free memory thoughout the normal working cycles (day, week, month, etc.). If Windows suddenly requires more memory, with LPIM enabled SQL Server will not return it on request because its pages are locked. In this scenario you can start seeing overall system stability issues which is far worse than Windows simply trimming SQL Server's working set.


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1432314
Posted Monday, March 18, 2013 4:40 PM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 9:59 AM
Points: 41,508, Visits: 34,425
foscsamuels (3/18/2013)
Our max server memory was unlimited. Consultant said he limited max server memory for another client with a similar issue.

After this discussion, I set max server memory to 1.5 gb. But the problem reoccurred today.


You absolutely should set max server memory. What you should set it to is another matter, there's a good discussion in chapter 4 of http://www.simple-talk.com/books/sql-books/troubleshooting-sql-server-a-guide-for-the-accidental-dba/

i'll look into if we can set lock pages for this server. I'll need to confirm capatibility with the software vendor.


There's no compatibility to confirm, it's completely transparent to any app that uses SQL



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1432392
Posted Tuesday, March 19, 2013 9:51 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, June 27, 2013 7:15 AM
Points: 32, Visits: 94
edit - special thx to GilaMonster for the free ebook

i double checked the vendor database reccommendation sheet and it doesnt mention locked pages. just as ya'll said 'it should not be a concern'.

SQL is 32 bit. OS is 32 bit 2003 Ent

I'm wondering if sql is enforcing the memory setting. I wanted to try to limit SQL to 1.5 gb of memory. I muliplied 1.5 * 1024. But task manager shows the following. Should I trouble shoot this or are the amounts seem mismatched due to number conversions.

Post #1432750
Posted Tuesday, March 19, 2013 10:15 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 9:59 AM
Points: 41,508, Visits: 34,425
Never use task manager to monitor SQL Server's memory, it displays incorrect values in some cases. Also be aware that, prior to SQL 2012, the max memory setting limited the size of the buffer pool and there's always some additional non-buffer memory.

Now, if you have 32 bit SQL with 32 bit OS, 1.7 GB is the most SQL can use unless you have locked pages enabled, /PAE in the boot.ini and AWE enabled in SQL. Check chapter 4 of the same book.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1432760
Posted Monday, March 25, 2013 6:42 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, April 16, 2013 8:34 AM
Points: 23, Visits: 128
You should keep track on SQL Server storage and performance to avoid this type of problem
If the capacity management of sql server is up to the mark then sql server always perform well and you will never face this type of problem

you can try some third party software for capacity management of SQL server which will give you accurate information.
Post #1434878
Posted Monday, March 25, 2013 7:13 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:25 AM
Points: 7,070, Visits: 12,523
peterdru401 (3/25/2013)
You should keep track on SQL Server storage and performance to avoid this type of problem
If the capacity management of sql server is up to the mark then sql server always perform well and you will never face this type of problem

you can try some third party software for capacity management of SQL server which will give you accurate information.

1. this has nothing to do with storage and 2. the issue can occur whether SQL Server has enough memory or not. It's mostly related to a misalignment between Windows memory management approach (i.e. how Windows is coded) and SQL Server behavior and cannot always be cured by adding more memory or lowering 'max server memory'.


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato

Believe you can and you're halfway there. --Theodore Roosevelt

Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein

The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein

1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
Post #1434890
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse