Monday, October 7, 2024

Postgresql Instance-Cluster/Database/Schema

 

 


 

 

Cluster --> Instance --> set of databases

Above diagram shows that on a server we can have multiple Instances(Clusters) of postgresql running same version or different versions, but they listen on different ports.

Monday, September 9, 2024

FSx ontap CLI commands to check key metrics

 Login to FSx instance using management IP as "fsxadmin"

Enter diagnostic mode **caution while using this mode, should be done with consultation from NetApp Support

        In FSx CLI mode >>

        set d  (yes)

        command to check overall latency statistics
        qos statistics workload latency show

        command to check overall volume statistics
        statistics volume show

        command to check per volume latency details
        qos statistics volume latency show -volume vol01 -vserver svm_name


Tuesday, August 6, 2024

Setting up ssh keys for EC2 instance on AWS

 





 
 
 



create ssh key pair
ssh-keygen -f my-keypair
this creates 2 files my-keypair & my-keypair.pub in the current directory
use puttygen to convert my-keypair to my-keypair.ppk
we'll use my-keypair.pub on EC2 instance


end user/clients will use private key -- my-keypair.ppk
 
# create EC2 instance via Terraform
# creating test ec2 instance for using ssh keypair made with TF
resource "aws_instance" "mam_test1" {
  ami           = "ami-xxxxxxxx"
  instance_type = "t2.micro"
  security_groups =["sg-yyyy" ]
  associate_public_ip_address =false
  subnet_id = "subnet-zzzzzz"
  key_name = "my-keypair"
  tags = {
    Name = "my_keypair"
  }
}

resource "aws_key_pair" "may-keypair" {
  key_name = "my-keypair"
  public_key = "${file("my-keypair.pub")}"
 
}

output "mam_test1ip" {
  value=aws_instance.mam_test1.private_ip
}

Once the instance is created use the my-keypair.ppk to connect to EC2 instance.

Tuesday, April 30, 2024

FSxN - OnTAP on AWS limited by network bandwidth of EC2 Instance



In DBA world stakes are high for a business critical database demanding high levels of performance. As a robust & high performing storage is expected to meet the low latency requirements, OnTAP which has been delivering on storage front for decades,  extend their services on AWS Cloud as FSxN.


FSxN storage is being used as NFS mount on a Linux server (EC2 instance) hosting an Oracle database which is a part of Dataguard configuration. While a lag caused the standby database to become out of sync, once the underlying issue of extending mount was fixed, shipping & reading of archiving logs was painstakingly slow.



BlueXP & AWS Console showed no spike in key metrics of latency, IOPS or throughput, however the apply of archiving logs & copy of archive logs from remote primary database server to standby server was very slow.


Even though CPU, memory utilization was low, the copy of archive logs & apply of it was slow as the network throughput limit was reached for x1e.xlarge EC2 instance. To resolve this issue instance type was changed from x1e.xlarge to r6id.2xlarge, this has a throughput of 3125 mbps. Post instance type  change copy & apply of archive logs throughput increased & allowed to get standby in sync.