I have always liked traveling to new countries. The breathtaking landscapes, vibrant city life, and the call of the wild have always beckoned to me. So, I embarked on an unforgettable journey to explore the wonders of Western Canada, particularly the picturesque gems of Calgary, Banff National Park, Jasper National Park, and Yoho National Park. From the urban charm of downtown Calgary to the awe-inspiring majesty of the national parks, every moment was a captivating experience.

Read more »

What is TCP Three-Way HandShake

TCP 3-way handshake is a process which is used in a TCP/IP network to make a connection between the client and server. It is a three-step process that requires both the client and server to exchange synchronization and acknowledgment packets before the real data communication process starts.

Read more »

For the modern computers, they mostly have multiple CPU cores. We can use Python’s multiprocessing module to automatically get the number of CPU cores. Then we use this module to spawn corresponding processes to generate load on all the CPU cores concurrently.

Read more »

Check the current installed data directory

[ec2-user@ip-192-168-93-151 ~]$  psql -h -U postgres -d postgres
Password for user postgres:

postgres=# SHOW config_file;
(1 row)

postgres=# SHOW data_directory;
(1 row)
Read more »

Download and install updates

[ec2-user@ip-192-168-28-223 ~]$ cat /etc/os-release
NAME="Amazon Linux"
ID_LIKE="centos rhel fedora"
PRETTY_NAME="Amazon Linux 2"
[ec2-user@ip-192-168-28-223 ~]$ cat /etc/system-release
Amazon Linux release 2 (Karoo)

[ec2-user@ip-192-168-28-223 ~]$ sudo yum update -y
Read more »

Install PostgreSQL

Refer to this post to install PostgreSQL.

Intro to pgbench

pgbench is a simple program for running benchmark tests on PostgreSQL. It runs the same sequence of SQL commands over and over, possibly in multiple concurrent database sessions, and then calculates the average transaction rate (transactions per second). By default, pgbench tests a scenario that is loosely based on TPC-B, involving five SELECT, UPDATE, and INSERT commands per transaction. However, it is easy to test other cases by writing your own transaction script files.

Available built-in scripts are: tpcb-like, simple-update and select-only.

Read more »