Monday, July 1, 2013

Large memory usage problem in Red Hat 6.x

Step 1:  Check memory usages
# free -m
                         total       used       free     shared    buffers     cached
Mem:              16081      15848        232          0        379      13846

            Still memory utilization is very high.

 Step 2: Check value of ‘vm.vfs_cache_pressure’
# sysctl -a | grep vfs_cache_pressure
vm.vfs_cache_pressure = 100

 Step 3: Change 1000 instead of 100
# vi /etc/sysctl.conf
vm.vfs_cache_pressure = 1000

Step 4: Make value effective
# sysctl -p
vm.vfs_cache_pressure = 1000

Set /proc/sys/vm/vfs_cache_pressure at 1000, memory usage would usually hover around 700-900MB, but if anything needs lots of memory (e.g. copying lots amount of data to tmpfs) it's usage would drop back to around 100-130MB mark.

Step 5:  Check memory usages
# free -m
                         total       used       free     shared    buffers     cached
Mem:              16081      15884        197          0        379      13850

Step 6: Run below command again
# sync && echo 3 > /proc/sys/vm/drop_caches
 
Meaning of above command parameters
            echo 1 > /proc/sys/vm/drop_caches  # free pagecache, [OR]
            echo 2 > /proc/sys/vm/drop_caches  # free dentries and inodes, [OR]
            echo 3 > /proc/sys/vm/drop_caches  # free pagecache, dentries and inodes

            sync  # forces the dump to be destructive

Step 7:  Check memory usages
# free -m
                                         total       used       free     shared    buffers     cached
Mem:               16081       1166      14915          0          4        149

 

Saturday, June 29, 2013

Steps to take DB backup in TSM 6.3

Step 1: Create folder where you want to store the DB backup

mkdir E:\dbbackup

Step 2: update the device class ‘maximum volume capacity’ and ‘path to store files’

UPDATE DEVCLASS FILEDEV1 DIR=E:\DBBACKUP MAXCAP=50G SHARED=YES

Step 3: Take full backup of DB

backup db type=full devclass=filedev1
 
Error will generate:
            ANR2590E BACKUP DB failed - SET DBRECOVERY command has not been issued.
            ANS8001I Return code 3.

Step 4: Set device class for automatic DB backup to FILEDEV1

set dbrecovery filedev1

Step 5: Again take full backup of DB

backup db type=full devclass=filedev1
 
Now process will start and at the end it will show message like “Database Backup running in the BACKGROUND completed with completion state SUCCESS at xx:xx:xx.”

            There are following types of backup you can run. This parameter is optional. The default is

INCREMENTAL.

a)      Incremental

An incremental (or cumulative) backup image contains a copy of all database data that has changed since the last successful full backup operation was performed.

b)     Full

To run a full backup of the Tivoli Storage Manager database.

c)      DBSnapshot

To run a full snapshot database backup. The entire contents of a database are copied and a new snapshot database backup is created without interrupting the existing full and incremental backup series for the database.

Step 6: Take backup of Server sequential volume history information file

backup volhist f=e:\dbbackup\volhist.out wait=yes

Step 7: Take backup of Server device configuration information file

backup devconfig f=e:\dbbackup\devconfig.out wait=yes

Step 6: Delete sequential volume history entries

delete volhist t=dbb todate=today-2 wait=yes