PREEMPTIVE_SHAREDMEM_GETDATA SQL Server Wait Type

Wait Type PREEMPTIVE_SHAREDMEM_GETDATA

The wait type PREEMPTIVE_SHAREDMEM_GETDATA is ranked #67 by Stedman Solutions and Database Health Monitor.

Wait statistics, in the context of SQL Server, refer to the amount of time that a query spends waiting to access data in the database. When a client application requests data from the database, the request is placed in a queue and the client application must wait for its turn to access the data. The time that the query spends waiting is called a "wait" and is tracked by SQL Server. This information can be used to identify potential performance bottlenecks and optimize the performance of the database. Wait statistics are commonly used by database administrators to diagnose and troubleshoot performance issues in SQL Server.


In SQL Server, wait types help us understand what operations are causing delays in processing. One specific wait type, PREEMPTIVE_SHAREDMEM_GETDATA, shows up when SQL Server is waiting on an external operation to retrieve data from shared memory. Shared memory is a space in memory that different processes can access and use to share information efficiently. This wait type often occurs in environments where SQL Server is integrated with external applications. In this post, we’ll explore what PREEMPTIVE_SHAREDMEM_GETDATA means, when it appears, and what it might tell us about your SQL Server performance.

What Is the PREEMPTIVE_SHAREDMEM_GETDATA Wait Type?

The PREEMPTIVE_SHAREDMEM_GETDATA wait type appears when SQL Server is waiting to retrieve data from a shared memory space. “Shared memory” allows different applications or services to exchange information quickly. For example, an external application might store information in shared memory for SQL Server to read, instead of SQL Server retrieving it through traditional data access methods.

When SQL Server requests data from this shared memory, it relies on the operating system to handle the transfer. During this time, SQL Server operates in preemptive mode, which means it hands control over to the OS to complete the task. While SQL Server waits for the OS to return the requested data, it records a PREEMPTIVE_SHAREDMEM_GETDATA wait.

When Does PREEMPTIVE_SHAREDMEM_GETDATA Appear?

This wait type typically appears in SQL Server environments where shared memory is used for communication between SQL Server and external applications or services. Some scenarios where PREEMPTIVE_SHAREDMEM_GETDATA waits may occur include:

  • Integration with External Applications – SQL Server might retrieve data from shared memory if it is integrated with another application that places data there for SQL Server to access.
  • Third-Party Monitoring Tools – Certain third-party monitoring or logging tools use shared memory to interact with SQL Server, which may result in these waits.
  • Data Caching – In some setups, external applications may cache data in shared memory to speed up data access for SQL Server, resulting in PREEMPTIVE_SHAREDMEM_GETDATA waits as SQL Server retrieves this cached data.

Some PREEMPTIVE_SHAREDMEM_GETDATA waits are expected in environments that rely on shared memory for external communication. However, frequent or prolonged waits may indicate performance issues in how SQL Server is accessing this data.

Why PREEMPTIVE_SHAREDMEM_GETDATA Waits Matter

While PREEMPTIVE_SHAREDMEM_GETDATA waits are common in environments using shared memory, high or frequent waits may impact SQL Server’s performance. If SQL Server has to frequently wait on the OS or an external application to retrieve shared memory data, it can slow down the execution of other queries or processes.

Common causes of high PREEMPTIVE_SHAREDMEM_GETDATA waits include:

  • Slow Response from External Applications – If the application providing the data in shared memory is slow, SQL Server will have to wait longer to retrieve it.
  • High Memory Demand – If shared memory is overused or if there’s contention for memory resources, SQL Server may experience delays.
  • Network Latency (in distributed environments) – In cases where shared memory is used across networked systems, network delays can contribute to wait times.

How to Address PREEMPTIVE_SHAREDMEM_GETDATA Waits

If you’re experiencing high PREEMPTIVE_SHAREDMEM_GETDATA waits, here are some strategies to help improve performance:

  • Optimize the External Application – Ensure that any external application providing data to shared memory is optimized for performance so that it can deliver data quickly to SQL Server.
  • Monitor Memory Usage – Keep an eye on shared memory utilization. If the server’s memory resources are limited, adding more memory may help reduce wait times.
  • Reduce Dependency on Shared Memory – If possible, limit the use of shared memory or use more efficient data-sharing techniques that reduce SQL Server’s reliance on waiting for external data.
  • Improve Network Performance – In distributed systems, check network latency and bandwidth to ensure that data transfer to shared memory is not delayed.

Conclusion

The PREEMPTIVE_SHAREDMEM_GETDATA wait type in SQL Server indicates that SQL Server is waiting for data from shared memory, often due to interactions with external applications. While these waits are typical in setups that use shared memory for fast data sharing, high or prolonged waits could signal issues with external application performance, memory utilization, or network latency. By optimizing the external application, monitoring memory usage, and improving network performance, you can help reduce PREEMPTIVE_SHAREDMEM_GETDATA waits and enhance SQL Server performance.

If you’re looking for expert assistance with SQL Server performance tuning and optimizing external data integrations, Stedman Solutions offers managed services to keep your SQL Server environment running efficiently and reliably.


Watch on YouTube


Find out more about our SQL Server Managed Services

Applies to

Related Waits

PREEMPTIVE_COM_CREATEACCESSOR
PREEMPTIVE_COM_GETDATA
PREEMPTIVE_COM_QUERYINTERFACE
PREEMPTIVE_COM_RELEASE
PREEMPTIVE_COM_RELEASEROWS
PREEMPTIVE_COM_SEQSTRMREAD
PREEMPTIVE_COM_SETPARAMETERINFO
PREEMPTIVE_COM_SETPARAMETERPROPE
PREEMPTIVE_FILESIZEGET
PREEMPTIVE_HADR_LEASE_MECHANISM
PREEMPTIVE_OLEDB_RELEASE
PREEMPTIVE_OLEDBOPS
PREEMPTIVE_OS_AUTHENTICATIONOPS
PREEMPTIVE_OS_AUTHORIZATIONOPS
PREEMPTIVE_OS_AUTHZGETINFORMATIO
PREEMPTIVE_OS_AUTHZINITIALIZECON
PREEMPTIVE_OS_AUTHZINITIALIZERES
PREEMPTIVE_OS_BACKUPREAD
PREEMPTIVE_OS_CLOSEHANDLE
PREEMPTIVE_OS_CLUSTEROPS
PREEMPTIVE_OS_CREATEFILE
PREEMPTIVE_OS_CRYPTACQUIRECONTEX
PREEMPTIVE_OS_CRYPTIMPORTKEY
PREEMPTIVE_OS_CRYPTOPS
PREEMPTIVE_OS_DELETEFILE
PREEMPTIVE_OS_DEVICEIOCONTROL
PREEMPTIVE_OS_DEVICEOPS
PREEMPTIVE_OS_DTCOPS
PREEMPTIVE_OS_ENCRYPTMESSAGE
PREEMPTIVE_OS_FILEOPS
PREEMPTIVE_OS_FLUSHFILEBUFFERS
PREEMPTIVE_OS_GENERICOPS
PREEMPTIVE_OS_GETCOMPRESSEDFILES
PREEMPTIVE_OS_GETDISKFREESPACE
PREEMPTIVE_OS_GETFILEATTRIBUTES
PREEMPTIVE_OS_GETFINALFILEPATHBY
PREEMPTIVE_OS_GETPROCADDRESS
PREEMPTIVE_OS_LIBRARYOPS
PREEMPTIVE_OS_LOADLIBRARY
PREEMPTIVE_OS_LOGONUSER
PREEMPTIVE_OS_LOOKUPACCOUNTSID
PREEMPTIVE_OS_MOVEFILE
PREEMPTIVE_OS_NETVALIDATEPASSWOR
PREEMPTIVE_OS_PIPEOPS
PREEMPTIVE_OS_QUERYREGISTRY
PREEMPTIVE_OS_REPORTEVENT
PREEMPTIVE_OS_REVERTTOSELF
PREEMPTIVE_OS_SECURITYOPS
PREEMPTIVE_OS_SERVICEOPS
PREEMPTIVE_OS_SQLCLROPS
PREEMPTIVE_OS_VERIFYTRUST
PREEMPTIVE_OS_WAITFORSINGLEOBJEC
PREEMPTIVE_OS_WRITEFILEGATHER
PREEMPTIVE_SERVICE_CONTROL_MANAGE
PREEMPTIVE_SERVICE_CONTROL_MANGE
PREEMPTIVE_XE_CALLBACKEXECUTE
PREEMPTIVE_XE_GETTARGETSTATE
PREEMPTIVE_XE_SESSIONCOMMIT
PREEMPTIVE_XE_TARGETFINALIZE
PREEMPTIVE_XE_TARGETINIT

See Also


All Wait Types
PREEMPTIVE_SHAREDMEM_GETDATA SQL Server Wait Type