Skip to content

Commit

Permalink
Merge pull request #690 from ministryofjustice/rman_reduce_channels
Browse files Browse the repository at this point in the history
Updated to reduce the number of channels due to high cpu usage during…
  • Loading branch information
Sandhya1874 authored Apr 13, 2024
2 parents 5e1ee53 + e1fec89 commit afeb082
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ansible/roles/oracle-db-backup/templates/rman_backup.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,14 @@ build_rman_command_file () {
X=$(sqlplus -s "/ as sysdba" <<EOF
whenever sqlerror exit 1
set feedback off heading off verify off echo off
select 'CPU_COUNT='|| case when value < 5 then 2 else to_number(value) end from $V_PARAMETER where name = 'cpu_count';
select 'CPU_COUNT='|| value/2 from $V_PARAMETER where name = 'cpu_count';
exit
EOF
)

[ $? -ne 0 ] && error "Cannot determine cpu count"
eval $X
info "cpu count = $CPU_COUNT"
info "Channels used for backup = $CPU_COUNT"

if [ "$CATALOGMODE" = "Y" ]
then
Expand Down

0 comments on commit afeb082

Please sign in to comment.