diff --git a/cloud-init-gcp-paired.yaml b/cloud-init-gcp-paired.yaml index 3395e8b..7926909 100644 --- a/cloud-init-gcp-paired.yaml +++ b/cloud-init-gcp-paired.yaml @@ -3,10 +3,17 @@ disk_setup: /dev/nvme0n1: table_type: gpt layout: true + /dev/nvme0n2: + table_type: gpt + layout: true overwrite: true fs_setup: - device: /dev/nvme0n1p1 filesystem: ext4 + - device: /dev/nvme0n2p1 + filesystem: ext4 mounts: - [ /dev/nvme0n1 ] - [ /dev/nvme0n1p1 ] + - [ /dev/nvme0n2 ] + - [ /dev/nvme0n2p1 ] diff --git a/cloud.py b/cloud.py index 78519c0..402279f 100644 --- a/cloud.py +++ b/cloud.py @@ -42,7 +42,7 @@ def init(_, id): gcp_instance_name = "{0}-{1}-{2}".format(name, wan_location, location_id) if (id % num_lan_machines) == 0: c.location_to_id[wan_location] = id - google_cloud.spawn_instance(c.machines[id], gcp_instance_name, "n2-highmem-4", 1, "paired-noswap", *region_zone) + google_cloud.spawn_instance(c.machines[id], gcp_instance_name, "n2-highmem-4", 2, "paired-noswap", *region_zone) else: wan_index = id - num_lan_machines wan_location = wan_machine_locations[wan_index] diff --git a/experiment.py b/experiment.py index 0f8dc85..8aa77d6 100644 --- a/experiment.py +++ b/experiment.py @@ -17,7 +17,7 @@ def clear_memory_caches(cluster, worker_ids): cluster.for_each_concurrently(lambda machine, id: remote.exec_sync(machine.public_ip_address, "sudo swapoff -a; sudo sync; echo 3 | sudo tee /proc/sys/vm/drop_caches"), worker_ids) def clear_output_files(cluster, worker_ids, prefix): - cluster.for_each_concurrently(lambda machine, id: remote.exec_sync(machine.public_ip_address, "rm -f ~/work/mage/bin/{0}* ~/work/mage/bin/*swapfile".format(prefix)), worker_ids) + cluster.for_each_concurrently(lambda machine, id: remote.exec_sync(machine.public_ip_address, "rm -f ~/work/mage/bin/{0}* ~/work/scratch/*".format(prefix)), worker_ids) def run_paired_wan_experiment(cluster, problem_name, problem_size, scenario, mem_limit, location, log_name, workers_per_node, nodes_per_party, ot_pipeline_depth, ot_num_daemons, generate_fresh_input = True, generate_fresh_memprog = True): protocol = "halfgates" diff --git a/scripts/generate_configs.py b/scripts/generate_configs.py index a20f30f..e943c99 100755 --- a/scripts/generate_configs.py +++ b/scripts/generate_configs.py @@ -12,7 +12,7 @@ def generate_worker_config_dict(global_id, internal_port, external_port, cluster worker["external_host"] = cluster["machines"][global_id]["public_ip_address" if wan else "private_ip_address"] worker["external_port"] = external_port if wan: - worker["storage_path"] = "worker{0}_swapfile".format(worker_id) + worker["storage_path"] = "~/work/scratch/worker{0}_swapfile".format(worker_id) else: worker["storage_path"] = "/dev/disk/cloud/azure_resource-part1" return worker diff --git a/scripts/provision.sh b/scripts/provision.sh index b5d62d3..3f922c0 100755 --- a/scripts/provision.sh +++ b/scripts/provision.sh @@ -54,6 +54,13 @@ sudo mount ${DISK_DEVICE} ~/work sudo chown $(whoami):$(whoami) ~/work cp -r /opt/* ~/work +mkdir -p ~/work/scratch +if [[ $1 = "gcloud" && $2 = "paired-noswap" ]] +then + sudo mount /dev/nvme0n2p1 ~/work/scratch + sudo chown $(whoami):$(whoami) ~/work/scratch +fi + # Use the latest version of MAGE pushd ~/work/mage git fetch origin