I am trying to create a very simple batch script to make high usage of CPU and disk with low memory(RAM) footprint.
The purpose is to make the system very slow to test and fix some timeout exceptions issues.
For high CPU usage, I am able to achieve it with this simple batch script and running 4-5 instances of it.
@echo off
:loop
goto loop
I modified the script to do some read-write operations as well to get high disk usage, but despite I am running multiple instances I am still getting almost 0% disk usage with my SSD disk. Below is my modified script -
@echo off
:loop
set file=D:\text%random%.txt
FOR /L %%A IN (1,1,20) DO (ECHO This is garbage text. >> %file%)
del %file%
goto loop
Any suggestions how to increase the disk usage.
Note:
- My task would be done if I can make CPU and disk usage high, but I would be curious to know how to increase memory usage as well.
- I understand that complex solution like lots of zip/unzip using Powershell and 7Zip, etc may work. But I want to achieve this as simple as possible without using any 3rd party tools (Burn tests).
- I can use PowerShell as well, provided without any 3rd party tools.