Log pagefile and warn if disabled or suboptimal

This commit is contained in:
Unnoen 2021-01-11 17:59:32 +11:00
parent 13c39d3d27
commit 359d85ccf9
No known key found for this signature in database
GPG Key ID: 8F8E42252BA20553
3 changed files with 9 additions and 1 deletions

View File

@ -15,6 +15,8 @@ namespace Wabbajack.Lib
public long VideoMemorySize { get; set; }
public long SystemMemorySize { get; set; }
public long SystemPageSize { get; set; }
public Version WindowsVersion { get; set; } = Environment.OSVersion.Version;
/// <summary>

View File

@ -56,6 +56,7 @@ namespace Wabbajack.Util
ScreenHeight = height,
VideoMemorySize = video_memory,
SystemMemorySize = (long)memory.ullTotalPhys,
SystemPageSize = (long)memory.ullTotalPageFile - (long)memory.ullTotalPhys
};
}
}

View File

@ -47,7 +47,12 @@ namespace Wabbajack
$"You are not running a recent version of Windows (version 10 or greater), Wabbajack is not supported on OS versions older than Windows 10.");
Utils.Log(
$"System settings - ({p.SystemMemorySize.ToFileSizeString()} RAM), Display: {p.ScreenWidth} x {p.ScreenHeight} ({p.VideoMemorySize.ToFileSizeString()} VRAM - VideoMemorySizeMb={p.EnbLEVRAMSize})");
$"System settings - ({p.SystemMemorySize.ToFileSizeString()} RAM) ({p.SystemPageSize.ToFileSizeString()} Page), Display: {p.ScreenWidth} x {p.ScreenHeight} ({p.VideoMemorySize.ToFileSizeString()} VRAM - VideoMemorySizeMb={p.EnbLEVRAMSize})");
if (p.SystemPageSize == 0)
Utils.Log("Pagefile is disabled! Consider increasing to 20000MB. A disabled pagefile can cause crashes and poor in-game performance.");
else if (p.SystemPageSize < 2e+10)
Utils.Log("Pagefile below recommended! Consider increasing to 20000MB. A suboptimal pagefile can cause crashes and poor in-game performance.");
Warmup();