prsyahmi / GpuRamDrive

RamDrive that is backed by GPU Memory
MIT License
1.05k stars 86 forks source link

Poor performance #28

Open cyrildtm opened 4 years ago

cyrildtm commented 4 years ago

Hi,

Thank you for giving us a possibility to utilize a spare graphics card. I have a RTX 2070 Super and a Quadro K4200. Both are installed in x16 slots directly attached to CPU (not via PCH or external bridge).

Crystal Disk Mark results:

R2070S (PCIe 3.0 x16, 6553MB): Read Seq Q32T1 754.1 Read 4K Q8T8 46.13 Read 4K Q32T1 45.51 Read 4K Q1T1 42.11 Write Seq Q32T1 861.4 Write 4K Q8T8 67.63 Write 4K Q32T1 53.00 Write 4K Q1T1 45.72

K4200 (PCIe 2.0 x16, 3276MB): Read Seq Q32T1 708.9 Read 4K Q8T8 46.81 Read 4K Q32T1 50.98 Read 4K Q1T1 39.62 Write Seq Q32T1 782.8 Write 4K Q8T8 49.90 Write 4K Q32T1 56.90 Write 4K Q1T1 41.27

Comparison: An nvme SSD installed in x8 slot makes >3000 MB/s.

Is there any way to see if and where I have bottlenecks?

I did notice the ImDisk driver says "proxy mode", but I couldn't find your explanation about it for the second time. I remember I saw it somewhere here, maybe in Issues.

Logic-Elliven commented 2 years ago

I've found 3 ways to boost perf a bit:

1: Run the GPURamDrive.exe at a CPU priority of 'Above Normal' in Task Manager. (+ 20MB/s on Geforce 210. Probably more on better cards)

2: (Random 4K I/O, which is 66% of all Windows I/O) Use MSI Utility V3 to try Message Signal Interrupts and/or high interrupt priority for the GF card. (Will also improve FPS!) (+ 2MB/s for R4K on 210)

3: (Random 4K I/O, which is 66% of all Windows I/O) When formatting the drive add /a:4096 to /fs:exfat /q (I dont recall the MB/s, but more data cached using eBoostr)

Again 66% of Windows I/O is R4K @ QD1, NOT the large sequential marketers wave around like burning flags! Large sequential is less than 1% of Windows I/O..! Thats way you have RAM: Random Access Memory. It sdaves data in 4KB blocks.

This will also reduce slack (wasted space/RAM if a file is smaller than the stock 32KB cluster size for exFAT. ie: You will get more data onto your RamDrive.

2 Untested ideas

1: "...[since] ImDisk Virtual Disk Driver beta 2.0.0.

Rewritten I/O request logic to allow fully parallel I/O. This is by default only used when communicating with AWEAlloc driver for physical memory virtual disks, but can be turned on for any virtual disks backed by an image file or another kernel level driver, provided that the underlying driver supports it. Use -o par command line option to turn on this feature. This change should give better physical RAM disk performance..." http://www.ltr-data.se/opencode.html/changelog.html

2: WriteCacheEnableOverride by Uwe Sieber: Enables a/the Windows small, in sys RAM, write cache for exFAT, FAT32 etc. Windblows only pretends to enable a write cache for any FS except NTFS. Probably to make NTFS 'shine' more than it actually does.