In short
SQL Server can use a large amount of memory by design. On a Windows VPS, that is good for database performance, but dangerous if SQL Server is allowed to compete with Windows, RDP sessions, IIS, backup tools, or other business apps. Set a safe max server memory (MB) value, leave enough RAM for the operating system, then verify the setting with sp_configure and monitor actual SQL Server process memory.
Quick verdict
| Situation | Recommended action |
|---|---|
| SQL Server is the main workload on the VPS | Set max server memory and leave RAM for Windows |
| SQL Server shares the VPS with IIS, RDP users, or apps | Reserve more memory for non-SQL workloads |
| Small SQL Server Express test VM | Use the same commands, but remember Express has edition limits |
| Windows feels slow after SQL Server install | Check SQL Server memory cap first |
| RDP becomes laggy while SQL is running | Check CPU/RAM baseline and SQL process memory |
| Production Standard or Enterprise workload | Tune memory more carefully and monitor over time |
The goal is not to starve SQL Server. The goal is to stop SQL Server from starving Windows and the other workloads on the VPS.
Why SQL Server uses so much memory
SQL Server uses memory aggressively because memory makes databases faster.
It uses RAM for:
- Data page cache
- Query plan cache
- Sorts and hash operations
- Locks and connections
- Columnstore and in-memory features, where used
- Internal engine operations
By default, SQL Server may be allowed to use a very high amount of memory. On a dedicated database server, that can be acceptable if the server is sized correctly. On a VPS that also runs RDP sessions, IIS, backup jobs, monitoring tools, or business apps, an uncapped SQL Server instance can make Windows feel slow.
Typical symptoms:
- RDP desktop feels delayed
- Windows starts paging to disk
- Other services slow down
- Backup jobs take longer
- SQL Server itself becomes inconsistent under memory pressure
- Users report that the server “freezes” during business hours
A safe memory cap prevents SQL Server from taking RAM that Windows and other workloads need.
What we tested on Raff
We tested the memory checks and configuration commands on a Raff Windows VPS running Windows Server 2025 Datacenter Evaluation and SQL Server 2025 Express.

Test environment:
| Item | Value |
|---|---|
| Provider | Raff Technologies |
| OS | Windows Server 2025 Datacenter Evaluation |
| SQL Server | SQL Server 2025 Express |
| Instance | SQLEXPRESS |
| VPS size | 4 vCPU / approximately 8 GB RAM |
| Test date | 2026-05-26 |
| Tester | Aybars Altinyay |
On this VM, we verified:
- Windows Server and SQL Server service state
- Total and free Windows memory
- Current SQL Server memory configuration
- SQL Server process memory usage
- Setting
max server memory (MB) - Verifying the new memory cap
We tested with SQL Server Express. Production memory tuning is often more important on SQL Server Standard and Enterprise, where larger workloads and higher memory usage are common.
SQL Server Express note
SQL Server Express is useful for testing and small workloads, but it has edition limits. That means Express may not behave like a larger Standard or Enterprise production instance.
Still, Express is useful for demonstrating the tuning workflow:
- Check Windows RAM.
- Check SQL Server memory configuration.
- Check SQL Server process memory.
- Set
max server memory. - Verify the setting.
For production workloads, always confirm the SQL Server edition, workload size, and memory requirements before choosing the final value.
Step 1 - Check total and free Windows memory
Before changing SQL Server settings, check how much memory the VPS has and how much is free.
Run PowerShell as Administrator:
$os = Get-CimInstance Win32_OperatingSystem [PSCustomObject]@{ TotalRAM_GB = [math]::Round($os.TotalVisibleMemorySize / 1MB, 2) FreeRAM_GB = [math]::Round($os.FreePhysicalMemory / 1MB, 2) }

This tells you whether the operating system already has enough headroom.
If free memory is already low before SQL Server is under load, do not simply increase the SQL Server memory cap. Investigate what else is using RAM or resize the VPS.
Step 2 - Check current SQL Server memory configuration
Use sp_configure to check the current SQL Server memory settings.
For the SQLEXPRESS instance, run:
sqlcmd -S localhost\SQLEXPRESS -E -C -Q "EXEC sp_configure 'show advanced options', 1; RECONFIGURE; EXEC sp_configure 'max server memory (MB)'; EXEC sp_configure 'min server memory (MB)';"

The important setting is:
max server memory (MB)
If the value is extremely high, SQL Server is effectively uncapped, subject to edition and workload behavior.
That is not ideal on a VPS that also needs memory for Windows, RDP, IIS, backup tools, or other services.
Step 3 - Check actual SQL Server process memory
The configuration value tells you what SQL Server is allowed to use. The process check tells you what it is using now.
Run:
Get-Process | Where-Object {$_.ProcessName -like "sqlservr*"} | Select-Object ProcessName, Id, @{Name="WorkingSet_MB";Expression={[math]::Round($_.WorkingSet64/1MB,2)}}, @{Name="PrivateMemory_MB";Expression={[math]::Round($_.PrivateMemorySize64/1MB,2)}}

Use this together with Task Manager and SQL Server performance counters.
A low number on a test database does not mean SQL Server is tuned. It only means the current workload is small. Production databases can grow into the configured cap over time.


