Hello Hexo World
The blog is migrated to Hexo today! Check documentation for more info.
The blog is migrated to Hexo today! Check documentation for more info.
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.
Device-Mapper’s “delay” target delays reads and/or writes and maps them to different devices.
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.
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.
[ec2-user@ip-192-168-93-151 ~]$ psql -h 192.168.28.223 -U postgres -d postgres
Password for user postgres:
postgres=# SHOW config_file;
config_file
-------------------------------------
/var/lib/pgsql/data/postgresql.conf
(1 row)
postgres=# SHOW data_directory;
data_directory
---------------------
/var/lib/pgsql/data
(1 row)
[ec2-user@ip-192-168-28-223 ~]$ cat /etc/os-release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
[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
Refer to this post to install PostgreSQL.
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.