I have problem with sql memery usage.
In same case sql paging the data to virtual memory on disk and relese physical memory. And if SQL relese physsical memory, he dont consider min server memory (MB) option(4012MB), after relesingsqlserv physical memory usage is only 500MB. And after sqlserv restart his memory usage is only about 500MB.
Perfmon counters:
Pages/sec1450
%Commited Byte in Use 43%
%UsageTotalPage File87%
Available MBytesMemory6480 MB
My server is:9.00.2153.00SP1Standard Edition (64-bit)
Server memory 8GB
sp_configure:
awe enabled0100
min server memory (MB)0214748364740124012
max server memory (MB)16214748364745004500
I have Enabled the Lock Pages in Memory Option( http://msdn2.microsoft.com/en-us/library/ms190730.aspx )
Can you please provide:
1.The output of "dbcc memorystatus" when the server reaches the described state
2. The 1st 100 lines of the errorlog
Thanks, Ron D.
|||Hello
1. My results of dbcc memorystatus:
https://www.just.ee/fail/dl/26%2E01%2E2007%5F16%5F37%5F57%5F19017%5Flogi%2Etxt
2. And sql server log:
01/26/2007 15:28:15,spid1s,Unknown,AppDomain 2 (kraamat.dbo[runtime].1) unloaded.
01/26/2007 15:28:14,spid1s,Unknown,AppDomain 2 (kraamat.dbo[runtime].1) is marked for unload due to memory pressure.
01/26/2007 15:17:58,spid6s,Unknown,SQL Server has encountered 2 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\MSDBLog.ldf] in database [msdb] (4). The OS file handle is 0x0000000000000870. The offset of the latest long I/O is: 0x00000002961000
01/26/2007 15:17:58,spid6s,Unknown,SQL Server has encountered 49 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\sqldata\kraamat1901_data.mdf] in database [kraamat] (5). The OS file handle is 0x000000000000081C. The offset of the latest long I/O is: 0x00001219ee8000
01/26/2007 14:46:23,spid6s,Unknown,SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mssqlsystemresource.mdf] in database [mssqlsystemresource] (32767). The OS file handle is 0x0000000000000684. The offset of the latest long I/O is: 0x00000001242000
01/26/2007 14:45:12,spid6s,Unknown,SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\MSDBLog.ldf] in database [msdb] (4). The OS file handle is 0x0000000000000870. The offset of the latest long I/O is: 0x00000002162000
01/26/2007 14:45:12,spid6s,Unknown,SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\tempdb.mdf] in database [tempdb] (2). The OS file handle is 0x000000000000086C. The offset of the latest long I/O is: 0x00000000482000
01/26/2007 14:45:12,spid6s,Unknown,SQL Server has encountered 3 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\sqldata\kraamat1901_data.mdf] in database [kraamat] (5). The OS file handle is 0x000000000000081C. The offset of the latest long I/O is: 0x00001c7cd7e000
01/26/2007 14:45:12,spid6s,Unknown,SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\templog.ldf] in database [tempdb] (2). The OS file handle is 0x0000000000000860. The offset of the latest long I/O is: 0x00000000360000
01/26/2007 14:29:11,spid6s,Unknown,SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\MSDBLog.ldf] in database [msdb] (4). The OS file handle is 0x0000000000000870. The offset of the latest long I/O is: 0x00000000dc1000
01/26/2007 14:29:01,spid6s,Unknown,SQL Server has encountered 4 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\sqldata\kraamat1901_data.mdf] in database [kraamat] (5). The OS file handle is 0x000000000000081C. The offset of the latest long I/O is: 0x00000acb1ea000
01/26/2007 14:22:45,spid25s,Unknown,Changing the status to FLUSH for full-text catalog "cat_isikud" (7) in database "kraamat" (5). This is an informational message only. No user action is required.
01/26/2007 14:22:43,spid69,Unknown,Replication-Replication Snapshot Subsystem: agent SQL50\KRIS-kraamat-kraamat50-1 scheduled for retry. The replication agent had encountered an exception.<nl/>Source: Replication<nl/>Exception Type: Microsoft.SqlServer.Replication.SqlDeadlockException<nl/>Exception Message: Transaction (Process ID 71) was deadlocked on lock resources with another process and has be
01/26/2007 14:10:47,spid6s,Unknown,SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\MSDBLog.ldf] in database [msdb] (4). The OS file handle is 0x0000000000000870. The offset of the latest long I/O is: 0x00000000889000
01/26/2007 14:10:37,spid6s,Unknown,SQL Server has encountered 16 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\sqldata\kraamat1901_data.mdf] in database [kraamat] (5). The OS file handle is 0x000000000000081C. The offset of the latest long I/O is: 0x00000c30650000
01/26/2007 14:00:51,spid6s,Unknown,SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\MSDBLog.ldf] in database [msdb] (4). The OS file handle is 0x0000000000000870. The offset of the latest long I/O is: 0x00000000607000
01/26/2007 14:00:41,spid6s,Unknown,SQL Server has encountered 3 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\sqldata\kraamat1901_data.mdf] in database [kraamat] (5). The OS file handle is 0x000000000000081C. The offset of the latest long I/O is: 0x00000ba0d1c000
01/26/2007 13:54:20,spid72,Unknown,AppDomain 2 (kraamat.dbo[runtime].1) created.
01/26/2007 13:54:18,spid72,Unknown,Common language runtime (CLR) functionality initialized using CLR version v2.0.50727 from C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\.
1. Are you sure these are the 1st 100 lines? The typical errorlog start looks like this:
Jan 20 2007 23:42:11 2005.090.9091.00
Copyright (c) 1988-2006 Microsoft Corporation
Developer Edition on Windows NT 5.2 <X86> (Build 3790: Service Pack 1)
2007-01-23 22:52:23.92 Server (c) 2005 Microsoft Corporation.
2007-01-23 22:52:23.92 Server All rights reserved.
2007-01-23 22:52:23.92 Server Server process ID is 5156.
2007-01-23 22:52:23.92 Server Authentication mode is MIXED.
2007-01-23 22:52:23.92 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
2007-01-23 22:52:23.98 Server This instance of SQL Server last reported using a process ID of 4452 at 1/18/2007 12:29:37 PM (local) 1/18/2007 8:29:37 PM (UTC). This is an informational message only; no user action is required.
2007-01-23 22:52:23.98 Server Registry startup parameters:
-d C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf
-e C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG
-l C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf
2007-01-23 22:52:23.98 Server Command Line Startup Parameters:
-c
2007-01-23 22:52:24.13 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2. From the dbcc output, it seems that the server is not using locked pages. (AWE allocated is 0). In that case, the server will be subject to paging, and the OS does not respect the min server memory settings, because it doesn't know about them.
Is this a 32-bit or 64-bit server?
Thanks, Ron D.
|||
It is 64bit OS and SQL. According to http://blogs.msdn.com/slavao/archive/2005/11/15/493019.aspx i dont need switch AWE on to use locked pages.
Here is log again:
01/30/2007 03:02:10,spid68,Unknown,AppDomain 4 (kraamat.dbo[runtime].3) created.
01/30/2007 02:46:00,spid1s,Unknown,AppDomain 3 (kraamat.dbo[runtime].2) unloaded.
01/30/2007 02:46:00,spid1s,Unknown,AppDomain 3 (kraamat.dbo[runtime].2) is marked for unload due to memory pressure.
01/30/2007 00:00:49,spid18s,Unknown,This instance of SQL Server has been using a process ID of 5044 since 29.01.2007 12:38:41 (local) 29.01.2007 10:38:41 (UTC). This is an informational message only; no user action is required.
01/29/2007 18:40:10,spid68,Unknown,AppDomain 3 (kraamat.dbo[runtime].2) created.
01/29/2007 18:31:53,spid1s,Unknown,AppDomain 2 (kraamat.dbo[runtime].1) unloaded.
01/29/2007 18:31:53,spid1s,Unknown,AppDomain 2 (kraamat.dbo[runtime].1) is marked for unload due to memory pressure.
01/29/2007 17:10:47,spid5s,Unknown,SQL Server has encountered 4 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\MSDBLog.ldf] in database [msdb] (4). The OS file handle is 0x0000000000000904. The offset of the latest long I/O is: 0x00000001222000
01/29/2007 17:10:37,spid5s,Unknown,SQL Server has encountered 72 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\sqldata\kraamat1901_data.mdf] in database [kraamat] (5). The OS file handle is 0x00000000000008D8. The offset of the latest long I/O is: 0x00001e9a434000
01/29/2007 12:48:40,spid5s,Unknown,SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mssqlsystemresource.mdf] in database [mssqlsystemresource] (32767). The OS file handle is 0x0000000000000684. The offset of the latest long I/O is: 0x000000013c8000
01/29/2007 12:45:28,spid5s,Unknown,SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\Microsoft SQL Server\MSSQL.1\MSSQL\Data\distribution153152.MDF] in database [distribution153152] (10). The OS file handle is 0x00000000000008E8. The offset of the latest long I/O is: 0x0000000281c000
01/29/2007 12:44:26,spid5s,Unknown,SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\MSDBData.mdf] in database [msdb] (4). The OS file handle is 0x00000000000008D4. The offset of the latest long I/O is: 0x000000001c0000
01/29/2007 12:44:06,spid5s,Unknown,SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\MSDBLog.ldf] in database [msdb] (4). The OS file handle is 0x0000000000000904. The offset of the latest long I/O is: 0x00000002245000
01/29/2007 12:44:06,spid5s,Unknown,SQL Server has encountered 1 occurrence(s) of I/O requests taking longer than 15 seconds to complete on file [S:\sqldata\kraamat1901_data.mdf] in database [kraamat] (5). The OS file handle is 0x00000000000008D8. The offset of the latest long I/O is: 0x000011affe0000
01/29/2007 12:43:12,spid80,Unknown,AppDomain 2 (kraamat.dbo[runtime].1) created.
01/29/2007 12:43:11,spid80,Unknown,Common language runtime (CLR) functionality initialized using CLR version v2.0.50727 from C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\.
01/29/2007 12:39:59,spid66,Unknown,Configuration option 'min server memory (MB)' changed from 2012 to 4012. Run the RECONFIGURE statement to install.
01/29/2007 12:38:59,spid53,Unknown,Using 'xplog70.dll' version '2005.90.2047' to execute extended stored procedure 'xp_msver'. This is an informational message only; no user action is required.
01/29/2007 12:38:59,spid53,Unknown,Using 'xpsqlbot.dll' version '2005.90.2047' to execute extended stored procedure 'xp_qv'. This is an informational message only; no user action is required.
01/29/2007 12:38:59,spid53,Unknown,Configuration option 'Agent XPs' changed from 0 to 1. Run the RECONFIGURE statement to install.
01/29/2007 12:38:41,spid23s,Unknown,Changing the status to FLUSH for full-text catalog "cat_isikud" (7) in database "kraamat" (5). This is an informational message only. No user action is required.
01/29/2007 12:38:41,spid7s,Unknown,Launched startup procedure 'sp_MSrepl_startup'.
01/29/2007 12:38:41,spid7s,Unknown,Recovery is complete. This is an informational message only. No user action is required.
01/29/2007 12:38:41,spid7s,Unknown,Recovery of any in-doubt distributed transactions involving Microsoft Distributed Transaction Coordinator (MS DTC) has completed. This is an informational message only. No user action is required.
01/29/2007 12:38:38,spid21s,Unknown,Recovery is writing a checkpoint in database 'kraamat' (5). This is an informational message only. No user action is required.
01/29/2007 12:38:38,spid21s,Unknown,Analysis of database 'kraamat' (5) is 100% complete (approximately 0 seconds remain). This is an informational message only. No user action is required.
01/29/2007 12:38:34,spid26s,Unknown,Starting up database 'distribution153152'.
01/29/2007 12:38:34,spid24s,Unknown,Starting up database 'white'.
01/29/2007 12:38:34,spid20s,Unknown,Starting up database 'msdb'.
01/29/2007 12:38:34,spid21s,Unknown,Starting up database 'kraamat'.
01/29/2007 12:38:34,spid25s,Unknown,Starting up database 'distribution'.
01/29/2007 12:38:34,spid23s,Unknown,Starting up database 'pink'.
01/29/2007 12:38:34,spid22s,Unknown,Starting up database 'ASPState'.
01/29/2007 12:38:34,spid52,Unknown,Using 'xpstar90.dll' version '2005.90.2047' to execute extended stored procedure 'xp_instance_regread'. This is an informational message only; no user action is required.
01/29/2007 12:38:33,Server,Unknown,SQL Server is now ready for client connections. This is an informational message; no user action is required.
01/29/2007 12:38:33,Server,Unknown,The SQL Network Interface library could not register the Service Principal Name (SPN) for the SQL Server service. Error: 0x2098. Failure to register an SPN may cause integrated authentication to fall back to NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies.
01/29/2007 12:38:33,spid14s,Unknown,Service Broker manager has started.
01/29/2007 12:38:33,spid14s,Unknown,The Database Mirroring protocol transport is disabled or not configured.
01/29/2007 12:38:33,spid14s,Unknown,The Service Broker protocol transport is disabled or not configured.
01/29/2007 12:38:33,Server,Unknown,Server named pipe provider is ready to accept connection on [ \\.\pipe\$$\SQL50\MSSQL$kris\sql\query ].
01/29/2007 12:38:33,Server,Unknown,Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\KRIS ].
01/29/2007 12:38:33,Server,Unknown,Server is listening on [ 10.1.6.185 <ipv4> 2188].
01/29/2007 12:38:33,Server,Unknown,A self-generated certificate was successfully loaded for encryption.
01/29/2007 12:38:33,spid11s,Unknown,Starting up database 'tempdb'.
01/29/2007 12:38:33,spid11s,Unknown,Clearing tempdb database.
01/29/2007 12:38:33,spid11s,Unknown,Starting up database 'model'.
01/29/2007 12:38:33,spid7s,Unknown,The NETBIOS name of the local node that is running the server is 'SQLNODE7'. This is an informational message only. No user action is required.
01/29/2007 12:38:33,spid7s,Unknown,Server name is 'SQL50\KRIS'. This is an informational message only. No user action is required.
01/29/2007 12:38:32,spid7s,Unknown,The resource database build version is 9.00.2153. This is an informational message only. No user action is required.
01/29/2007 12:38:32,spid7s,Unknown,Starting up database 'mssqlsystemresource'.
01/29/2007 12:38:32,spid7s,Unknown,SQL Trace ID 1 was started by login "sa".
01/29/2007 12:38:32,spid7s,Unknown,Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
01/29/2007 12:38:31,spid7s,Unknown,Starting up database 'master'.
01/29/2007 12:38:31,Server,Unknown,Database mirroring has been enabled on this instance of SQL Server.
01/29/2007 12:38:31,Server,Unknown,Attempting to recover in-doubt distributed transactions involving Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
01/29/2007 12:38:28,Server,Unknown,Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
01/29/2007 12:38:28,Server,Unknown,Multinode configuration: node 1: CPU mask: 0x0000000000000003 Active CPU mask: 0x0000000000000003. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
01/29/2007 12:38:28,Server,Unknown,Multinode configuration: node 0: CPU mask: 0x000000000000000c Active CPU mask: 0x000000000000000c. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
01/29/2007 12:38:28,Server,Unknown,Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
01/29/2007 12:38:28,Server,Unknown,Detected 4 CPUs. This is an informational message; no user action is required.
01/29/2007 12:38:28,Server,Unknown,SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
01/29/2007 12:38:28,Server,Unknown,-l S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf
01/29/2007 12:38:28,Server,Unknown,-e S:\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG
01/29/2007 12:38:28,Server,Unknown,-d S:\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf
01/29/2007 12:38:28,Server,Unknown,Registry startup parameters:
01/29/2007 12:38:28,Server,Unknown,This instance of SQL Server last reported using a process ID of 3984 at 29.01.2007 12:38:20 (local) 29.01.2007 10:38:20 (UTC). This is an informational message only; no user action is required.
01/29/2007 12:38:28,Server,Unknown,Logging SQL Server messages in file 'S:\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
01/29/2007 12:38:28,Server,Unknown,Server process ID is 5044.
01/29/2007 12:38:28,Server,Unknown,All rights reserved.
01/29/2007 12:38:28,Server,Unknown,(c) 2005 Microsoft Corporation.
01/29/2007 12:38:28,Server,Unknown,Microsoft SQL Server 2005 - 9.00.2153.00 (X64) <nl/> May 9 2006 13:58:37 <nl/> Copyright (c) 1988-2005 Microsoft Corporation<nl/> Standard Edition (64-bit) on Windows NT 5.2 (Build 3790: Service Pack 1)
Tiitl
|||Here are memory monitoring pictures: https://www.just.ee/fail/dl/30%2E01%2E2007%5F13%5F02%5F27%5F20736%5Fmemory%2Edoc
Server have enough free memory, but sqlserv paging the data to virtual memory and after relesingsqlserv physical memory usage is only 500MB.
|||You are correct that 64-bit SQL Server ignores the AWE setting. What you need to do (for a start), is give the "Lock Pages in Memory" right to the SQL Server Service account. This will keep the OS from paging and let SQL Server control it.
http://glennberrysqlperformance.spaces.live.com/blog/cns!45041418ECCAA960!115.entry
Then, you should see whether you are having problems with single use, ad-hoc queries bloating your procedure cache, and causing internal memory pressure. See the link below for more detail.
http://glennberrysqlperformance.spaces.live.com/blog/cns!45041418ECCAA960!366.entry
No comments:
Post a Comment