SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


sql pages out before hitting low memory


sql pages out before hitting low memory

Author
Message
foscsamuels
foscsamuels
SSC-Enthusiastic
SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)

Group: General Forum Members
Points: 188 Visits: 97
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.


Eugene Elutin
Eugene Elutin
SSC-Insane
SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)SSC-Insane (23K reputation)

Group: General Forum Members
Points: 23384 Visits: 5478
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!":-D
(So many miracle inventions provided by MS to us...)

How to post your question to get the best and quick help
GilaMonster
GilaMonster
SSC Guru
SSC Guru (411K reputation)SSC Guru (411K reputation)SSC Guru (411K reputation)SSC Guru (411K reputation)SSC Guru (411K reputation)SSC Guru (411K reputation)SSC Guru (411K reputation)SSC Guru (411K reputation)

Group: General Forum Members
Points: 411493 Visits: 47113
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, MVP, M.Sc (Comp Sci)
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


foscsamuels
foscsamuels
SSC-Enthusiastic
SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)

Group: General Forum Members
Points: 188 Visits: 97
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.
Orlando Colamatteo
Orlando Colamatteo
SSC Guru
SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)

Group: General Forum Members
Points: 77774 Visits: 14499
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
GilaMonster
GilaMonster
SSC Guru
SSC Guru (411K reputation)SSC Guru (411K reputation)SSC Guru (411K reputation)SSC Guru (411K reputation)SSC Guru (411K reputation)SSC Guru (411K reputation)SSC Guru (411K reputation)SSC Guru (411K reputation)

Group: General Forum Members
Points: 411493 Visits: 47113
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, MVP, M.Sc (Comp Sci)
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


foscsamuels
foscsamuels
SSC-Enthusiastic
SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)SSC-Enthusiastic (188 reputation)

Group: General Forum Members
Points: 188 Visits: 97
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.


GilaMonster
GilaMonster
SSC Guru
SSC Guru (411K reputation)SSC Guru (411K reputation)SSC Guru (411K reputation)SSC Guru (411K reputation)SSC Guru (411K reputation)SSC Guru (411K reputation)SSC Guru (411K reputation)SSC Guru (411K reputation)

Group: General Forum Members
Points: 411493 Visits: 47113
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, MVP, M.Sc (Comp Sci)
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


peterdru401
peterdru401
SSC Veteran
SSC Veteran (221 reputation)SSC Veteran (221 reputation)SSC Veteran (221 reputation)SSC Veteran (221 reputation)SSC Veteran (221 reputation)SSC Veteran (221 reputation)SSC Veteran (221 reputation)SSC Veteran (221 reputation)

Group: General Forum Members
Points: 221 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.
Orlando Colamatteo
Orlando Colamatteo
SSC Guru
SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)SSC Guru (77K reputation)

Group: General Forum Members
Points: 77774 Visits: 14499
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search