Boost DB2 High Performance with Docker in Windows OS



In this case, there were of my properties I used to :

* Windows 10 Pro x64

* Docker desktop

* WSL v2

* DB2 v12 container

* RAM 32 GB

* Storage NVME gen-2 with size 1 TB

* CPU Intel i7 gen 8 with 12 cores

* Virtual paging size 32 GB

* DB2 swap size 100 GB


1. Download WSL v2, then install.

https://learn.microsoft.com/en-us/windows/wsl/install-manual


2. Download docker desktop :

https://docs.docker.com/desktop/setup/install/windows-install/

choose :   Docker Desktop for Windows - x86_x64

after the installer downloaded, double click the file to install.


3. Create .wslconfig file on path location C:\Users\admin then edit with Notepad++, next copy - paste the following configuration into it.

----------------------------------------------------------

[wsl2]

memory=32GB

processors=12

swap=100GB

localhostforwarding=true

hardwarePerformanceCounters=false

----------------------------------------------------------


4. Change and update virtual paging size










5. Boost CPU clock.

Open "System Configuration".     Then click tab "Boot".     Then click button "Advanced options...".     Then click checkbox to be true.     After that choose "Number of processors".     Then choose the option of 12 or even more it depends on your CPU.

Finally, reboot your OS.










6. Install DB2.

Open docker desktop first, then follow these sections :

--------------------------------------------------------------

Create DB2 Machine

https://git-maspaad.blogspot.com/2025/10/create-db2-machine.html


Increase LogFileSize for Better Transaction Process

https://git-maspaad.blogspot.com/2024/02/ibm-db2-increase-logfilesize-for-better.html


done.


It was amazing currently I've unlocked the best one CPU clock reading test performance with over 5 million rows almost about to for 2 seconds.

This test has been for recommended and highly accepted.

Comments