Thursday, 7 November 2024

hikari-config.propraties

 [root@Agent-Application-1 sharif]# cat  /u01/tomcat-finger-others/apache-tomcat-9.0.86/apache-tomcat-9.0.86/webapps/FingerAPI/WEB-INF/classes/hikari-config.properties


driverName = oracle.jdbc.OracleDriver

url = jdbc:oracle:thin:@10.x.x.x:1521/emob

user = xxxxxx

pass = xxxxxx


#Newly Added

cachePrepStmts = true

prepStmtCacheSize = 2500

prepStmtCacheSqlLimit = 2048

minimumIdle = 20

maximumPoolSize = 10

idleTimeout = 600000

connectionTimeout = 3000000

maxLifetime = 1000000


Monday, 7 October 2024

VT-X enable for processor in Ubuntu

 

How to enable nested virtualization

For Windows host enable VT-X for processor on Ubuntu linux are as below:

  Set-VMProcessor -VMname BOTOP -ExposeVirtualizationExtensions $true

  Set-VMProcessor -VMname BOT-IVRCRM -ExposeVirtualizationExtensions $true

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


Check if nested virtualization is enabled

Check if the required kernel module for your CPU is already loaded. Hosts with Intel CPUs require the kvm_intel module while AMD hosts require kvm_amd instead:

$ lsmod | grep -i kvm
kvm_intel               204800  0
kvm                  1347584  1 kvm_intel

If the module is loaded

If the module is already loaded, you can check if nested virtualization is enabled by running the following command:

cat /sys/module/<module>/parameters/nested

As an example for AMD hosts:

$ cat /sys/module/kvm_amd/parameters/nested
1

If the output is either 1 or Y then nested virtualization is enabled and you will not need to manually enable the feature (this should be the case for Ubuntu users).

If the module is not loaded

If the module your host requires is not loaded you can load it using modprobe and add the property nested=1 to enable nested virtualization as shown below for Intel hosts:

modprobe kvm-intel nested=1

Or as follows for AMD hosts:

modprobe kvm-amd nested=1

Enable nested virtualization

If the above checks indicate that nested virtualization is not enabled, you can follow the below steps to enable it.

  • Create a file in /etc/modprobe.d -e.g., /etc/modprobe.d/kvm.conf- and add the line options kvm-intel nested=1 to that file (replace kvm-intel with kvm-amd for AMD hosts).

  • Reload the kernel module to apply the changes:

  sudo modprobe -r <module>

Example for Intel hosts:

  sudo modprobe -r kvm-intel
  • You should now be able to see nested virtualization enabled:

Example for Intel hosts:

  $ cat /sys/module/kvm_intel/parameters/nested
  Y

Check and enable nested virtualization inside an instance

Once the host is ready to use nested virtualization it is time to check if the guest instance where the other instance(s) are going to run is able to host these nested VMs.

To determine if an instance can host another instance on top, run the below command within the instance:

egrep "svm|vmx" /proc/cpuinfo

Thursday, 29 February 2024

swap increase in linux

 

Option # 3 - Create a swap file.

 

1. Create a swap file on the current File system for example on root, for this a new Directory can be created.

  

[opc@<HOSTNAME> ~]$ sudo mkdir /swap

 

2. Create a new file into this new directory, in this example a new file for 2Gb is create.

  

[opc@<HOSTNAME> ~]$ sudo dd if=/dev/zero of=/swap/swapfile1 bs=1M count=2048

  

3.  Create a new swap area on the file that has been created.

  

[opc@<HOSTNAME> ~]$ sudo mkswap  /swap/swapfile1

 

4. Change the permissions on the file.

 

  

[opc@<HOSTNAME> ~]$ sudo chmod 600 /swap/swapfile1

  

 

5. Add the swap partition to the /etc/fstab file as indicated below on this step

 

/swap/swapfile1    swap   swap      defaults       0 0


 

 

6. Load the new swap space that had been created for the Instance.

 

[opc@<HOSTNAME> ~]$ sudo swapon -a

  

 

7. To list the swap devices run the below command.

 

[opc@<HOSTNAME> ~]$ sudo swapon -s

 

 

The new swap area that the instance will have available can be checked with this command below.

 

  

opc@<HOSTNAME> ~]$ sudo free -m
total used free shared buff/cache available
Mem: 14763 256 11898 65 2608 14102
Swap: 12661 0 12661                 <<<====  Total Swap area
 
====
 

command Line Usage

# mount -o remount,size=1024M /dev/shm

The required filesystem size is set during the mount(8) operation.  Resize a mounted filesystem by using the remount option along with the new filesystem size.

/etc/fstab Usage

tmpfs /dev/shm tmpfs size=1024M,defaults 0 0

Using /etc/fstab allows the size to be set automatically during system reboot.  If the line is missing just add it and reboot the O/S.

========