How to increase instance type of s3 copy worker instances

How to change instance type of S3 worker instances CPM

Some clients may need worker instances with more ram and CPU power. You can use this process to modify the ec2 instance type used for worker instances.
We highly recommend not to change size unless it was suggested by the N2WS support team. Otherwise you may incur additional cost and slower S3 operations.

  • Connect (via ssh) to the machine running cpm (you will probably need to execute "sudo -ito gain the root privileges )
  • In folder /cpmdata/conf/ create a text file named cpmserver.cfg (if it does not already exist)
  • Open the file in a text editor (vi or nano) and add the following lines in green under [backup_copy].
    If [backup_copy] already exists, please add the lines under it:

Version 3.0.x

[backup_copy]

Worker Instance types (selected based on instance size) for S3 Copy:

max_instance_size_for_small_copy_worker = 99
max_instance_size_for_medium_copy_worker = 999

for total volumes size of protected instance under max_instance_size_for_small_copy_worker use:
worker_types_for_small_copy_worker = c5.xlarge, m5.xlarge, t3.xlarge

for total volumes size of protected instance between max_instance_size_for_small_copy_worker and max_instance_size_for_medium_copy_worker use:
worker_types_for_medium_copy_worker = c5.2xlarge, m5.2xlarge, t3.2xlarge

for total volumes size of protected instance over max_instance_size_for_medium_copy_worker use:
worker_types_for_large_copy_worker = c5.4xlarge, m5.4xlarge, t3.4xlarge
 

Worker Instance types (selected based on instance size) for Restore

max_instance_size_for_small_restore_worker = 99
max_instance_size_for_medium_restore_worker = 999

for total volumes size of protected instance under max_instance_size_for_small_restore_worker use:
worker_types_for_small_restore_worker 
= c5.xlarge, m5.xlarge, t3.xlarge

for total volumes size of protected instance between max_instance_size_for_small_restore_worker and max_instance_size_for_medium_restore_worker
worker_types_for_medium_restore_worker = c5.2xlarge, m5.2xlarge, t3.2xlarge

for total volumes size of protected instance over max_instance_size_for_medium_restore_worker use:
worker_types_for_large_restore_worker 
= c5.4xlarge, m5.4xlarge, t3.4xlarge


Worker Instance types (selected based on instance size) for Cleanup:

max_instance_size_for_small_cleanup_worker = 1024
max_instance_size_for_medium_cleanup_worker = 1250

for total volumes size of protected instance under max_instance_size_for_small_cleanup_worker use:
worker_types_for_small_cleanup_worker = t3.small, t2.small

for total volumes size of protected instance between max_instance_size_for_small_cleanup_worker and  max_instance_size_for_medium_cleanup_worker use:
worker_types_for_medium_cleanup_worker 
= t3.small, t2.small

for total volumes size of protected instance over max_instance_size_for_medium_cleanup_worker use:
worker_types_for_large_cleanup_worker = t3.small, t2.small
  • save the file
  • restart the CPM apache2 service by executing: sudo service apache2 reload

Version 4.0.x

IMPORTANT
There has been a change in CPM 4.0 or greater for the syntax to change the CPM Worker instance size. 
When editing the /cpmdata/conf/cpmserver.cfg file, you now need to add square brackets around the instance size for the worker to use.

[backup_copy]

Worker Instance types (selected based on instance size) for S3 Copy:

max_instance_size_for_small_copy_worker = 99
max_instance_size_for_medium_copy_worker = 999

for total volumes size of protected instance under max_instance_size_for_small_copy_worker use:
worker_types_for_small_copy_worker = ["c5.xlarge"], ["m5.xlarge"], ["t3.xlarge"]

for total volumes size of protected instance between max_instance_size_for_small_copy_worker and max_instance_size_for_medium_copy_worker use:
worker_types_for_medium_copy_worker = ["c5.2xlarge"], ["m5.2xlarge"], ["t3.2xlarge"]

for total volumes size of protected instance over max_instance_size_for_medium_copy_worker use:
worker_types_for_large_copy_worker = ["c5.4xlarge"], ["m5.4xlarge"], ["t3.4xlarge"]
 

Worker Instance types (selected based on instance size) for Restore

max_instance_size_for_small_restore_worker = 99
max_instance_size_for_medium_restore_worker = 999

for total volumes size of protected instance under max_instance_size_for_small_restore_worker use:
worker_types_for_small_restore_worker = ["c5.xlarge"], ["m5.xlarge"], ["t3.xlarge"]

for total volumes size of protected instance between max_instance_size_for_small_restore_worker and max_instance_size_for_medium_restore_worker
worker_types_for_medium_restore_worker = ["c5.2xlarge"], ["m5.2xlarge"], ["t3.2xlarge"]

for total volumes size of protected instance over max_instance_size_for_medium_restore_worker use:
worker_types_for_large_restore_worker = ["c5.4xlarge"], ["m5.4xlarge"], ["t3.4xlarge"]


Worker Instance types (selected based on instance size) for Cleanup:

max_instance_size_for_small_cleanup_worker = 1024
max_instance_size_for_medium_cleanup_worker = 1250

for total volumes size of protected instance under max_instance_size_for_small_cleanup_worker use:
worker_types_for_small_cleanup_worker = ["t3.small"], ["t2.small"]

for total volumes size of protected instance between max_instance_size_for_small_cleanup_worker and  max_instance_size_for_medium_cleanup_worker use:
worker_types_for_medium_cleanup_worker 
= ["t3.small"], {"t2.small"]

for total volumes size of protected instance over max_instance_size_for_medium_cleanup_worker use:
worker_types_for_large_cleanup_worker = ["t3.small"], ["t2.small"]
  • save the file
  • restart the CPM apache2 service by executing: sudo service apache2 reload
Notes: 
  • All sizes are in GB
  • Instance size = cumulative size of all instance’s volumes

    • Related Articles

    • Recommended instance sizes and volume types for CPM Server instances

      EC2 Instance sizing Here are the recommended instance sizes for CPM Server instances: Up to 200 instances - t3.medium Up to 500 instances - m5.large, c5.large, R5.large, C6i.large, R6i.large, M6i.large, C7i.large, M7i.large Up to 1000 instances - ...
    • N2WS-21382 - S3 copy worker issues

      Issues: 1. In some rare cases, worker's volumes are not removed after worker instance is terminated 2. Unnecessary alert is raised when none default worker type is used: Worker i-12345 was launched for FLR as t2.micro, which may not an optimal ...
    • CPM v3.0.x may launch unnecessarily large Cleanup workers, resulting in extra costs

      CPM v3.0.x may launch unnecessarily large Cleanup workers, resulting in extra costs. In order to reduce the costs, please use the following procedure: Connect (via ssh) to the machine running cpm (you will need to execute "sudo -i" to gain the root ...
    • Copy backup to S3 may fail with the error message "Workers could not be launched"

      During backup copy to S3 a worker creation may fail with the error (backup.log): - Error - Workers could not be launched The worker usually fails right after it was started. There are several possible issues that gives you this error. 1) The was an ...
    • How to retrieve logs from a CPM AWS Worker instance

      Linux & AWS knowledge is required Please read the entire KB before starting. N2WS uses temporary EC2 worker instances for several operations (copy to S3, FLR, etc), In cases where a worker is failing before it could communicate with the main server, ...