Monday, June 18, 2018

Calling Powershell Memory Management Metrics inside R

There are a lot of memory management and memory management metrics in Windows 10 e.g (Resource monitor, performance monitor, kernel logging in event viewer) .  However, you can call Powershell memory management functions and metrics from inside R. This allows you to measure how Windows sees your libraries, functions, etc. from inside your R scripts. Windows 10 memory management uses "memory compression". "Memory Compression" is a 'hidden process' in PS. You can mix R's memory commands (e.g. memory.size,memory.limt,gc) and call cmd shell (eg. 'shell('systeminfo | findstr "Memory"')' ). [This post needs viewing on a wide screen.]