├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── config.yml │ └── feature_request.md ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yml └── workflows │ └── build.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── build ├── 00_config.sh ├── 01_create_database.sh ├── 01_create_database.sql ├── 02_get.sh ├── 03_copy.pl ├── 04_clean_up.sh ├── 05_copy_disks.pl ├── 05_copy_instances.pl ├── 06_add_costs.pl ├── 07_add.sh ├── 08_cpu.pl ├── 08_publicipranges.pl ├── 08_publicipranges.sh ├── 09_more.sh ├── 10_export.sh ├── 11_test.sh ├── README.md ├── app.psgi ├── build.sh ├── commit.sh ├── cpanfile ├── last_build.txt ├── site.pl └── src │ ├── 404.tt2 │ ├── amd.tt2 │ ├── arm.tt2 │ ├── comparison.tt2 │ ├── config.tt2 │ ├── disk.tt2 │ ├── diskpricing.tt2 │ ├── disks.js │ ├── disks.tt2 │ ├── download.tt2 │ ├── favicon.tt2 │ ├── footer.tt2 │ ├── gcosts.tt2 │ ├── gpu.tt2 │ ├── grid.tt2 │ ├── hana.tt2 │ ├── header.tt2 │ ├── images.tt2 │ ├── img │ ├── combine-filter.png │ ├── csv.png │ ├── favicon │ │ ├── README.txt │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-512x512.png │ │ ├── apple-touch-icon.png │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon.ico │ │ └── site.webmanifest │ ├── filter.png │ ├── gcosts.png │ ├── show-more.png │ ├── social.png │ ├── sort.png │ └── usage.png │ ├── imprint.tt2 │ ├── index.tt2 │ ├── instance.tt2 │ ├── instance_in_region.json │ ├── instance_in_region.tt2 │ ├── instances.tt2 │ ├── instances_header.tt2 │ ├── instances_tr.tt2 │ ├── intel.tt2 │ ├── macros.tt2 │ ├── main.js │ ├── map.tt2 │ ├── meta.tt2 │ ├── platforms.tt2 │ ├── region.tt2 │ ├── regions.tt2 │ ├── regions_header.tt2 │ ├── robots.txt │ ├── sap.tt2 │ ├── sitemap.tt2 │ └── vs.tt2 ├── img ├── compare.png ├── grid.png └── social.jpg ├── instances ├── README.md ├── clean_up.sql └── series │ ├── a2.sql │ ├── a3.sql │ ├── c2.sql │ ├── c2d.sql │ ├── c3.sql │ ├── c3d.sql │ ├── c4.sql │ ├── c4a.sql │ ├── c4d.sql │ ├── cpu │ ├── README.md │ ├── coremark.csv │ ├── coremark.ods │ ├── coremark.pl │ ├── coremark.sql │ └── frequency.sql │ ├── e2.sql │ ├── g2.sql │ ├── gpu │ └── gpu_names.sql │ ├── h3.sql │ ├── m1.sql │ ├── m2.sql │ ├── m3.sql │ ├── m4.sql │ ├── n1.sql │ ├── n2.sql │ ├── n2d.sql │ ├── n4.sql │ ├── sap │ ├── hana.sql │ └── sap.sql │ ├── t2a.sql │ ├── t2d.sql │ └── z3.sql └── regions ├── README.md ├── carbon.csv ├── carbon.pl ├── carbon.sql ├── country.sql ├── extra.sql ├── regions.json ├── regions.pl └── regions.sql /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: Cyclenerd 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: 'Bug: Good title' 5 | labels: 'bug' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Contact me on Mastodon 4 | url: https://fosstodon.org/@cyclenerd 5 | about: Feel free to follow me on Mastodon and send me a message -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: 'Feature request: Good title' 5 | labels: 'enhancement' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | First off, thanks for taking the time to contribute! 2 | 3 | ## Please Complete the Following 4 | 5 | - [ ] I read `CONTRIBUTING.md` 6 | - [ ] I used tabs to indent 7 | - [ ] I have tested my change 8 | 9 | ## Notes 10 | 11 | Feel free to put whatever you want here. -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: "Build" 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: '45 3 * * 5' # At 03:45 on Friday 7 | 8 | env: 9 | R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }} 10 | R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }} 11 | R2_API_ENDPOINT: ${{ secrets.R2_API_ENDPOINT }} 12 | 13 | # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub 14 | permissions: 15 | contents: write 16 | pages: write 17 | id-token: write 18 | 19 | jobs: 20 | website: 21 | name: Website 22 | # https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md 23 | runs-on: ubuntu-latest 24 | 25 | steps: 26 | - name: 🐧 Install dependencies 27 | run: | 28 | sudo apt-get install \ 29 | libapp-options-perl \ 30 | libdbd-csv-perl \ 31 | libdbd-sqlite3-perl \ 32 | libencode-perl \ 33 | libjson-xs-perl \ 34 | libtemplate-perl \ 35 | libyaml-libyaml-perl \ 36 | rclone \ 37 | sqlite3 38 | 39 | # https://github.com/marketplace/actions/checkout 40 | - name: 🛎️ Checkout 41 | uses: actions/checkout@v5 42 | 43 | # Configure Workload Identity Federation via a credentials file. 44 | - id: auth 45 | name: 🔐 Authenticate to Google Cloud 46 | uses: google-github-actions/auth@v3 47 | with: 48 | workload_identity_provider: 'projects/187514662523/locations/global/workloadIdentityPools/github-com/providers/github-com-oidc' 49 | service_account: 'gh-compute-machine-types@gcloud-compute-344913.iam.gserviceaccount.com' 50 | export_environment_variables: true 51 | # Install gcloud, `setup-gcloud` automatically picks up authentication from `auth`. 52 | - name: '🔧 Set up Google Cloud SDK' 53 | uses: 'google-github-actions/setup-gcloud@v3' 54 | # Now you can run gcloud commands authenticated as the impersonated service account. 55 | 56 | - name: 🔨 Run build script 57 | run: | 58 | cd build || exit 9 59 | bash build.sh || exit 9 60 | 61 | - name: 📑 Create website 62 | run: | 63 | cd build || exit 9 64 | perl site.pl || exit 9 65 | 66 | - name: 🧪 Tests 67 | run: | 68 | cat "site/europe-west4/n2-standard-8.html" | grep '249' || exit 9 69 | jq -e '.[] | .name' "site/instance_in_region.json" | grep '"n2-standard-8"' || exit 9 70 | 71 | - name: 🪣 Publish website 72 | #run: gcloud storage cp --gzip-in-flight=html,js,css,txt,json --recursive site/* gs://gcloud-compute.com || exit 9 73 | run: | 74 | mkdir -p "$HOME/.config/rclone" || exit 9 75 | echo "[r2]" > "$HOME/.config/rclone/rclone.conf" || exit 9 76 | echo "type = s3" >> "$HOME/.config/rclone/rclone.conf" 77 | echo "provider = Cloudflare" >> "$HOME/.config/rclone/rclone.conf" 78 | echo "access_key_id = $R2_ACCESS_KEY_ID" >> "$HOME/.config/rclone/rclone.conf" 79 | echo "secret_access_key = $R2_SECRET_ACCESS_KEY" >> "$HOME/.config/rclone/rclone.conf" 80 | echo "endpoint = $R2_API_ENDPOINT" >> "$HOME/.config/rclone/rclone.conf" 81 | echo "acl = private" >> "$HOME/.config/rclone/rclone.conf" 82 | echo "no_check_bucket = true" >> "$HOME/.config/rclone/rclone.conf" 83 | rclone copy --transfers 32 --checkers 64 --fast-list "site/" "r2:gcloud-compute/" || exit 9 84 | 85 | - name: Commit last build 86 | run: | 87 | cd build || exit 9 88 | bash commit.sh || exit 9 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /site/** 2 | /build/*.csv 3 | /build/*.gz 4 | /build/*.json 5 | /build/*.yml 6 | /build/*.conf 7 | /build/*.db 8 | /build/*.db-journal 9 | /build/machine-types-regions.sql 10 | /build/machine-types-regions.sql.gz 11 | /build/publicipranges.json 12 | /build/publicipaddresses.sql 13 | .~lock* 14 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | nils [at] nkn-it (dot) de. 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # How to contribute 2 | 3 | First off, thanks for taking the time to contribute! 4 | 5 | ## Submitting changes 6 | 7 | Please send a GitHub Pull Request with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)). 8 | 9 | Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this: 10 | 11 | ``` 12 | $ git commit -m "A brief summary of the commit 13 | > 14 | > A paragraph describing what changed and its impact." 15 | ``` 16 | 17 | ## Coding style 18 | 19 | Start reading the code and you'll get the hang of it. It is optimized for readability: 20 | 21 | * Please also update the documentation. 22 | * Space before the opening curly of a multi-line BLOCK. 23 | * No space before the semicolon. 24 | * Space around most operators. 25 | * No space between function name and its opening parenthesis. 26 | * Line up corresponding things vertically, especially if it'd be too long to fit on one line anyway. 27 | * Please use tabs to indent. 28 | * Be nice. 29 | 30 | One more thing: 31 | 32 | * Keep it simple! 👍 33 | 34 | Thanks! ❤️❤️❤️ 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Google Cloud Compute Comparison 2 | 3 | [![Badge: Google Cloud](https://img.shields.io/badge/Google%20Cloud-%234285F4.svg?logo=google-cloud&logoColor=white)](#readme) 4 | [![Badge: CI](https://github.com/Cyclenerd/google-cloud-compute-machine-types/actions/workflows/build.yml/badge.svg)](https://github.com/Cyclenerd/google-cloud-compute-machine-types/actions/workflows/build.yml) 5 | [![Badge: GitHub](https://img.shields.io/github/license/cyclenerd/google-cloud-compute-machine-types)](https://github.com/Cyclenerd/google-cloud-compute-machine-types/blob/master/LICENSE) 6 | 7 | This Google Compute Engine machine type comparison [webapp](https://gcloud-compute.com/) helps to find the optimal GCE machine type or instance in the many Google Cloud Platform (GCP) regions. A lot of information has been collected from various Google Cloud websites and different sources. 8 | 9 | ## Instance Picker 10 | 11 | [![Screenshot: gcloud-compute.com - Instance Picker](./img/grid.png)](https://gcloud-compute.com/) 12 | 13 | ## Comparison 14 | 15 | [![Screenshot: gcloud-compute.com - Comparison](./img/compare.png)](https://gcloud-compute.com/comparison/e2-standard-4/vs/t2a-standard-4.html) 16 | 17 | ## 🖊️ Add, edit or change machine type information 18 | 19 | The Google Compute Engine API is used to get all machine types in all regions and zones. 20 | Additional information is read via SQL files during the build process. 21 | Dive into the [build](./build/) folder to see how the data is retrieved, processed, and integrated. 22 | Feel free to explore and contribute! 23 | 24 | ## ❤️ Contributing 25 | 26 | Have a patch that will benefit this project? 27 | Awesome! Follow these steps to have it accepted. 28 | 29 | 1. Please read [how to contribute](CONTRIBUTING.md). 30 | 1. Fork this Git repository and make your changes. 31 | 1. Create a Pull Request. 32 | 1. Incorporate review feedback to your changes. 33 | 1. Accepted! 34 | 35 | ## 📜 License 36 | 37 | All files in this repository are under the [Apache License, Version 2.0](LICENSE) unless noted otherwise. 38 | 39 | Portions of this webapp are modifications based on work created and shared by [Google](https://developers.google.com/readme/policies) 40 | and used according to terms described in the [Creative Commons 4.0 Attribution License](https://creativecommons.org/licenses/by/4.0/). 41 | 42 | Please note: 43 | 44 | * No warranty 45 | * No official Google product -------------------------------------------------------------------------------- /build/00_config.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | DB='gce.db' 4 | CSV_GCLOUD_MACHINE_TYPES="machinetypes.csv" 5 | CSV_GCLOUD_ZONES="zones.csv" 6 | CSV_GCLOUD_DISK_TYPES="disktypes.csv" 7 | CSV_GCLOUD_IMAGES="images.csv" 8 | CSV_EXPORT='machine-types-regions.csv' 9 | SQL_EXPORT='machine-types-regions.sql' 10 | -------------------------------------------------------------------------------- /build/01_create_database.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # 4 | # Create SQLite3 database for GCE machine type informations 5 | # 6 | 7 | source "00_config.sh" || exit 9 8 | 9 | sqlite3 "$DB" < "01_create_database.sql" || exit 9 -------------------------------------------------------------------------------- /build/01_create_database.sql: -------------------------------------------------------------------------------- 1 | /* 2 | * Create SQLite3 database for GCE machine type informations 3 | */ 4 | 5 | DROP TABLE IF EXISTS "machinetypes"; 6 | CREATE TABLE "machinetypes" ( 7 | "name" TEXT NOT NULL DEFAULT '', 8 | 'description' TEXT NOT NULL DEFAULT '', 9 | 'location' TEXT NOT NULL DEFAULT '', 10 | 'region' TEXT NOT NULL DEFAULT '', 11 | 'zone' TEXT NOT NULL DEFAULT '', 12 | 'guestCpus' INT NOT NULL DEFAULT '0', 13 | 'isSharedCpu' TEXT NOT NULL DEFAULT 'false', 14 | 'memoryGB' REAL NOT NULL DEFAULT '0.0', 15 | 'guestAcceleratorCount' INT NOT NULL DEFAULT '0', 16 | 'guestAcceleratorType' TEXT NOT NULL DEFAULT '', 17 | 'maximumPersistentDisks' INT NOT NULL DEFAULT '0', 18 | 'maximumPersistentDisksSizeGb' INT NOT NULL DEFAULT '0', 19 | PRIMARY KEY("name", "zone") 20 | ); 21 | 22 | DROP TABLE IF EXISTS "zones"; 23 | CREATE TABLE "zones" ( 24 | "name" TEXT NOT NULL DEFAULT '', 25 | 'availableCpuPlatforms' TEXT NOT NULL DEFAULT '', 26 | PRIMARY KEY("name") 27 | ); 28 | 29 | DROP TABLE IF EXISTS "instances"; 30 | CREATE TABLE "instances" ( 31 | "name" TEXT NOT NULL DEFAULT '', 32 | "series" TEXT DEFAULT 'TODO', 33 | "family" TEXT DEFAULT 'TODO', 34 | "description" TEXT DEFAULT '', 35 | "location" TEXT NOT NULL DEFAULT '', 36 | "region" TEXT NOT NULL DEFAULT '', 37 | "regionLocation" TEXT NOT NULL DEFAULT '', 38 | "regionLocationLong" TEXT NOT NULL DEFAULT '', 39 | "regionLocationCountryCode" TEXT NOT NULL DEFAULT '', 40 | "regionCfe" REAL DEFAULT '', 41 | "regionCo2Kwh" REAL DEFAULT '', 42 | "regionLowCo2" REAL DEFAULT '0.0', 43 | "regionLat" REAL DEFAULT '0.0', 44 | "regionLng" REAL DEFAULT '0.0', 45 | "regionPublicIpv4Addr" REAL DEFAULT '0.0', 46 | "zoneCount" REAL DEFAULT '0.0', 47 | "zones" TEXT DEFAULT '', 48 | "vCpus" REAL DEFAULT '0.0', 49 | "sharedCpu" TEXT DEFAULT 'false', 50 | "intel" REAL DEFAULT '0.0', 51 | "amd" REAL DEFAULT '0.0', 52 | "arm" REAL DEFAULT '0.0', 53 | "cpuPlatformCount" REAL DEFAULT '0.0', 54 | "cpuPlatform" TEXT DEFAULT '', 55 | "cpuBaseClock" REAL DEFAULT '0.0', 56 | "cpuTurboClock" REAL DEFAULT '0.0', 57 | "cpuSingleMaxTurboClock" REAL DEFAULT '0.0', 58 | "availableCpuPlatformCount" REAL DEFAULT '0.0', 59 | "availableCpuPlatform" TEXT DEFAULT '', 60 | "coremarkScore" REAL DEFAULT '', 61 | "standardDeviation" REAL DEFAULT '', 62 | "sampleCount" REAL DEFAULT '', 63 | "memoryGB" REAL DEFAULT '0.0', 64 | "acceleratorCount" REAL DEFAULT '0.0', 65 | "acceleratorType" TEXT DEFAULT '', 66 | "disks" REAL DEFAULT '0.0', 67 | "disksSizeGb" REAL DEFAULT '0.0', 68 | "localSsd" REAL DEFAULT '0.0', 69 | "bandwidth" REAL DEFAULT '0.0', 70 | "tier1" REAL DEFAULT '0.0', 71 | "sap" REAL DEFAULT '0.0', 72 | "saps" REAL DEFAULT '', 73 | "hana" REAL DEFAULT '0.0', 74 | "sud" REAL DEFAULT '0.0', 75 | "spot" REAL DEFAULT '0.0', 76 | "hour" REAL DEFAULT '0.0', 77 | "hourSpot" REAL DEFAULT '0.0', 78 | "month" REAL DEFAULT '0.0', 79 | "month1yCud" REAL DEFAULT '0.0', 80 | "month3yCud" REAL DEFAULT '0.0', 81 | "monthSpot" REAL DEFAULT '0.0', 82 | "monthSles" REAL DEFAULT '0.0', 83 | "monthSlesSap" REAL DEFAULT '0.0', 84 | "monthSlesSap1yCud" REAL DEFAULT '0.0', 85 | "monthSlesSap3yCud" REAL DEFAULT '0.0', 86 | "monthRhel" REAL DEFAULT '0.0', 87 | "monthRhel1yCud" REAL DEFAULT '0.0', 88 | "monthRhel3yCud" REAL DEFAULT '0.0', 89 | "monthRhelSap" REAL DEFAULT '0.0', 90 | "monthRhelSap1yCud" REAL DEFAULT '0.0', 91 | "monthRhelSap3yCud" REAL DEFAULT '0.0', 92 | "monthWindows" REAL DEFAULT '0.0', 93 | PRIMARY KEY("name", "region") 94 | ); 95 | 96 | DROP TABLE IF EXISTS "disktypes"; 97 | CREATE TABLE "disktypes" ( 98 | "name" TEXT NOT NULL DEFAULT '', 99 | 'description' TEXT NOT NULL DEFAULT '', 100 | 'location' TEXT NOT NULL DEFAULT '', 101 | 'region' TEXT NOT NULL DEFAULT '', 102 | 'zone' TEXT NOT NULL DEFAULT '', 103 | PRIMARY KEY("name", "zone") 104 | ); 105 | 106 | DROP TABLE IF EXISTS "disks"; 107 | CREATE TABLE "disks" ( 108 | "name" TEXT NOT NULL DEFAULT '', 109 | "description" TEXT DEFAULT '', 110 | "location" TEXT NOT NULL DEFAULT '', 111 | "region" TEXT NOT NULL DEFAULT '', 112 | "regionLocation" TEXT NOT NULL DEFAULT '', 113 | "zoneCount" REAL DEFAULT '0.0', 114 | "zones" TEXT DEFAULT '', 115 | "monthGb" REAL DEFAULT '0.0', 116 | PRIMARY KEY("name", "region") 117 | ); 118 | 119 | DROP TABLE IF EXISTS "images"; 120 | CREATE TABLE "images" ( 121 | "name" TEXT NOT NULL DEFAULT '', 122 | "description" TEXT DEFAULT '', 123 | "diskSizeGb" REAL DEFAULT '0.0', 124 | "project" TEXT NOT NULL DEFAULT '', 125 | "family" TEXT NOT NULL DEFAULT '', 126 | "architecture" TEXT NOT NULL DEFAULT '', 127 | "creation" REAL DEFAULT '0.0', 128 | PRIMARY KEY("name", "project", "family") 129 | ); 130 | 131 | /* Index */ 132 | CREATE INDEX IF NOT EXISTS "instances-name-index" ON instances(name COLLATE NOCASE); 133 | CREATE INDEX IF NOT EXISTS "instances-region-index" ON instances(region COLLATE NOCASE); 134 | CREATE INDEX IF NOT EXISTS "instances-region-name-index" ON instances(region, name COLLATE NOCASE); 135 | CREATE INDEX IF NOT EXISTS "instances-region-hana-index" ON instances(region, hana); 136 | CREATE INDEX IF NOT EXISTS "instances-region-sap-index" ON instances(region, sap); 137 | CREATE INDEX IF NOT EXISTS "instances-region-series-index" ON instances(region, series COLLATE NOCASE); 138 | 139 | CREATE INDEX IF NOT EXISTS "disks-name-index" ON disks(name COLLATE NOCASE); 140 | CREATE INDEX IF NOT EXISTS "disks-region-index" ON disks(region COLLATE NOCASE); -------------------------------------------------------------------------------- /build/02_get.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # 4 | # Export all Google Compute Engine machine types and zones via the 5 | # Google Compute Engine API and create CSV file 6 | # 7 | 8 | source "00_config.sh" || exit 9 9 | 10 | echo "Download pricing..." 11 | curl -OL "https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/raw/master/pricing.yml" || exit 9 12 | echo 13 | 14 | # Create CSV file with machine types 15 | echo "Executing: 'gcloud compute machine-types list', please wait..." 16 | printf "%s;" \ 17 | "name" \ 18 | "description" \ 19 | "zone" \ 20 | "guestCpus" \ 21 | "isSharedCpu" \ 22 | "memoryGB" \ 23 | "guestAcceleratorCount" \ 24 | "guestAcceleratorType" \ 25 | "maximumPersistentDisks" \ 26 | "maximumPersistentDisksSizeGb" \ 27 | "deprecated" > "$CSV_GCLOUD_MACHINE_TYPES" || exit 9 28 | echo "" >> "$CSV_GCLOUD_MACHINE_TYPES" || exit 9 29 | gcloud compute machine-types list \ 30 | --quiet \ 31 | --filter="ZONE:-" \ 32 | --format="csv[no-heading,separator=';']( \ 33 | name, \ 34 | description, \ 35 | zone, \ 36 | guestCpus, \ 37 | isSharedCpu, \ 38 | MEMORY_GB, \ 39 | accelerators.guestAcceleratorCount, \ 40 | accelerators.guestAcceleratorType, \ 41 | maximumPersistentDisks, \ 42 | maximumPersistentDisksSizeGb, \ 43 | deprecated.state)" >> "$CSV_GCLOUD_MACHINE_TYPES" || exit 9 44 | 45 | # Create CSV file with zones and available CPU platforms 46 | echo "Executing: 'gcloud compute zones list', please wait..." 47 | printf "%s;" \ 48 | "name" \ 49 | "availableCpuPlatforms" > "$CSV_GCLOUD_ZONES" || exit 9 50 | echo "" >> "$CSV_GCLOUD_ZONES" || exit 9 51 | gcloud compute zones list \ 52 | --quiet \ 53 | --format="csv[no-heading,separator=';'](name, availableCpuPlatforms.list())" >> "$CSV_GCLOUD_ZONES" || exit 9 54 | 55 | # Create CSV file with disk types 56 | echo "Executing: 'gcloud compute disk-types list', please wait..." 57 | printf "%s;" \ 58 | "name" \ 59 | "zone" \ 60 | "description" > "$CSV_GCLOUD_DISK_TYPES" || exit 9 61 | echo "" >> "$CSV_GCLOUD_DISK_TYPES" || exit 9 62 | gcloud compute disk-types list \ 63 | --quiet \ 64 | --filter="ZONE:-" \ 65 | --format="csv[no-heading,separator=';']( \ 66 | name, \ 67 | zone, \ 68 | description)" >> "$CSV_GCLOUD_DISK_TYPES" || exit 9 69 | 70 | # Create CSV files with images 71 | echo "Executing: 'gcloud compute images list', please wait..." 72 | 73 | # Standard images 74 | echo "name;description;diskSizeGb;project;family;architecture;creation;deprecated;status" > "$CSV_GCLOUD_IMAGES" || exit 9 75 | gcloud compute images list \ 76 | --quiet \ 77 | --format="csv[no-heading,separator=';'](NAME,description,diskSizeGb,PROJECT,FAMILY,architecture,creationTimestamp,DEPRECATED,STATUS)" >> "$CSV_GCLOUD_IMAGES" || exit 9 78 | 79 | # Community images 80 | # https://cloud.google.com/compute/docs/images#almalinux 81 | gcloud compute images list \ 82 | --project almalinux-cloud \ 83 | --no-standard-images \ 84 | --quiet \ 85 | --format="csv[no-heading,separator=';'](NAME,description,diskSizeGb,PROJECT,FAMILY,architecture,creationTimestamp,DEPRECATED,STATUS)" >> "$CSV_GCLOUD_IMAGES" || exit 9 86 | # https://cloud.google.com/compute/docs/images#freebsd 87 | gcloud compute images list \ 88 | --project freebsd-org-cloud-dev \ 89 | --no-standard-images \ 90 | --quiet \ 91 | --format="csv[no-heading,separator=';'](NAME,description,diskSizeGb,PROJECT,FAMILY,architecture,creationTimestamp,DEPRECATED,STATUS)" >> "$CSV_GCLOUD_IMAGES" || exit 9 92 | 93 | # Deep Learning on Linux images 94 | gcloud compute images list \ 95 | --project ml-images \ 96 | --filter="creationTimestamp > -P1Y" \ 97 | --no-standard-images \ 98 | --quiet \ 99 | --format="csv[no-heading,separator=';'](NAME,description,diskSizeGb,PROJECT,FAMILY,architecture,creationTimestamp,DEPRECATED,STATUS)" >> "$CSV_GCLOUD_IMAGES" || exit 9 100 | # https://cloud.google.com/deep-learning-vm/docs/images#listing-versions 101 | gcloud compute images list \ 102 | --project deeplearning-platform-release \ 103 | --filter="creationTimestamp > -P1Y" \ 104 | --no-standard-images \ 105 | --quiet \ 106 | --format="csv[no-heading,separator=';'](NAME,description,diskSizeGb,PROJECT,FAMILY,architecture,creationTimestamp,DEPRECATED,STATUS)" >> "$CSV_GCLOUD_IMAGES" || exit 9 107 | 108 | # High Performance Computing (HPC) 109 | gcloud compute images list \ 110 | --project cloud-hpc-image-public \ 111 | --filter="creationTimestamp > -P1Y" \ 112 | --no-standard-images \ 113 | --quiet \ 114 | --format="csv[no-heading,separator=';'](NAME,description,diskSizeGb,PROJECT,FAMILY,architecture,creationTimestamp,DEPRECATED,STATUS)" >> "$CSV_GCLOUD_IMAGES" || exit 9 115 | echo "DONE" -------------------------------------------------------------------------------- /build/03_copy.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # Copyright 2022 Nils Knieling. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # 18 | # Copy machine types from CSV export to SQLite database 19 | # 20 | 21 | use utf8; 22 | binmode(STDOUT, ':encoding(utf8)'); 23 | use strict; 24 | use DBI; 25 | 26 | # CSV files without .csv 27 | my $csv_gcloud_machine_types = 'machinetypes'; 28 | my $csv_gcloud_zones = 'zones'; 29 | my $csv_gcloud_disk_types = 'disktypes'; 30 | my $csv_gcloud_images = 'images'; 31 | my $csv_gcloud_community_images = 'imagescommunity'; 32 | my $csv_gcloud_deeplearning_images = 'imagesdeeplearning'; 33 | 34 | # SQLite database file 35 | my $db_file = 'gce.db'; 36 | 37 | # Open CSV 38 | my $csv = DBI->connect("dbi:CSV:", undef, undef, { 39 | f_ext => ".csv/r", 40 | csv_sep_char => ";", 41 | csv_class => "Text::CSV_XS", 42 | RaiseError => 1, 43 | }) or die "ERROR: Cannot connect $DBI::errstr\n"; 44 | 45 | # Open DB 46 | my $db = DBI->connect("dbi:SQLite:dbname=$db_file","","") or die "ERROR: Cannot connect $DBI::errstr\n"; 47 | 48 | 49 | ############################################################################### 50 | # MACHINE TYPES 51 | ############################################################################### 52 | 53 | print "Machine types\n"; 54 | $db->do("DELETE FROM machinetypes") or die "ERROR: Cannot delete table $DBI::errstr\n"; 55 | 56 | # Select machine types from CSV 57 | my $select = qq ~ 58 | SELECT 59 | name, description, zone, 60 | guestCpus, isSharedCpu, 61 | memoryGB, 62 | guestAcceleratorCount, guestAcceleratorType, 63 | maximumPersistentDisks, maximumPersistentDisksSizeGb, 64 | deprecated 65 | FROM $csv_gcloud_machine_types 66 | ~; 67 | my $sth = $csv->prepare($select); 68 | $sth->execute; 69 | $sth->bind_columns (\my ( 70 | $name, $description, $zone, 71 | $guestCpus, $isSharedCpu, 72 | $memoryGB, 73 | $guestAcceleratorCount, $guestAcceleratorType, 74 | $maximumPersistentDisks, $maximumPersistentDisksSizeGb, 75 | $deprecated 76 | )); 77 | # Create values for insert 78 | my @values = (); 79 | while ($sth->fetch) { 80 | next if ($deprecated); # Skip deprecated machine-types 81 | print "$name, $zone\n"; 82 | # Location and region 83 | my @zone_parts = split(/-/, $zone); 84 | my $location = "$zone_parts[0]"; 85 | my $region = "$zone_parts[0]-$zone_parts[1]"; 86 | $isSharedCpu = lc($isSharedCpu); 87 | # Create value for SQL INSERT 88 | my $value = qq ~ 89 | ( 90 | '$name', '$description', '$location', '$region', '$zone', 91 | '$guestCpus', '$isSharedCpu', 92 | '$memoryGB', 93 | '$guestAcceleratorCount', '$guestAcceleratorType', 94 | '$maximumPersistentDisks', '$maximumPersistentDisksSizeGb' 95 | ) 96 | ~; 97 | $value =~ s/\t//g; 98 | push(@values, $value); 99 | } 100 | $sth->finish; 101 | # Insert machine types to database table 102 | my $insert = qq ~ 103 | INSERT INTO machinetypes ( 104 | 'name', 'description', 'location', 'region', 'zone', 105 | 'guestCpus', 'isSharedCpu', 106 | 'memoryGB', 107 | 'guestAcceleratorCount', 'guestAcceleratorType', 108 | 'maximumPersistentDisks', 'maximumPersistentDisksSizeGb' 109 | ) VALUES 110 | ~; 111 | $insert .= join(",", @values); 112 | $insert .= ";\n"; 113 | $db->do($insert) or die "ERROR: Cannot insert machine types $DBI::errstr\n"; 114 | 115 | 116 | ############################################################################### 117 | # ZONES 118 | ############################################################################### 119 | 120 | print "Zones\n"; 121 | $db->do("DELETE FROM zones") or die "ERROR: Cannot delete table $DBI::errstr\n"; 122 | 123 | # Select machine types from CSV 124 | my $select_zones = "SELECT name, availableCpuPlatforms FROM $csv_gcloud_zones"; 125 | $sth = $csv->prepare($select_zones); 126 | $sth->execute; 127 | $sth->bind_columns (\my ($name, $availableCpuPlatforms)); 128 | # Create values for insert 129 | my @zones = (); 130 | while ($sth->fetch) { 131 | print "$name\n"; 132 | # Create value for SQL INSERT 133 | my $zone = "('$name', '$availableCpuPlatforms')"; 134 | push(@zones, $zone); 135 | } 136 | $sth->finish; 137 | 138 | my $insert_zones = "INSERT INTO zones ('name', 'availableCpuPlatforms') VALUES"; 139 | $insert_zones .= join(",", @zones); 140 | $insert_zones .= ";\n"; 141 | $db->do($insert_zones) or die "ERROR: Cannot insert zones $DBI::errstr\n"; 142 | 143 | ############################################################################### 144 | # DISK TYPES 145 | ############################################################################### 146 | 147 | print "Disk types\n"; 148 | $db->do("DELETE FROM disktypes") or die "ERROR: Cannot delete table $DBI::errstr\n"; 149 | 150 | # Select disk types from CSV 151 | my $select_disks = "SELECT name, description, zone FROM $csv_gcloud_disk_types"; 152 | $sth = $csv->prepare($select_disks); 153 | $sth->execute; 154 | $sth->bind_columns (\my ($name, $description, $zone)); 155 | # Create values for insert 156 | my @disks = (); 157 | while ($sth->fetch) { 158 | print "$name, $zone\n"; 159 | # Location and region 160 | my @zone_parts = split(/-/, $zone); 161 | my $location = "$zone_parts[0]"; 162 | my $region = "$zone_parts[0]-$zone_parts[1]"; 163 | # Create value for SQL INSERT 164 | my $value = "('$name', '$description', '$location', '$region', '$zone')"; 165 | push(@disks, $value); 166 | } 167 | $sth->finish; 168 | # Insert machine types to database table 169 | my $insert_disks = qq ~ 170 | INSERT INTO disktypes ( 171 | 'name', 172 | 'description', 173 | 'location', 174 | 'region', 175 | 'zone' 176 | ) VALUES 177 | ~; 178 | $insert_disks .= join(",", @disks); 179 | $insert_disks .= ";\n"; 180 | $db->do($insert_disks) or die "ERROR: Cannot insert disk types $DBI::errstr\n"; 181 | 182 | 183 | ############################################################################### 184 | # IMAGES 185 | ############################################################################### 186 | 187 | print "Images\n"; 188 | $db->do("DELETE FROM images") or die "ERROR: Cannot delete table $DBI::errstr\n"; 189 | 190 | my $insert_images = qq ~ 191 | INSERT INTO images ( 192 | 'name', 193 | 'description', 194 | 'diskSizeGb', 195 | 'project', 196 | 'family', 197 | 'architecture', 198 | 'creation' 199 | ) VALUES 200 | ~; 201 | my $select_images = "SELECT name, description, diskSizeGb, project, family, architecture, creation FROM $csv_gcloud_images WHERE status LIKE 'READY'"; 202 | $sth = $csv->prepare($select_images); 203 | $sth->execute; 204 | $sth->bind_columns (\my ($name, $description, $diskSizeGb, $project, $family, $architecture, $creation)); 205 | while ($sth->fetch) { 206 | print "$project, $family, $name\n"; 207 | my $value = "$insert_images ('$name', '$description', '$diskSizeGb', '$project', '$family', '$architecture', '$creation')"; 208 | $db->do($value) or die "ERROR: Cannot insert images $DBI::errstr\n"; 209 | } 210 | $sth->finish; 211 | 212 | print "DONE\n"; 213 | -------------------------------------------------------------------------------- /build/04_clean_up.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # 4 | # Clean up (Remove disconnected data centers...) 5 | # 6 | 7 | source "00_config.sh" || exit 9 8 | 9 | sqlite3 "$DB" < "../instances/clean_up.sql" || exit 9 -------------------------------------------------------------------------------- /build/05_copy_disks.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # Copyright 2022 Nils Knieling. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # 18 | # Copy disk types per region to disks table 19 | # 20 | 21 | use utf8; 22 | binmode(STDOUT, ':encoding(utf8)'); 23 | use strict; 24 | use DBI; 25 | 26 | my $db_file = 'gce.db'; 27 | 28 | # Open DB 29 | my $db = DBI->connect("dbi:SQLite:dbname=$db_file","","") or die "ERROR: Cannot connect $DBI::errstr\n"; 30 | 31 | ############################################################################### 32 | # Copy DISK TYPES to DISKS 33 | ############################################################################### 34 | $db->do("DELETE FROM disks") or die "ERROR: Cannot delete table $DBI::errstr\n"; 35 | 36 | # Select 'disktypes' 37 | my $select = qq ~ 38 | SELECT 39 | name, description, location, region, 40 | (SELECT COUNT(zone) FROM disktypes WHERE name LIKE D.name AND region LIKE D.region) AS zoneCount, 41 | (SELECT GROUP_CONCAT(zone) FROM disktypes WHERE name LIKE D.name AND region LIKE D.region ORDER BY zone) AS zones 42 | FROM disktypes D 43 | GROUP BY name, region; 44 | ~; 45 | my $sth = $db->prepare($select); 46 | $sth->execute; 47 | $sth->bind_columns ( \my ( 48 | $name, $description, $location, $region, 49 | $zoneCount, 50 | $zones 51 | )); 52 | 53 | # Insert disk type per region to disks table 54 | my @values = (); 55 | while ($sth->fetch) { 56 | print "$name, $region\n"; 57 | # Sort zones 58 | my @zones_unsorted = split(',', $zones); 59 | $zones = join(', ', sort @zones_unsorted); 60 | # Create value for SQL INSERT 61 | my $value = "('$name', '$description', '$location', '$region', '$zoneCount', '$zones')"; 62 | push(@values, $value); 63 | } 64 | $sth->finish; 65 | 66 | my $insert = qq ~ 67 | INSERT INTO disks ( 68 | 'name', 69 | 'description', 70 | 'location', 71 | 'region', 72 | 'zoneCount', 73 | 'zones' 74 | ) VALUES 75 | ~; 76 | $insert .= join(",", @values); 77 | $insert .= ";\n"; 78 | $db->do($insert) or die "ERROR: Cannot insert $DBI::errstr\n"; 79 | 80 | print "DONE\n"; 81 | -------------------------------------------------------------------------------- /build/05_copy_instances.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # Copyright 2022 Nils Knieling. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # 18 | # Copy machine types per region to instances table 19 | # 20 | 21 | use utf8; 22 | binmode(STDOUT, ':encoding(utf8)'); 23 | use strict; 24 | use DBI; 25 | 26 | my $db_file = 'gce.db'; 27 | 28 | # Open DB 29 | my $db = DBI->connect("dbi:SQLite:dbname=$db_file","","") or die "ERROR: Cannot connect $DBI::errstr\n"; 30 | 31 | 32 | ############################################################################### 33 | # Copy MACHINE TYPES to INSTANCES 34 | ############################################################################### 35 | $db->do("DELETE FROM instances") or die "ERROR: Cannot delete table $DBI::errstr\n"; 36 | 37 | # Select 'machinetypes' 38 | my $select = qq ~ 39 | SELECT 40 | name, description, location, region, 41 | (SELECT COUNT(zone) FROM machinetypes WHERE name LIKE M.name AND region LIKE M.region) AS zoneCount, 42 | (SELECT GROUP_CONCAT(zone) FROM machinetypes WHERE name LIKE M.name AND region LIKE M.region ORDER BY zone) AS zones, 43 | guestCpus, isSharedCpu, 44 | memoryGB, 45 | guestAcceleratorCount, guestAcceleratorType, 46 | maximumPersistentDisks, maximumPersistentDisksSizeGb 47 | FROM machinetypes M 48 | GROUP BY name, region; 49 | ~; 50 | my $sth = $db->prepare($select); 51 | $sth->execute; 52 | $sth->bind_columns ( \my ( 53 | $name, $description, $location, $region, 54 | $zoneCount, 55 | $zones, 56 | $guestCpus, $isSharedCpu, 57 | $memoryGB, 58 | $guestAcceleratorCount, $guestAcceleratorType, 59 | $maximumPersistentDisks, $maximumPersistentDisksSizeGb 60 | )); 61 | 62 | # Insert machine type per region to instances table 63 | my @values = (); 64 | while ($sth->fetch) { 65 | print "$name, $region\n"; 66 | # Shared CPU 67 | if (lc($isSharedCpu) eq 'true') { 68 | $isSharedCpu = '1'; 69 | } else { 70 | $isSharedCpu = '0' 71 | } 72 | # Sort zones 73 | my @zones_unsorted = split(',', $zones); 74 | $zones = join(', ', sort @zones_unsorted); 75 | # Create value for SQL INSERT 76 | my $value = qq ~ 77 | ( 78 | '$name', '$description', '$location', '$region', '$zoneCount', '$zones', 79 | '$guestCpus', '$isSharedCpu', 80 | '$memoryGB', 81 | '$guestAcceleratorCount', '$guestAcceleratorType', 82 | '$maximumPersistentDisks', '$maximumPersistentDisksSizeGb' 83 | ) 84 | ~; 85 | $value =~ s/\t//g; 86 | push(@values, $value); 87 | } 88 | $sth->finish; 89 | 90 | my $insert = qq ~ 91 | INSERT INTO instances ( 92 | 'name', 'description', 'location', 'region', 'zoneCount', 'zones', 93 | 'vCpus', 'sharedCpu', 94 | 'memoryGB', 95 | 'acceleratorCount', 'acceleratorType', 96 | 'disks', 'disksSizeGb' 97 | ) VALUES 98 | ~; 99 | $insert .= join(",", @values); 100 | $insert .= ";\n"; 101 | $db->do($insert) or die "ERROR: Cannot insert $DBI::errstr\n"; 102 | 103 | print "DONE\n"; 104 | -------------------------------------------------------------------------------- /build/07_add.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # 4 | # Add additional machine type and region informations 5 | # 6 | 7 | source "00_config.sh" || exit 9 8 | 9 | for MY_SERIES in ../instances/series/*.sql; do 10 | echo "$MY_SERIES" 11 | sqlite3 "$DB" < "$MY_SERIES" || exit 9 12 | done 13 | 14 | echo "Add carbon data across GCP regions" 15 | sqlite3 "$DB" < ../regions/carbon.sql || exit 9 16 | 17 | echo "Add long location name, latitude and longitude of GCP regions" 18 | sqlite3 "$DB" < ../regions/regions.sql || exit 9 19 | 20 | echo "Add extra data for GCP regions" 21 | sqlite3 "$DB" < ../regions/extra.sql || exit 9 22 | 23 | echo "Add country names of GCP regions" 24 | sqlite3 "$DB" < ../regions/country.sql || exit 9 -------------------------------------------------------------------------------- /build/08_cpu.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # Copyright 2022 Nils Knieling. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # 18 | # Check available CPU platforms per instance in region and update machine type 19 | # 20 | 21 | use utf8; 22 | binmode(STDOUT, ':encoding(utf8)'); 23 | use strict; 24 | use DBI; 25 | use Data::Dumper; 26 | 27 | my $db_file = 'gce.db'; 28 | 29 | # Open DB 30 | my $db = DBI->connect("dbi:SQLite:dbname=$db_file","","") or die "ERROR: Cannot connect $DBI::errstr\n"; 31 | 32 | print "\nZones\n"; 33 | my $select_zones = "SELECT name, availableCpuPlatforms FROM zones ORDER BY name"; 34 | my $sth = $db->prepare($select_zones); 35 | $sth->execute; 36 | $sth->bind_columns ( \my ($zone, $availableCpuPlatforms) ); 37 | my $cpuPlatforms = {}; # all CPU platforms 38 | my $availableCpuPlatformsInRegion = {}; # available CPU platforms in region 39 | while ($sth->fetch) { 40 | print "$zone\n"; 41 | my @zone_parts = split(/-/, $zone); 42 | my $location = "$zone_parts[0]"; 43 | my $region = "$zone_parts[0]-$zone_parts[1]"; 44 | # Store CPU platform in Perl Hash reference 45 | foreach my $cpu (split(',', $availableCpuPlatforms)) { 46 | $availableCpuPlatformsInRegion->{"$region"}->{"$cpu"} = '1'; 47 | $cpuPlatforms->{"$cpu"} = '1'; 48 | } 49 | } 50 | 51 | print "\nMachine types\n"; 52 | my $select_instances = "SELECT name, region, cpuPlatform FROM instances"; 53 | my $sth = $db->prepare($select_instances); 54 | $sth->execute; 55 | $sth->bind_columns ( \my ($name, $region, $cpuPlatform) ); 56 | my %unknown_cpuPlatform = (); 57 | while ($sth->fetch) { 58 | print "$name, $region\n"; 59 | my @cpuPlatformsInRegion = (); # available CPU platforms for machine type in the region, cross-checked with the available CPU platforms in the zones. 60 | my @cpuPlatformsForInstance = (); # CPU platforms for machine type 61 | foreach my $instance_cpuPlatform (sort split(',', $cpuPlatform)) { 62 | print "\t$instance_cpuPlatform"; 63 | # Check if the CPU platform of the instance is known 64 | my $found = 0; 65 | foreach my $cpu (keys %{$cpuPlatforms}) { 66 | if ($cpu =~ m/$instance_cpuPlatform/i) { 67 | $found = '1'; 68 | push (@cpuPlatformsForInstance, $cpu); # Store longer name 69 | } 70 | } 71 | if ($found) { 72 | print " [found]"; 73 | # Check if CPU platform for this machine type is available in the region 74 | foreach my $cpu (keys %{$availableCpuPlatformsInRegion->{"$region"}}) { 75 | if ($cpu =~ m/$instance_cpuPlatform/i) { 76 | print " [available]"; 77 | push (@cpuPlatformsInRegion, $cpu); 78 | } 79 | } 80 | } else { 81 | print " [unknown]"; 82 | $unknown_cpuPlatform{"$instance_cpuPlatform"} = '1'; 83 | } 84 | print "\n"; 85 | } 86 | # CPU platform for machine type 87 | my $update_cpuPlatformCount = scalar @cpuPlatformsForInstance; 88 | my $update_cpuPlatform = join(', ', sort @cpuPlatformsForInstance); 89 | # CPU platform for machine type and available in region 90 | my $update_availableCpuPlatformCount = scalar @cpuPlatformsInRegion; 91 | my $update_availableCpuPlatform = join(', ', sort @cpuPlatformsInRegion); 92 | # Set Intel and AMD 93 | my $intel = '0'; 94 | $intel = '1' if ($update_availableCpuPlatform =~ m/intel/i ); 95 | my $amd = '0'; 96 | $amd = '1' if ($update_availableCpuPlatform =~ m/amd/i ); 97 | my $arm = '0'; 98 | $arm = '1' if ($update_availableCpuPlatform =~ m/ampere/i ); 99 | $arm = '1' if ($update_availableCpuPlatform =~ m/axion/i ); 100 | my $update = qq ~ 101 | UPDATE instances 102 | SET 103 | intel = '$intel', 104 | amd = '$amd', 105 | arm = '$arm', 106 | cpuPlatformCount = '$update_cpuPlatformCount', cpuPlatform = '$update_cpuPlatform', 107 | availableCpuPlatformCount = '$update_availableCpuPlatformCount', availableCpuPlatform = '$update_availableCpuPlatform' 108 | WHERE name LIKE '$name' 109 | AND region LIKE '$region' 110 | ~; 111 | $db->do($update) or die "ERROR: Cannot update available CPU platform for instance in region $DBI::errstr\n"; 112 | } 113 | 114 | if (keys %unknown_cpuPlatform) { 115 | print "Unknown CPU platforms:\n"; 116 | foreach my $cpu (keys %unknown_cpuPlatform) { 117 | print "\t $cpu\n"; 118 | } 119 | die "Please check and fix!\n"; 120 | } 121 | 122 | print "\nClean up unavailable CPU platforms\n"; 123 | my $select_not_available = "SELECT name, region FROM instances WHERE availableCpuPlatformCount == '0'"; 124 | my $sth = $db->prepare($select_not_available); 125 | $sth->execute; 126 | $sth->bind_columns ( \my ($name, $region) ); 127 | my $unavailable = 0; 128 | while ($sth->fetch) { 129 | print "$name, $region\n"; 130 | $unavailable++; 131 | } 132 | $db->do("DELETE FROM instances WHERE availableCpuPlatformCount == '0'") or die "ERROR: Cannot clean up unavailable CPU platforms $DBI::errstr\n"; 133 | if ($unavailable) { 134 | print "Unavailable CPU platforms for machine type in region: $unavailable\n"; 135 | } 136 | 137 | print "DONE\n"; 138 | -------------------------------------------------------------------------------- /build/08_publicipranges.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # Copyright 2022 Nils Knieling. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # 18 | # Calculate public IP addresses 19 | # Thank you PatMyron: https://github.com/PatMyron/cloud/issues/11#issuecomment-922591282 20 | # 21 | 22 | use utf8; 23 | binmode(STDOUT, ':encoding(utf8)'); 24 | use strict; 25 | use JSON::XS; 26 | 27 | open(FH, "publicipranges.json") or die "JSON file 'publicipranges.json' can't be opened"; 28 | my $json = ""; 29 | while(){ 30 | $json .= $_; 31 | } 32 | close(FH); 33 | my $publicipranges = JSON::XS->new->utf8->decode($json); 34 | 35 | my %regions; 36 | my $total = "0"; 37 | foreach my $prefix (sort @{$publicipranges->{'prefixes'}}) { 38 | my $name = $prefix->{'scope'}; 39 | if ($prefix->{'ipv4Prefix'} =~ /\/(\d+)$/) { 40 | my $mask = $1; 41 | my $ipv4 = 2**(32-$mask); 42 | $regions{$name} += $ipv4; 43 | $total += $ipv4; 44 | } 45 | } 46 | 47 | foreach my $region (sort keys %regions) { 48 | my $ipv4 = $regions{$region} || "0.0"; 49 | print "UPDATE instances SET regionPublicIpv4Addr = '$ipv4' WHERE region LIKE '$region';\n"; 50 | } -------------------------------------------------------------------------------- /build/08_publicipranges.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # 4 | # Add number of public IP addresses for each GCP region 5 | # 6 | 7 | source "00_config.sh" || exit 9 8 | 9 | echo "Get public IP ranges" 10 | curl -o "publicipranges.json" "https://www.gstatic.com/ipranges/cloud.json" || exit 9 11 | 12 | echo "Calculate public IP addresses" 13 | perl "08_publicipranges.pl" > "publicipaddresses.sql" || exit 9 14 | 15 | echo "Add number of public IP addresses for each GCP region" 16 | sqlite3 "$DB" < "publicipaddresses.sql" || exit 9 -------------------------------------------------------------------------------- /build/09_more.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # 4 | # Add more machine type informations 5 | # 6 | 7 | source "00_config.sh" || exit 9 8 | 9 | echo "Frequency (GHz)" 10 | sqlite3 "$DB" < "../instances/series/cpu/frequency.sql" || exit 9 11 | 12 | echo "EEMBC CoreMark Benchmark" 13 | sqlite3 "$DB" < "../instances/series/cpu/coremark.sql" || exit 9 14 | 15 | echo "GPU Type Names" 16 | sqlite3 "$DB" < "../instances/series/gpu/gpu_names.sql" || exit 9 17 | 18 | echo "SAP certified machine types" 19 | sqlite3 "$DB" < "../instances/series/sap/sap.sql" || exit 9 20 | 21 | echo "SAP HANA certified machine types" 22 | sqlite3 "$DB" < "../instances/series/sap/hana.sql" || exit 9 -------------------------------------------------------------------------------- /build/10_export.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # 4 | # Export CSV and SQL file 5 | # 6 | 7 | source "00_config.sh" || exit 9 8 | 9 | echo "» SQL Export" 10 | { 11 | echo 'DROP TABLE IF EXISTS "instances";' 12 | sqlite3 "$DB" '.dump instances' 13 | echo 'DROP TABLE IF EXISTS "disks";' 14 | sqlite3 "$DB" '.dump disks' 15 | echo 'DROP TABLE IF EXISTS "images";' 16 | sqlite3 "$DB" '.dump images' 17 | } > "$SQL_EXPORT" || exit 9 18 | gzip -fk "$SQL_EXPORT" || exit 9 19 | 20 | echo "» CSV Export" 21 | sqlite3 \ 22 | -header \ 23 | -csv "$DB" "SELECT * FROM instances ORDER BY region, name;" > "$CSV_EXPORT" || exit 9 24 | -------------------------------------------------------------------------------- /build/11_test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # 4 | # Test 5 | # 6 | 7 | source "00_config.sh" || exit 8 | 9 | # Check TODOs 10 | if grep 'TODO' < "$CSV_EXPORT"; then 11 | echo "ERROR: There are still TODOs" 12 | exit 9 13 | fi 14 | 15 | # Check costs 16 | # n2-standard-8 in europe-west4 with SUD : 249 17 | if ! cat "$CSV_EXPORT" | grep 'n2-standard-8,' | grep 'europe-west4,' | head -n 1 | grep ',249' > /dev/null; then 18 | echo "ERROR: n2-standard-8 in europe-west4 with cost 249 not found" 19 | exit 9 20 | fi 21 | 22 | echo "DONE" -------------------------------------------------------------------------------- /build/README.md: -------------------------------------------------------------------------------- 1 | # Build 2 | 3 | This project uses GitHub Actions for automated builds and deployments. 4 | Ready to tweak and test this webapp locally? 5 | Follow these instructions: 6 | 7 | ## Requirements 8 | 9 | * [Google Cloud CLI](https://cloud.google.com/sdk/docs/install) (`gcloud`) 10 | * SQLite3 (`sqlite3`) 11 | * Perl 5 (`perl`) 12 | * Perl modules: 13 | * [App::Options](https://metacpan.org/pod/App::Options) 14 | * [Encode](https://metacpan.org/pod/Encode) 15 | * [YAML::XS](https://metacpan.org/pod/YAML::XS) (and `libyaml`) 16 | * [JSON::XS](https://metacpan.org/pod/JSON::XS) 17 | * [DBD::CSV](https://metacpan.org/pod/DBD::CSV) 18 | * [DBD::SQLite](https://metacpan.org/pod/DBD::SQLite) 19 | * [Template::Toolkit](https://metacpan.org/pod/Template::Toolkit) 20 | * [plackup](https://metacpan.org/dist/Plack/view/script/plackup) 21 | 22 |
23 | Debian/Ubuntu 24 | 25 | Packages: 26 | 27 | ```shell 28 | sudo apt update 29 | sudo apt install \ 30 | libapp-options-perl \ 31 | libdbd-csv-perl \ 32 | libdbd-sqlite3-perl \ 33 | libencode-perl \ 34 | libjson-xs-perl \ 35 | libplack-perl \ 36 | libtemplate-perl \ 37 | libyaml-libyaml-perl \ 38 | sqlite3 39 | ``` 40 | 41 | [Google Cloud CLI](https://cloud.google.com/sdk/docs/install#deb): 42 | 43 | ```shell 44 | sudo apt-get install apt-transport-https ca-certificates gnupg 45 | # Add the gcloud CLI distribution URI as a package source 46 | echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list 47 | # Import the Google Cloud public key. 48 | curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo tee /usr/share/keyrings/cloud.google.gpg 49 | # Update and install the gcloud CLI 50 | sudo apt-get update 51 | sudo apt-get install google-cloud-cli 52 | ``` 53 |
54 | 55 |
56 | macOS 57 | 58 | Homebrew packages: 59 | 60 | ```shell 61 | brew install perl 62 | brew install cpanminus pkg-config 63 | brew install sqlite3 64 | brew install --cask google-cloud-sdk 65 | ``` 66 | 67 | Perl modules: 68 | 69 | ```shell 70 | cpanm --installdeps . 71 | ``` 72 |
73 | 74 | ## Database 75 | 76 | Run: 77 | 78 | ```shell 79 | bash build.sh 80 | ``` 81 | 82 | 1. Create SQLite3 database `gce.db` for GCE machine type informations 83 | 1. Export all Google Compute Engine machine types ans zones via the Google Compute Engine API to CSV file `machinetypes.csv` and `zones.csv` 84 | 1. Copy machine types ans zones from CSV file to SQLite database `gce.db` table `machinetypes` and `zones` 85 | 1. Clean up (Remove disconnected data centers...) 86 | 1. Copy machine types per region to database table `instances` and disk types per region to table `disks` 87 | 1. Add costs for machine types in region from [pricing](https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator) 88 | 7. Add [additional machine type informations](../instances/series/) 89 | 1. Add CPU platforms and IP addresses 90 | 1. Add available CPU platforms per instance in region 91 | 1. Add number of public IP addresses for each GCP region 92 | 1. Add even more 93 | * Frequency (GHz) 94 | * EEMBC CoreMark Benchmark 95 | * SAP and HANA certified machine types 96 | 1. Export CSV and SQL file 97 | 1. Test 98 | 99 | ## Websites 100 | 101 | Create: 102 | 103 | ```shell 104 | perl site.pl 105 | ``` 106 | 107 | No regions and comparison: 108 | 109 | ```shell 110 | perl site.pl \ 111 | --comparison=0 \ 112 | --region=0 113 | ``` 114 | 115 | Only `g1-small` and `europe-west4`: 116 | 117 | ```shell 118 | perl site.pl \ 119 | --comparison=1 \ 120 | --limit_comparison=g1-small \ 121 | --region=1 \ 122 | --limit_region=europe-west4 123 | ``` 124 | 125 | This Perl script creates static websites (Templates are located in the [src](./src/) folder). 126 | The websites are stored in the directory `../site/`. 127 | 128 | The JavaScript grid library [AG Grid Community](https://www.ag-grid.com/) is used. 129 | 130 | Run: 131 | 132 | ```bash 133 | plackup --host "127.0.0.1" --port "8080" 134 | ``` -------------------------------------------------------------------------------- /build/app.psgi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | use strict; 3 | use warnings; 4 | use Plack::App::Directory; 5 | my $app = Plack::App::Directory->new({ 6 | root => "../site/" 7 | })->to_app; -------------------------------------------------------------------------------- /build/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "1. Create" 4 | bash "01_create_database.sh" || exit 9 5 | 6 | echo "2. Get" 7 | bash "02_get.sh" || exit 9 8 | 9 | echo "3. Copy" 10 | perl "03_copy.pl" || exit 9 11 | 12 | echo "4. Clean up" 13 | bash "04_clean_up.sh" || exit 9 14 | 15 | echo "5. Copy instances and disks" 16 | perl "05_copy_instances.pl" || exit 9 17 | perl "05_copy_disks.pl" || exit 9 18 | 19 | echo "6. Add costs" 20 | perl "06_add_costs.pl" || exit 9 21 | 22 | echo "7. Add informations" 23 | bash "07_add.sh" || exit 9 24 | 25 | echo "8.1. Add available CPU platforms" 26 | perl "08_cpu.pl" || exit 9 27 | 28 | echo "8.2. Add number of public IP addresses" 29 | bash "08_publicipranges.sh" || exit 9 30 | 31 | echo "9. Add more" 32 | bash "09_more.sh" || exit 9 33 | 34 | echo "10. Export" 35 | bash "10_export.sh" || exit 9 36 | 37 | echo "11. Test" 38 | bash "11_test.sh" || exit 9 -------------------------------------------------------------------------------- /build/commit.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # GitHub Action runner 4 | if [ -v GITHUB_RUN_ID ]; then 5 | echo "» Set git username and email" 6 | git config user.name "github-actions[bot]" 7 | git config user.email "41898282+github-actions[bot]@users.noreply.github.com" 8 | fi 9 | 10 | MY_TXT="last_build.txt" 11 | date > "$MY_TXT" 12 | 13 | if ! git diff --exit-code "$MY_TXT"; then 14 | git add "$MY_TXT" 15 | git commit -m "Last build" || exit 9 16 | git push || exit 9 17 | fi 18 | 19 | echo "DONE" -------------------------------------------------------------------------------- /build/cpanfile: -------------------------------------------------------------------------------- 1 | # Check version with 'cpan -D DBD::SQLite' 2 | recommends 'perl', '5.34'; 3 | requires 'App::Options', '1.12'; 4 | requires 'Encode', '3.16'; 5 | requires 'JSON::XS', '4.03'; 6 | requires 'YAML::XS', '0.83'; 7 | requires 'DBD::CSV', '0.58'; 8 | requires 'DBD::SQLite', '1.70'; 9 | requires 'Template::Toolkit', '3.1'; 10 | requires 'Plack', '1.0048'; -------------------------------------------------------------------------------- /build/last_build.txt: -------------------------------------------------------------------------------- 1 | Fri Oct 3 07:39:20 UTC 2025 2 | -------------------------------------------------------------------------------- /build/src/404.tt2: -------------------------------------------------------------------------------- 1 | [%- PROCESS header.tt2 -%] 2 | 3 | 4 |
5 | 6 |

404 - Page Not Found

7 | 8 |
9 |

Sorry, the machine type, region or page you are looking for could not be found.

10 |
11 | 12 |

13 | Start 14 |

15 | 16 | [% PROCESS footer.tt2 %] -------------------------------------------------------------------------------- /build/src/amd.tt2: -------------------------------------------------------------------------------- 1 | [%- PROCESS header.tt2 -%] 2 | [%- PROCESS instances_header.tt2 -%] 3 | 4 |

Google Compute Engine Machine Types with AMD CPU Platform

5 | 6 | [%- countAmd = 0; FOREACH instance IN instances; IF instance.amd; countAmd = countAmd + 1; END; END -%] 7 |
8 |

9 | There are [% countAmd %] Google Compute Engine machine types with AMD central processing unit (CPU) available. 10 | Not every Google Cloud VM with AMD CPU is available in every region. 11 |

12 |
13 | 14 |

✅ Instance Picker with filter on CPU Platform

15 | 16 |
17 | [%- PROCESS instances_tr.tt2; -%] 18 | 27 | 28 | [%- instancePlatformTh() -%] 29 | 30 | 31 | [%- FOREACH instance IN instances; IF instance.amd; instancePlatformTr(instance); END; END -%] 32 | 33 |
34 |
35 | [% PROCESS footer.tt2 %] -------------------------------------------------------------------------------- /build/src/arm.tt2: -------------------------------------------------------------------------------- 1 | [%- PROCESS header.tt2 -%] 2 | [%- PROCESS instances_header.tt2 -%] 3 | 4 |

Google Compute Engine Machine Types with Arm CPU Platform

5 | 6 | [%- countArm = 0; FOREACH instance IN instances; IF instance.arm; countArm = countArm + 1; END; END -%] 7 |
8 |

9 | There are [% countArm %] Google Compute Engine machine types with Arm-based central processing unit (CPU) available. 10 | Not every Google Cloud VM with Arm-based CPU is available in every region. 11 |

12 |
13 | 14 |

✅ Instance Picker with filter on Arm-based CPU

15 | 16 |
17 | [%- PROCESS instances_tr.tt2; -%] 18 | 27 | 28 | [%- instancePlatformTh() -%] 29 | 30 | 31 | [%- FOREACH instance IN instances; IF instance.arm; instancePlatformTr(instance); END; END -%] 32 | 33 |
34 |
35 | [% PROCESS footer.tt2 %] -------------------------------------------------------------------------------- /build/src/config.tt2: -------------------------------------------------------------------------------- 1 | [%- 2 | site = { 3 | url => 'https://gcloud-compute.com', 4 | github = { 5 | repo => 'https://github.com/Cyclenerd/google-cloud-compute-machine-types', 6 | issues => 'https://github.com/Cyclenerd/google-cloud-compute-machine-types/issues', 7 | }, 8 | agGrid = { 9 | css => 'https://cdn.jsdelivr.net/npm/ag-grid-community@31.0.3/styles/ag-grid.min.css' 10 | theme => 'https://cdn.jsdelivr.net/npm/ag-grid-community@31.0.3/styles/ag-theme-balham.min.css' 11 | js => 'https://cdn.jsdelivr.net/npm/ag-grid-community@31.0.3/dist/ag-grid-community.min.noStyle.js' 12 | }, 13 | agCharts = { 14 | js => 'https://cdn.jsdelivr.net/npm/ag-charts-community@9.0.2/dist/umd/ag-charts-community.min.js' 15 | } 16 | jQuery = { 17 | js => 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js' 18 | }, 19 | bootstrap = { 20 | css => 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.3/css/bootstrap.min.css' 21 | js => 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.3/js/bootstrap.bundle.min.js' 22 | }, 23 | bootstrapTable = { 24 | css => 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.22.2/bootstrap-table.min.css' 25 | js => 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.22.2/bootstrap-table.min.js' 26 | }, 27 | bootstrapTableStickyHeader = { 28 | css => 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.22.2/extensions/sticky-header/bootstrap-table-sticky-header.min.css' 29 | js => 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.22.2/extensions/sticky-header/bootstrap-table-sticky-header.min.js' 30 | }, 31 | leaflet = { 32 | css => 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.min.css' 33 | js => 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.min.js' 34 | }, 35 | }; 36 | PROCESS macros.tt2; 37 | -%] -------------------------------------------------------------------------------- /build/src/disk.tt2: -------------------------------------------------------------------------------- 1 | [%- PROCESS header.tt2 -%] 2 |

Google Compute Engine Disk Type [% disk.name %]

3 | 4 | [%- 5 | minDiskSize = 10; 6 | IF disk.name == 'pd-extreme'; minDiskSize = 500; END; 7 | IF disk.name == 'local-ssd'; minDiskSize = 375; END; 8 | -%] 9 |
10 |

[% IF disk.description %][% disk.description %], [% END %]minimum capacity per disk [% minDiskSize %] GB.

11 |
12 | 13 |

Costs and pricing for Google Compute Engine disk type [% disk.name %] in Google Cloud regions in which the disk is available.

14 |
15 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | [% FOREACH region IN regions %] 37 | 38 | 45 | 46 | 47 | 48 | [% IF region.monthGb %] 49 | 50 | 51 | 52 | 53 | [% ELSE %] 54 | 55 | 56 | 57 | 58 | [% END %] 59 | 60 | [% END %] 61 | 62 |
RegionLocation#Zones1 GB10 GB375 GB500 GB
39 | 42 | [% region.name %] 43 | 44 | [% IF region.regionLocation %][% region.regionLocation %][% ELSE %]?[% END %][% IF region.zoneCount %][% region.zoneCount %][% ELSE %]?[% END %][% region.monthGb %][% region.monthGb*10 FILTER format("%.2f") %][% region.monthGb*375 FILTER format("%.2f") %][% region.monthGb*500 FILTER format("%.2f") %]????????????
63 |
64 | 65 | [% PROCESS footer.tt2 %] -------------------------------------------------------------------------------- /build/src/diskpricing.tt2: -------------------------------------------------------------------------------- 1 | [%- PROCESS header.tt2 -%] 2 | [%- PROCESS regions_header.tt2 -%] 3 | 4 |

Persistent Disk Pricing in Google Cloud Regions

5 | 6 |
7 |

8 | Each Google Compute Engine machine type (VM instance) has at least one boot disk attached to it. 9 | Each disk incurs a cost, described in this overview. 10 | Breakdown by price per GB and minimum capacity per disk. 11 |

12 |
13 | 14 |

15 | 🗺️ Region Map 16 | ⏱️ Ping 17 |

18 | 19 |
20 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | [% FOREACH region IN disks_regions %] 64 | 65 | 66 | 67 | 68 | 69 | [% IF region.standard %] 70 | 71 | 72 | [% ELSE %] 73 | 74 | 75 | [% END %] 76 | 77 | [% IF region.balanced %] 78 | 79 | 80 | [% ELSE %] 81 | 82 | 83 | [% END %] 84 | 85 | [% IF region.ssd %] 86 | 87 | 88 | [% ELSE %] 89 | 90 | 91 | [% END %] 92 | 93 | [% IF region.extreme %] 94 | 95 | 96 | [% ELSE %] 97 | 98 | 99 | [% END %] 100 | 101 | [% IF region.local %] 102 | 103 | 104 | [% ELSE %] 105 | 106 | 107 | [% END %] 108 | 109 | [% END %] 110 | 111 |
RegionZonesStandardBalancedSSDExtremeLocal SSD
NameLocation#1 GB10 GB1 GB10 GB1 GB10 GB1 GB500 GB1 GB375 GB
[% region.name %][% IF region.regionLocation %][% region.regionLocation %][% ELSE %]?[% END %][% region.zoneCount %][% region.standard %][% region.standard*10 FILTER format("%.2f") %]--[% region.balanced %][% region.balanced*10 FILTER format("%.2f") %]--[% region.ssd %][% region.ssd*10 FILTER format("%.2f") %]--[% region.extreme %][% region.extreme*500 FILTER format("%.2f") %]--[% region.local %][% region.local*375 FILTER format("%.2f") %]--
112 |
113 | [% PROCESS footer.tt2 %] -------------------------------------------------------------------------------- /build/src/disks.js: -------------------------------------------------------------------------------- 1 | const options = { 2 | container: document.getElementById('myChart'), 3 | autoSize: true, 4 | title: { 5 | text: 'Performance by Disk Size', 6 | enabled: false 7 | }, 8 | data: [ 9 | { 10 | size: '10 GB', 11 | // HDD 12 | hdd_read: 0, 13 | hdd_write: 0, 14 | // SSD 15 | ssd_read: 4.8, 16 | ssd_write: 4.8 17 | }, 18 | { 19 | size: '32 GB', 20 | // HDD 21 | hdd_read: 3, 22 | hdd_write: 3, 23 | // SSD 24 | ssd_read: 15, 25 | ssd_write: 15 26 | }, 27 | { 28 | size: '64 GB', 29 | // HDD 30 | hdd_read: 7, 31 | hdd_write: 7, 32 | // SSD 33 | ssd_read: 30, 34 | ssd_write: 30 35 | }, 36 | { 37 | size: '128 GB', 38 | // HDD 39 | hdd_read: 15, 40 | hdd_write: 15, 41 | // SSD 42 | ssd_read: 61, 43 | ssd_write: 61 44 | }, 45 | { 46 | size: '256 GB', 47 | // HDD 48 | hdd_read: 30, 49 | hdd_write: 30, 50 | // SSD 51 | ssd_read: 122, 52 | ssd_write: 122 53 | }, 54 | { 55 | size: '500 GB', 56 | // HDD 57 | hdd_read: 60, 58 | hdd_write: 60, 59 | // SSD 60 | ssd_read: 240, 61 | ssd_write: 240 62 | }, 63 | { 64 | size: '1 TB', 65 | // HDD 66 | hdd_read: 120, 67 | hdd_write: 120, 68 | // SSD 69 | ssd_read: 480, 70 | ssd_write: 480 71 | }, 72 | { 73 | size: '2 TB', 74 | // HDD 75 | hdd_read: 245, 76 | hdd_write: 245, 77 | // SSD 78 | ssd_read: 983, 79 | ssd_write: 983 80 | }, 81 | { 82 | size: '4 TB', 83 | // HDD 84 | hdd_read: 480, 85 | hdd_write: 400, 86 | // SSD 87 | ssd_read: 1200, 88 | ssd_write: 1200 89 | }, 90 | { 91 | size: '5 TB', 92 | // HDD 93 | hdd_read: 600, 94 | hdd_write: 400, 95 | // SSD 96 | ssd_read: 1200, 97 | ssd_write: 1200 98 | }, 99 | { 100 | size: '8 TB', 101 | // HDD 102 | hdd_read: 983, 103 | hdd_write: 400, 104 | // SSD 105 | ssd_read: 1200, 106 | ssd_write: 1200 107 | }, 108 | { 109 | size: '10 TB', 110 | // HDD 111 | hdd_read: 1200, 112 | hdd_write: 400, 113 | // SSD 114 | ssd_read: 1200, 115 | ssd_write: 1200 116 | } 117 | ], 118 | series: [ 119 | { 120 | xKey: 'size', 121 | yKey: 'hdd_write', 122 | yName: 'Standard Write (MBps)', 123 | stroke: '#20c997', 124 | marker: { 125 | shape: 'square', 126 | fill: '#20c997', 127 | stroke: '#20c997', 128 | }, 129 | }, 130 | { 131 | xKey: 'size', 132 | yKey: 'hdd_read', 133 | yName: 'Standard Read (MBps)', 134 | stroke: '#198754', 135 | marker: { 136 | shape: 'square', 137 | fill: '#198754', 138 | stroke: '#198754', 139 | }, 140 | }, 141 | { 142 | xKey: 'size', 143 | yKey: 'ssd_write', 144 | yName: 'SSD Write (MBps)', 145 | stroke: '#6610f2', 146 | marker: { 147 | shape: 'circle', 148 | fill: '#6610f2', 149 | stroke: '#6610f2', 150 | }, 151 | }, 152 | { 153 | xKey: 'size', 154 | yKey: 'ssd_read', 155 | yName: 'SSD Read (MBps)', 156 | stroke: '#6f42c1', 157 | marker: { 158 | shape: 'circle', 159 | fill: '#6f42c1', 160 | stroke: '#6f42c1', 161 | }, 162 | }, 163 | ], 164 | axes: [ 165 | { 166 | type: 'category', 167 | position: 'bottom', 168 | title: { 169 | text: 'Disk Size', 170 | enabled: false, 171 | }, 172 | }, 173 | { 174 | type: 'number', 175 | position: 'left', 176 | title: { 177 | text: 'Sustained throughput (MBps)', 178 | enabled: false, 179 | }, 180 | label: { 181 | formatter: function (params) { return params.value + ' MBps'; }, 182 | }, 183 | }, 184 | ], 185 | legend: { 186 | enabled: true, 187 | position: 'bottom' 188 | }, 189 | }; 190 | 191 | agCharts.AgChart.create(options); -------------------------------------------------------------------------------- /build/src/disks.tt2: -------------------------------------------------------------------------------- 1 | [%- PROCESS header.tt2 -%] 2 | 3 |

Google Compute Engine Persistent Disk Types

4 | 5 |
6 |

7 | Google Compute Engine offers [% disks.size %] disk types for your instances. 8 | Each of the following disk types has unique price and performance characteristics. 9 |

10 |
11 | 12 |
13 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | [%- 39 | FOREACH disk IN disks; 40 | minDiskSize = 10; 41 | IF disk.name == 'pd-extreme'; minDiskSize = 500; END; 42 | IF disk.name == 'local-ssd'; minDiskSize = 375; END; 43 | -%] 44 | 45 | 46 | 47 | [% IF minDiskSize %][% ELSE %][% END %] 48 | 49 | [% IF disk.avgMonth %] 50 | 51 | 52 | 53 | [% ELSE %] 54 | 55 | 56 | 57 | [% END %] 58 | 59 | [%- END -%] 60 | 61 |
Disk TypeRegionCosts (Avg. Region)
NameDescriptionMin. Disk Size#1 GB10 GB500 GB
[% disk.name %][% disk.description %] 400 %]class="table-danger"[% ELSIF minDiskSize > 300 %]class="table-warning"[% END %]>[% minDiskSize %] GB???[% disk.regionCount %][% disk.avgMonth %][% disk.avgMonth*10 FILTER format("%.2f") %][% disk.avgMonth*500 FILTER format("%.2f") %]?????????
62 |
63 | 64 |

Performance by Disk Size

65 | 66 |

67 | Persistent disk performance scales with the size of the disk and with the number of vCPUs on your Google Compute Engine VM instance. 68 | The Google documentation explains the whole concept very detailed. 69 | The following graphic is only meant to give a quick overview. 70 |

71 | 72 |
73 | 74 | 76 | 77 | [% PROCESS footer.tt2 %] -------------------------------------------------------------------------------- /build/src/download.tt2: -------------------------------------------------------------------------------- 1 | [%- PROCESS header.tt2 -%] 2 | 3 |
4 |
5 | 6 |

Download

7 | 8 |

9 | You can download a CSV file ([% csvFileSize %] MB) 10 | and SQL export ([% sqlFileSize %] MB, gzip compressed) with all machine types, disk types, operating system images, Google Cloud regions and zones. 11 | You can import and edit the CSV file to your favorite spreadsheet program (MS Excel, LibreOffice or Google Sheets). 12 | You can import the SQL dump into your favorite database (like SQLite). 13 |

14 | 15 |

Spreadsheet

16 |

Comma Separated Values (CSV) file with GCE machine types and Google Cloud regions.

17 |

Download CSV ([% csvFileSize %] MB)

18 | 19 |

Database

20 |

Gzip compressed Structured Query Language (SQL) export with GCE machine types, disk types, operating system images, Google Cloud regions and zones.

21 |

Download SQL ([% sqlFileSize %] MB)

22 | 23 |

Command Line

24 | 25 |

With the SQL export you can also do great queries using the command line (CLI).

26 | 27 |
# Download CSV file
28 | curl -O [% site.url %]/machine-types-regions.csv
29 | # Search CSV and count
30 | grep 'europe-west4' < machine-types-regions.csv | wc -l
31 | # Download SQL export
32 | curl -O [% site.url %]/machine-types-regions.sql.gz
33 | # Decompress SQL export
34 | gzip -d machine-types-regions.sql.gz
35 | # Import SQL dump
36 | sqlite3 gce.db < machine-types-regions.sql
37 | # SQL query Google Cloud machine types (instances)
38 | sqlite3 gce.db 'SELECT name, vCpus, hour FROM instances WHERE vCpus >= 8 AND region LIKE "europe-west4" ORDER BY hour ASC LIMIT 5'
39 | 40 |

Example SQL output:

41 |
e2-highcpu-8|8.0|0.21785232
42 | n2d-highcpu-8|8.0|0.274688
43 | e2-standard-8|8.0|0.29508816
44 | n1-highcpu-8|8.0|0.3119968
45 | n2-highcpu-8|8.0|0.315728
46 | 47 |

Open Source

48 | 49 |

50 | Everything you see here is published as open source software and licensed under the Apache License (version 2.0). 51 | You can find the source code on GitHub. 52 | Any improvements and pull requests are welcome. 53 |

54 | 55 | [%- PROCESS footer.tt2 -%] -------------------------------------------------------------------------------- /build/src/favicon.tt2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /build/src/footer.tt2: -------------------------------------------------------------------------------- 1 |
2 | 3 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /build/src/gcosts.tt2: -------------------------------------------------------------------------------- 1 | [%- PROCESS header.tt2 -%] 2 | 3 | 4 |
5 | 6 |

Google Cloud Platform Pricing and Cost Calculator

7 | 8 |

9 | Calculate estimated monthly costs of Google Cloud Platform products and resources on your local computer. 10 | Optimized for DevOps, architects and engineers to quickly see a cost breakdown and compare different options upfront: 11 |

12 | 13 | 19 | 20 |

21 | Full control and no disclosure of any information and costs to third parties. 22 | Everything is calculated on your local computer. 23 | No need to have a connection to the Internet. 24 | Everything tested and matched against the actual invoice in large Google Cloud migration projects. 25 | 26 |

27 | gcosts works on various OS and terminals, including Linux, macOS and Windows. 28 |

29 | 30 |
31 |
32 |

1. Create YAML file

33 |

Screenshot: Create YAML file

34 |
35 |
36 |

2. Run gcosts CLI program

37 |

Screenshot: Run gcosts CLI program

38 |
39 |
40 |

3. Open CSV file

41 |

Screenshot: Open CSV file

42 |
43 |
44 | 45 |

Download

46 |

47 | The gcosts pricing and cost calculator is Open Source software and free to use. 48 | You can find a detailed documentation and all download options on 49 | GitHub. 50 |

51 | 52 |

53 | Linux 54 | macOS 55 | Windows 56 |

57 | 58 |

Awarded

59 | 60 |

61 | This project was the winner of the 62 | Google Open Source Peer Bonus 63 | in 2022. 64 |

65 | 66 | [%- PROCESS footer.tt2 -%] -------------------------------------------------------------------------------- /build/src/gpu.tt2: -------------------------------------------------------------------------------- 1 | [%- PROCESS header.tt2 -%] 2 | [%- PROCESS instances_header.tt2 -%] 3 | 4 |

Google Compute Engine Machine Types with Graphics Processing Units (GPUs)

5 | 6 | [%- countGpu = 0; FOREACH instance IN instances; IF instance.acceleratorCount && instance.acceleratorCount > 0; countGpu = countGpu + 1; END; END -%] 7 |
8 |

9 | There are [% countGpu %] Google Compute Engine machine types with graphics processing units (GPUs) available. 10 | Not every GCE machine type with GPU is available in every Google Cloud region. 11 |

12 |
13 | 14 |

✅ Instance Picker with filter on GPUs

15 | 16 |
17 | [%- PROCESS instances_tr.tt2; -%] 18 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | [%- FOREACH instance IN instances; IF instance.acceleratorCount && instance.acceleratorCount > 0; -%] 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | [% END; END; %] 78 | 79 |
Machine TypeRegionsCosts (Avg. Region)
NamevCPUBase ClockMemoryGPUsType#HourSpotMonth1Y CUD3Y CUD
[% instance.name %][% instance.vCpus %][% badgeSharedCpu(instance) %][% instance.cpuBaseClock %][% instance.memoryGB %][% instance.acceleratorCount %][% instance.acceleratorType %] 63 | [% badgeCpuManufactur(instance) %] 64 | [% badgeSpot(instance) %] 65 | [% badgeSud(instance) %] 66 | [% badgeLocalSsd(instance) %] 67 | [% instance.regionCount %][% instance.avgHour %][% instance.avgHourSpot %][% instance.avgMonth %][% instance.avgMonth1yCud %][% instance.avgMonth3yCud %]
80 |
81 | [% PROCESS footer.tt2 %] -------------------------------------------------------------------------------- /build/src/grid.tt2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | GCE Instance Picker 5 | 6 | [% PROCESS favicon.tt2 %] 7 | 8 | 9 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /build/src/hana.tt2: -------------------------------------------------------------------------------- 1 | [%- PROCESS header.tt2 -%] 2 | [%- PROCESS instances_header.tt2 -%] 3 | 4 |

Certified for SAP HANA on Google Cloud Platform

5 | 6 | [%- countSAP = 0; FOREACH instance IN instances; IF instance.hana; countSAP = countSAP + 1; END; END -%] 7 |
8 |

9 | There are [% countSAP %] Google Compute Engine machine types certified for SAP HANA on Google Cloud Platform. 10 | Not every certified Google Cloud VM is available in every region. 11 |

12 |
13 | 14 |

✅ Instance Picker with filter on SAP HANA

15 | 16 |
17 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | [% FOREACH instance IN instances; IF instance.hana; %] 53 | 54 | 55 | 56 | 57 | 58 | 59 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | [% END; END; %] 76 | 77 |
Machine TypeRegionsCosts (Avg. Region)OS with 3Y CUD
NamevCPUBase ClockMemorySAPS#HourMonth1Y CUD3Y CUDSLES for SAPRHEL for SAP
[% instance.name %][% instance.vCpus %][% badgeSharedCpu(instance) %][% instance.cpuBaseClock %][% instance.memoryGB %][% instance.saps %] 60 | [% badgeCpuManufactur(instance) %] 61 | [% badgeSpot(instance) %] 62 | [% badgeSud(instance) %] 63 | [% badgeLocalSsd(instance) %] 64 | [% instance.regionCount %][% instance.avgHour %][% instance.avgMonth %][% instance.avgMonth1yCud %][% instance.avgMonth3yCud %][% instance.monthSlesSap3yCud %][% instance.monthRhelSap3yCud %]
78 |
79 | [% PROCESS footer.tt2 %] -------------------------------------------------------------------------------- /build/src/header.tt2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | [% PROCESS meta.tt2; %] 5 | [% PROCESS favicon.tt2 %] 6 | 7 | 8 | 9 | 16 | 17 | 18 |
19 | 48 |
49 |
50 |
51 | 52 | 56 | 69 | 70 |
71 |
72 | 120 |
121 |
122 | 123 | -------------------------------------------------------------------------------- /build/src/images.tt2: -------------------------------------------------------------------------------- 1 | [%- PROCESS header.tt2 -%] 2 | 3 |

Google Compute Engine Operating System Images

4 | 5 |
6 |

7 | Compute Engine offers many preconfigured public images that have compatible Linux, UNIX or Windows operating systems. 8 | Most images are free of charge. 9 | Premium images (SLES, RHEL, Windows) add additional cost to your instances. 10 | You can see the costs in the machine type overview. 11 |

12 |
13 | 14 | 29 | 30 |
31 | [% FOREACH project IN image_projects %] 32 |
37 |

[% imageProjectName(project.name) %] [% project.name %]

38 | 39 |

Image project: [% project.name %]

40 | 41 |
42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | [% FOREACH family IN image_famlies; IF family.project == project.name; %] 54 | 55 | 56 | 60 | 61 | 62 | 63 | 64 | [% END; END; %] 65 | 66 |
Image FamilyLatest ImageDescriptionMin. Disk SizeCreation
[% family.name %] 57 | [% family.image %] 58 | [% badgeImageArch(family.architecture) %] 59 | [% IF family.description %][% family.description %][% ELSE %]-[% END %][% family.diskSizeGb %] GB[% family.creation | replace('T.+$','') %]
67 |
68 | 69 |

Google Cloud CLI:

70 | 76 |
77 |
78 |
# Create VM instance with [% imageProjectName(project.name) %] operating system boot disk
79 | # Name: 'vm-[% project.name %]'
80 | # Machine type: 'e2-micro'
81 | # Zone: 'us-central1-a'
82 | gcloud compute instances create vm-[% project.name %] \
83 | --machine-type='e2-micro' \
84 | --zone='us-central1-a' \
85 | --image-project='[% project.name %]' \
86 | --image-family='ADD_IMAGE_FAMILY_HERE'
87 |
88 | 89 |
90 | [% END %] 91 |
92 | 93 | [% PROCESS footer.tt2 %] -------------------------------------------------------------------------------- /build/src/img/combine-filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyclenerd/google-cloud-compute-machine-types/22f96a93090f01ac486861d918802d7a1d2821e9/build/src/img/combine-filter.png -------------------------------------------------------------------------------- /build/src/img/csv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyclenerd/google-cloud-compute-machine-types/22f96a93090f01ac486861d918802d7a1d2821e9/build/src/img/csv.png -------------------------------------------------------------------------------- /build/src/img/favicon/README.txt: -------------------------------------------------------------------------------- 1 | This favicon was generated using the following graphics from Twitter Twemoji: 2 | 3 | - Graphics Title: 1f4b8.svg 4 | - Graphics Author: Copyright 2020 Twitter, Inc and other contributors (https://github.com/twitter/twemoji) 5 | - Graphics Source: https://github.com/twitter/twemoji/blob/master/assets/svg/1f4b8.svg 6 | - Graphics License: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/) 7 | -------------------------------------------------------------------------------- /build/src/img/favicon/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyclenerd/google-cloud-compute-machine-types/22f96a93090f01ac486861d918802d7a1d2821e9/build/src/img/favicon/android-chrome-192x192.png -------------------------------------------------------------------------------- /build/src/img/favicon/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyclenerd/google-cloud-compute-machine-types/22f96a93090f01ac486861d918802d7a1d2821e9/build/src/img/favicon/android-chrome-512x512.png -------------------------------------------------------------------------------- /build/src/img/favicon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyclenerd/google-cloud-compute-machine-types/22f96a93090f01ac486861d918802d7a1d2821e9/build/src/img/favicon/apple-touch-icon.png -------------------------------------------------------------------------------- /build/src/img/favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyclenerd/google-cloud-compute-machine-types/22f96a93090f01ac486861d918802d7a1d2821e9/build/src/img/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /build/src/img/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyclenerd/google-cloud-compute-machine-types/22f96a93090f01ac486861d918802d7a1d2821e9/build/src/img/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /build/src/img/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyclenerd/google-cloud-compute-machine-types/22f96a93090f01ac486861d918802d7a1d2821e9/build/src/img/favicon/favicon.ico -------------------------------------------------------------------------------- /build/src/img/favicon/site.webmanifest: -------------------------------------------------------------------------------- 1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} -------------------------------------------------------------------------------- /build/src/img/filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyclenerd/google-cloud-compute-machine-types/22f96a93090f01ac486861d918802d7a1d2821e9/build/src/img/filter.png -------------------------------------------------------------------------------- /build/src/img/gcosts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyclenerd/google-cloud-compute-machine-types/22f96a93090f01ac486861d918802d7a1d2821e9/build/src/img/gcosts.png -------------------------------------------------------------------------------- /build/src/img/show-more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyclenerd/google-cloud-compute-machine-types/22f96a93090f01ac486861d918802d7a1d2821e9/build/src/img/show-more.png -------------------------------------------------------------------------------- /build/src/img/social.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyclenerd/google-cloud-compute-machine-types/22f96a93090f01ac486861d918802d7a1d2821e9/build/src/img/social.png -------------------------------------------------------------------------------- /build/src/img/sort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyclenerd/google-cloud-compute-machine-types/22f96a93090f01ac486861d918802d7a1d2821e9/build/src/img/sort.png -------------------------------------------------------------------------------- /build/src/img/usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyclenerd/google-cloud-compute-machine-types/22f96a93090f01ac486861d918802d7a1d2821e9/build/src/img/usage.png -------------------------------------------------------------------------------- /build/src/imprint.tt2: -------------------------------------------------------------------------------- 1 | [%- PROCESS header.tt2 -%] 2 | 3 |
4 |
5 | 6 |

Imprint

7 | 8 |

🇩🇪 German law demands this.

9 | 10 |

11 |

12 | Nils Knieling
13 | Klabundeweg 14
14 | 22359 Hamburg
15 | Deutschland 16 |
17 |

18 | 19 |

Email: nils [at] nkn-it (dot) de

20 | 21 |

Phone: + 49 (0) 40 2282 1390 (no support)

22 | 23 |

Umsatzsteuer-ID gemäß §27 a Umsatzsteuergesetz (VAT ID Number Germany): DE 279463785

24 | 25 | [%- PROCESS footer.tt2 -%] -------------------------------------------------------------------------------- /build/src/instance_in_region.json: -------------------------------------------------------------------------------- 1 | [% json %] -------------------------------------------------------------------------------- /build/src/instances.tt2: -------------------------------------------------------------------------------- 1 | [%- PROCESS header.tt2 -%] 2 | [%- PROCESS instances_header.tt2 -%] 3 | 4 |

Google Compute Engine Machine Types

5 | 6 |
7 |

8 | There are [% instances.size %] Google Compute Engine machine types in total. 9 | Not every Google Cloud VM is available in every region. 10 |

11 |
12 | 13 |
14 | [%- PROCESS instances_tr.tt2; -%] 15 | 24 | 25 | [%- instanceTh() -%] 26 | 27 | 28 | [%- FOREACH instance IN instances; instanceTr(instance); END -%] 29 | 30 |
31 |
32 | [% PROCESS footer.tt2 %] -------------------------------------------------------------------------------- /build/src/instances_header.tt2: -------------------------------------------------------------------------------- 1 |
2 |
3 | 26 |
27 |
-------------------------------------------------------------------------------- /build/src/instances_tr.tt2: -------------------------------------------------------------------------------- 1 | [%- MACRO instanceTh BLOCK -%] 2 | 3 | Machine Type 4 | Regions 5 | Costs (Avg. Region) 6 | OS 7 | 8 | 9 | Name 10 | vCPU 11 | Base Clock 12 | Memory 13 | 14 | # 15 | 16 | Hour 17 | Spot 18 | Month 19 | 1Y CUD 20 | 3Y CUD 21 | 22 | SLES 23 | RHEL 24 | Windows 25 | 26 | [%- END -%] 27 | 28 | [%- MACRO instanceTr(instance) BLOCK -%] 29 | 30 | [% instance.name %] 31 | [% instance.vCpus %][% badgeSharedCpu(instance) %] 32 | [% instance.cpuBaseClock %] 33 | [% instance.memoryGB %] 34 | 35 | [% badgeCpuManufactur(instance) %] 36 | [% badgeGpu(instance) %] 37 | [% badgeSap(instance) %] 38 | [% badgeHana(instance) %] 39 | [% badgeSpot(instance) %] 40 | [% badgeSud(instance) %] 41 | [% badgeLocalSsd(instance) %] 42 | 43 | [% instance.regionCount %] 44 | 45 | [% instance.avgHour %] 46 | [% instance.avgHourSpot %] 47 | [% instance.avgMonth %] 48 | [% instance.avgMonth1yCud %] 49 | [% instance.avgMonth3yCud %] 50 | 51 | [% instance.monthSles %] 52 | [% instance.monthRhel %] 53 | [% instance.monthWindows %] 54 | 55 | [%- END -%] 56 | 57 | [%- MACRO instancePlatformTh BLOCK -%] 58 | 59 | Machine Type 60 | Regions 61 | Costs (Avg. Region) 62 | OS 63 | 64 | 65 | Name 66 | vCPU 67 | Base Clock 68 | Platform 69 | Memory 70 | 71 | # 72 | 73 | Hour 74 | Spot 75 | Month 76 | 1Y CUD 77 | 3Y CUD 78 | 79 | SLES 80 | RHEL 81 | Windows 82 | 83 | [%- END -%] 84 | 85 | [%- MACRO instancePlatformTr(instance) BLOCK -%] 86 | 87 | [% instance.name %] 88 | [% instance.vCpus %][% badgeSharedCpu(instance) %] 89 | [% instance.cpuBaseClock %] 90 | [% instance.cpuPlatform | replace('\[','') | replace('\]','') | replace('Intel','') | replace('AMD','') %] 91 | [% instance.memoryGB %] 92 | 93 | [% badgeGpu(instance) %] 94 | [% badgeSap(instance) %] 95 | [% badgeHana(instance) %] 96 | [% badgeSpot(instance) %] 97 | [% badgeSud(instance) %] 98 | [% badgeLocalSsd(instance) %] 99 | 100 | [% instance.regionCount %] 101 | 102 | [% instance.avgHour %] 103 | [% instance.avgHourSpot %] 104 | [% instance.avgMonth %] 105 | [% instance.avgMonth1yCud %] 106 | [% instance.avgMonth3yCud %] 107 | 108 | [% instance.monthSles %] 109 | [% instance.monthRhel %] 110 | [% instance.monthWindows %] 111 | 112 | [%- END -%] -------------------------------------------------------------------------------- /build/src/intel.tt2: -------------------------------------------------------------------------------- 1 | [%- PROCESS header.tt2 -%] 2 | [%- PROCESS instances_header.tt2 -%] 3 | 4 |

Google Compute Engine Machine Types with Intel CPU Platform

5 | 6 | [%- countIntel = 0; FOREACH instance IN instances; IF instance.intel; countIntel = countIntel + 1; END; END -%] 7 |
8 |

9 | There are [% countIntel %] Google Compute Engine machine types with Intel central processing unit (CPU) available. 10 | Not every GCE machine type with Intel CPU is available in every Google Cloud region. 11 |

12 |
13 | 14 |

✅ Instance Picker with filter on CPU Platform

15 | 16 |
17 | [%- PROCESS instances_tr.tt2; -%] 18 | 27 | 28 | [%- instancePlatformTh() -%] 29 | 30 | 31 | [%- FOREACH instance IN instances; IF instance.intel; instancePlatformTr(instance); END; END -%] 32 | 33 |
34 |
35 | [% PROCESS footer.tt2 %] -------------------------------------------------------------------------------- /build/src/map.tt2: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Google Cloud Platform Region Map 5 | 6 | [% PROCESS favicon.tt2 %] 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 42 | 43 | -------------------------------------------------------------------------------- /build/src/platforms.tt2: -------------------------------------------------------------------------------- 1 | [%- PROCESS header.tt2 -%] 2 | [%- PROCESS regions_header.tt2 -%] 3 | 4 |

Available CPU Platforms in Google Cloud Regions

5 | 6 |
7 |

8 | You have the choice between Google Compute Engine machine types with 9 | Intel, 10 | AMD, or 11 | Arm-based 12 | central processing units (CPUs). 13 | The different CPU platforms differ from the year of release and performance. 14 | Not every CPU is available in all Google Cloud region and zones. 15 |

16 |
17 | 18 |

19 | 🗺️ Region Map 20 | ⏱️ Ping 21 |

22 | 23 |
24 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | [% FOREACH region IN regions %] 62 | 63 | 64 | 68 | 76 | 77 | [% IF region.intelGraniteRapids %][% ELSE %][% END %] 78 | [% IF region.intelEmeraldRapids %][% ELSE %][% END %] 79 | [% IF region.intelSapphireRapids %][% ELSE %][% END %] 80 | [% IF region.intelIceLake %][% ELSE %][% END %] 81 | [% IF region.intelCascadeLake %][% ELSE %][% END %] 82 | [% IF region.intelSkylake %][% ELSE %][% END %] 83 | [% IF region.amdTurin %][% ELSE %][% END %] 84 | [% IF region.amdGenoa %][% ELSE %][% END %] 85 | [% IF region.amdMilan %][% ELSE %][% END %] 86 | [% IF region.amdRome %][% ELSE %][% END %] 87 | [% IF region.armAmpereAltra %][% ELSE %][% END %] 88 | [% IF region.armGoogleAxion %][% ELSE %][% END %] 89 | 90 | [% END %] 91 | 92 |
RegionZonesIntelAMDArm (Ampere, Google)
NameLocationCountry#GraniteEmeraldSapphireIceCascadeSkylakeTurinGenoaMilanRomeAltraAxion
[% region.name %] 65 | [% IF region.regionLocation %][% region.regionLocation %][% ELSE %]?[% END %] 66 | [% badgeLowCo2Region(region) %] 67 | 69 | [% IF region.regionLocationCountryCode %] 70 | [% countryFlag(region.regionLocationCountryCode) %] 71 | [% countryName(region.regionLocationCountryCode) %] 72 | [% ELSE %] 73 | ? 74 | [% END %] 75 | [% region.zoneCount %][% region.intelGraniteRapids %]0[% region.intelEmeraldRapids %]0[% region.intelSapphireRapids %]0[% region.intelIceLake %]0[% region.intelCascadeLake %]0[% region.intelSkylake %]0[% region.amdTurin %]0[% region.amdGenoa %]0[% region.amdMilan %]0[% region.amdRome %]0[% region.armAmpereAltra %]0[% region.armGoogleAxion %]0
93 |
94 | [% PROCESS footer.tt2 %] -------------------------------------------------------------------------------- /build/src/regions.tt2: -------------------------------------------------------------------------------- 1 | [%- PROCESS header.tt2 -%] 2 | [%- PROCESS regions_header.tt2 -%] 3 | 4 |

Google Cloud Platform Regions

5 | 6 | [% 7 | total_public_ip_addr = 0; 8 | FOREACH region IN regions; 9 | IF region.regionPublicIpv4Addr; total_public_ip_addr = total_public_ip_addr + region.regionPublicIpv4Addr; END; 10 | END; 11 | %] 12 | 13 |
14 |

15 | Worldwide, there are [% regions.size %] Google Cloud regions. 16 | A total of [% total_public_ip_addr / 1000000 FILTER format("%d") %] million public IPv4 addresses are assigned to all Google Cloud Platform regions. 17 | The pricing differs. 18 |

19 |
20 | 21 |

22 | 🗺️ Region Map 23 | ⏱️ Ping 24 |

25 | 26 |
27 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | [% FOREACH region IN regions %] 72 | 73 | 74 | 78 | 86 | 89 | 92 | 93 | 94 | [% IF region.generalCount %][% ELSE %][% END %] 95 | [% IF region.computeCount %][% ELSE %][% END %] 96 | [% IF region.memoryCount %][% ELSE %][% END %] 97 | [% IF region.acceleratorCount %][% ELSE %][% END %] 98 | [% IF region.storageCount %][% ELSE %][% END %] 99 | 100 | [% IF region.sap %][% ELSE %][% END %] 101 | [% IF region.hana %][% ELSE %][% END %] 102 | 103 | 107 | 111 | 112 | 113 | 114 | [% END %] 115 | 116 |
RegionIP Addr.ZonesMachine FamilySAPCosts (e2-standard-8)Carbon
NameLocationCountry#%#GeneralComputeMemoryGPUStorageApp.HANAHourMonthCFE%gCO2eq/kWh
[% region.name %] 75 | [% IF region.regionLocation %][% region.regionLocation %][% ELSE %]?[% END %] 76 | [% badgeLowCo2Region(region) %] 77 | 79 | [% IF region.regionLocationCountryCode %] 80 | [% countryFlag(region.regionLocationCountryCode) %] 81 | [% countryName(region.regionLocationCountryCode) %] 82 | [% ELSE %] 83 | ? 84 | [% END %] 85 | 87 | [% IF region.regionPublicIpv4Addr %][% region.regionPublicIpv4Addr FILTER format("%d") %][% ELSE %]?[% END %] 88 | 90 | [% IF region.regionPublicIpv4Addr %][% region.regionPublicIpv4Addr / total_public_ip_addr * 100 FILTER format("%.2f") %][% ELSE %]?[% END %] 91 | [% region.zoneCount %][% region.generalCount %]0[% region.computeCount %]0[% region.memoryCount %]0[% region.acceleratorCount %]0[% region.storageCount %]0[% region.sap %]0[% region.hana %]0 105 | [% region.e2Standard8Hour %] 106 | 109 | [% region.e2Standard8Month %] 110 | [% IF region.regionCfe %][% region.regionCfe %][% ELSE %]?[% END %][% IF region.regionCo2Kwh %][% region.regionCo2Kwh %][% ELSE %]?[% END %]
117 |
118 | [% PROCESS footer.tt2 %] -------------------------------------------------------------------------------- /build/src/regions_header.tt2: -------------------------------------------------------------------------------- 1 |
2 |
3 | 14 |
15 |
-------------------------------------------------------------------------------- /build/src/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /img/ 3 | Disallow: /index.html 4 | Disallow: /imprint.html 5 | Disallow: /grid.html 6 | Disallow: /map.html 7 | Disallow: /*.js 8 | Disallow: /*.csv 9 | Disallow: /*.sql 10 | Disallow: /*.gz 11 | Disallow: /*.json 12 | Disallow: /404.html 13 | Disallow: /cdn-cgi/ 14 | Disallow: /comparison/ 15 | [% FOREACH region IN regions; IF region.name %]Disallow: /[% region.name %]/ 16 | [% END; END; %] -------------------------------------------------------------------------------- /build/src/sap.tt2: -------------------------------------------------------------------------------- 1 | [%- PROCESS header.tt2 -%] 2 | [%- PROCESS instances_header.tt2 -%] 3 | 4 |

Certified for SAP Application on Google Cloud Platform

5 | 6 | [%- countSAP = 0; FOREACH instance IN instances; IF instance.sap; countSAP = countSAP + 1; END; END -%] 7 |
8 |

9 | There are [% countSAP %] Google Compute Engine machine types certified for SAP applications on Google Cloud Platform. 10 | Not every certified GCE machine type is available in every Google Cloud region. 11 |

12 |
13 | 14 |

✅ Instance Picker with filter on SAP

15 | 16 |
17 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | [% FOREACH instance IN instances; IF instance.sap; %] 54 | 55 | 56 | 57 | 58 | 59 | 60 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | [% END; END; %] 79 | 80 |
Machine TypeRegionsCosts (Avg. Region)OS
NamevCPUBase ClockMemorySAPS#HourMonth1Y CUD3Y CUDSLES for SAPRHEL for SAPWindows
[% instance.name %][% instance.vCpus %][% badgeSharedCpu(instance) %][% instance.cpuBaseClock %][% instance.memoryGB %][% instance.saps %] 61 | [% badgeCpuManufactur(instance) %] 62 | [% badgeHana(instance) %] 63 | [% badgeSpot(instance) %] 64 | [% badgeSud(instance) %] 65 | [% badgeLocalSsd(instance) %] 66 | [% instance.regionCount %][% instance.avgHour %][% instance.avgMonth %][% instance.avgMonth1yCud %][% instance.avgMonth3yCud %][% instance.monthSlesSap %][% instance.monthRhelSap %][% instance.monthWindows %]
81 |
82 | [% PROCESS footer.tt2 %] -------------------------------------------------------------------------------- /build/src/sitemap.tt2: -------------------------------------------------------------------------------- 1 | [% site.url %]/ 2 | [% FOREACH file IN files %][% site.url %]/[% file %] 3 | [% END %] -------------------------------------------------------------------------------- /build/src/vs.tt2: -------------------------------------------------------------------------------- 1 | [%- PROCESS header.tt2 -%] 2 | 3 |

Compare Google Compute Engine Machine Type [% instance_a.name %]

4 | 5 |
6 |

7 | Compare Google Compute Engine machine type 8 | [% instance_a.name %] 9 | ([% instance_a.vCpus %] vCPU, [% instance_a.memoryGB %] GB memory) 10 | with other GCE machine types. 11 |

12 |
13 | 14 |
15 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | [% FOREACH instance IN instances %] 40 | [% IF instance_a.name == instance.name %] 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 57 | 58 | 59 | 62 | 63 | 64 | 65 | 68 | 69 | 70 | 71 | 75 | 76 | 77 | [% ELSE %] 78 | 79 | 84 | 85 | [% tableCompareNumber(instance_a.vCpus || 0, instance.vCpus || 0) %] 86 | 87 | 88 | [% tableCompareNumber(instance_a.memoryGB || 0, instance.memoryGB || 0) %] 89 | 90 | 98 | 99 | [% tableCompareCosts(instance_a.avgHour || 0, instance.avgHour || 0) %] 100 | 103 | 104 | 105 | [% tableCompareCosts(instance_a.avgHourSpot || 0, instance.avgHourSpot || 0) %] 106 | 109 | 110 | 111 | [% tableCompareCosts(instance_a.avgMonth || 0, instance.avgMonth || 0) %] 112 | 116 | 117 | 118 | [% END; END; %] 119 | 120 |
NamevCPUMemoryAvg. costs per hourAvg. costs per Spot VM hourAvg. costs per month
[% instance.name %][% instance.vCpus %][% badgeSharedCpu(instance) %][% instance.memoryGB %] 50 | [% badgeCpuManufactur(instance) %] 51 | [% badgeGpu(instance) %] 52 | [% badgeSap(instance) %] 53 | [% badgeHana(instance) %] 54 | [% badgeSpot(instance) %] 55 | [% badgeLocalSsd(instance) %] 56 | 60 | [% instance.avgHour %] 61 | 66 | [% instance.avgHourSpot %] 67 | 72 | [% instance.avgMonth %] 73 | [% badgeSud(instance) %] 74 |
80 | 81 | [% instance.name %] 82 | 83 | [% instance.vCpus %][% badgeSharedCpu(instance) %][% instance.memoryGB %] 91 | [% badgeCpuManufactur(instance) %] 92 | [% badgeGpu(instance) %] 93 | [% badgeSap(instance) %] 94 | [% badgeHana(instance) %] 95 | [% badgeSpot(instance) %] 96 | [% badgeLocalSsd(instance) %] 97 | 101 | [% instance.avgHour %] 102 | 107 | [% instance.avgHourSpot %] 108 | 113 | [% instance.avgMonth %] 114 | [% badgeSud(instance) %] 115 |
121 |
122 | [% PROCESS footer.tt2 %] -------------------------------------------------------------------------------- /img/compare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyclenerd/google-cloud-compute-machine-types/22f96a93090f01ac486861d918802d7a1d2821e9/img/compare.png -------------------------------------------------------------------------------- /img/grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyclenerd/google-cloud-compute-machine-types/22f96a93090f01ac486861d918802d7a1d2821e9/img/grid.png -------------------------------------------------------------------------------- /img/social.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyclenerd/google-cloud-compute-machine-types/22f96a93090f01ac486861d918802d7a1d2821e9/img/social.jpg -------------------------------------------------------------------------------- /instances/README.md: -------------------------------------------------------------------------------- 1 | # Google Compute Engine 2 | 3 | Here you can find the SQL files that add the different information from the Google websites. 4 | The information is in addition to the data of the Google Cloud Compute API. 5 | 6 | Feel free to make changes if something is wrong or you want to expand it. 7 | 8 | The SQL files are read during the [build](../build/) process. 9 | 10 | ## Machine Types 11 | 12 | * [Series](./series/) 13 | * [A2](./series/a2.sql) 14 | * [A3](./series/a2.sql) 15 | * [C2](./series/c2.sql) 16 | * [C2D](./series/c2d.sql) 17 | * [C3](./series/c3.sql) 18 | * [C3D](./series/c3d.sql) 19 | * [C4](./series/c4.sql) 20 | * [C4A](./series/c4a.sql) 21 | * [C4D](./series/c4d.sql) 22 | * [E2](./series/e2.sql) 23 | * [G2](./series/g2.sql) 24 | * [M1](./series/m1.sql) 25 | * [M2](./series/m2.sql) 26 | * [M3](./series/m3.sql) 27 | * [M4](./series/m4.sql) 28 | * [N1](./series/n1.sql) 29 | * [N2](./series/n2.sql) 30 | * [N2D](./series/n2d.sql) 31 | * [N4](./series/n4.sql) 32 | * [T2D](./series/t2d.sql) 33 | * [T2A](./series/t2a.sql) 34 | * [Z3](./series/z3.sql) 35 | * [CPU Platform](./series/cpu/) 36 | * [Frequency (GHz)](./series/cpu/frequency.sql) 37 | * [EEMBC CoreMark Benchmark](./series/cpu/coremark.sql) 38 | * [SAP](./series/sap/) 39 | * [SAP certified machine types](./series/sap/sap.sql) 40 | * [SAP HANA certified machine types](./series/sap/hana.sql) 41 | 42 | ## Costs 43 | 44 | The cost per machine type in region and licenses are added with the [gcosts](https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator) program. 45 | 46 | ## Resources of the Information 47 | 48 | 88 | 89 | -------------------------------------------------------------------------------- /instances/clean_up.sql: -------------------------------------------------------------------------------- 1 | /* 2 | * Delete not yet official 100% released machine types 3 | */ 4 | 5 | DELETE FROM machinetypes WHERE name LIKE 'ct3-%'; 6 | DELETE FROM machinetypes WHERE name LIKE 'ct3p-%'; 7 | DELETE FROM machinetypes WHERE name LIKE 'ct4p-%'; 8 | DELETE FROM machinetypes WHERE name LIKE 'ct5l-%'; 9 | DELETE FROM machinetypes WHERE name LIKE 'ct5lp-%'; 10 | DELETE FROM machinetypes WHERE name LIKE 'ct5p-%'; 11 | DELETE FROM machinetypes WHERE name LIKE 'ct6e-%'; 12 | 13 | DELETE FROM machinetypes WHERE name LIKE 'x4-%'; 14 | 15 | /* 16 | * Delete not yet official 100% finished regions 17 | */ 18 | 19 | DELETE FROM machinetypes WHERE zone LIKE 'us-west8-%'; 20 | DELETE FROM disktypes WHERE zone LIKE 'us-west8-%'; 21 | 22 | 23 | /* 24 | * Remove disconnected data centers 25 | */ 26 | /* us-central2 */ 27 | DELETE FROM machinetypes WHERE zone LIKE 'us-central2-%'; 28 | DELETE FROM disktypes WHERE zone LIKE 'us-central2-%'; 29 | /* us-east2 */ 30 | DELETE FROM machinetypes WHERE zone LIKE 'us-east2-%'; 31 | DELETE FROM disktypes WHERE zone LIKE 'us-east2-%'; 32 | /* us-east7 */ 33 | DELETE FROM machinetypes WHERE zone LIKE 'us-east7-%'; 34 | DELETE FROM disktypes WHERE zone LIKE 'us-east7-%'; 35 | /* europe-west5 */ 36 | DELETE FROM machinetypes WHERE zone LIKE 'europe-west5-%'; 37 | DELETE FROM disktypes WHERE zone LIKE 'europe-west5-%'; -------------------------------------------------------------------------------- /instances/series/a2.sql: -------------------------------------------------------------------------------- 1 | /* A2 Accelerator-optimized high-gpu */ 2 | /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ 3 | /* https://cloud.google.com/compute/docs/accelerator-optimized-machines#a2_vms */ 4 | UPDATE instances SET 5 | series = 'a2', 6 | family = 'Accelerator-optimized', 7 | cpuPlatform = 'Cascade Lake', 8 | localSsd = '1', 9 | spot = '1' 10 | WHERE name LIKE 'a2-%'; 11 | UPDATE instances SET bandwidth = '24' WHERE name LIKE 'a2-%-1g'; 12 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 'a2-%-2g'; 13 | UPDATE instances SET bandwidth = '50' WHERE name LIKE 'a2-%-4g'; 14 | UPDATE instances SET bandwidth = '100' WHERE name LIKE 'a2-%-8g'; 15 | UPDATE instances SET bandwidth = '100' WHERE name LIKE 'a2-%-16g'; 16 | 17 | UPDATE instances SET localSsd = '375' WHERE name LIKE 'a2-ultragpu-1g'; 18 | UPDATE instances SET localSsd = '750' WHERE name LIKE 'a2-ultragpu-2g'; 19 | UPDATE instances SET localSsd = '1500' WHERE name LIKE 'a2-ultragpu-4g'; 20 | UPDATE instances SET localSsd = '3000' WHERE name LIKE 'a2-ultragpu-8g'; 21 | -------------------------------------------------------------------------------- /instances/series/a3.sql: -------------------------------------------------------------------------------- 1 | /* A3 Accelerator-optimized machine family */ 2 | /* https://cloud.google.com/compute/docs/accelerator-optimized-machines#a3-vms */ 3 | UPDATE instances SET 4 | series = 'a3', 5 | family = 'Accelerator-optimized', 6 | cpuPlatform = 'Sapphire Rapids', 7 | localSsd = '1', 8 | bandwidth = '200', 9 | spot = '1' 10 | WHERE name LIKE 'a3-%'; 11 | 12 | UPDATE instances SET localSsd = '6000' WHERE name LIKE 'a3-%-8g'; 13 | 14 | UPDATE instances SET bandwidth = '800' WHERE name LIKE 'a3-highgpu-8g'; 15 | UPDATE instances SET bandwidth = '1600' WHERE name LIKE 'a3-megagpu-8g'; 16 | -------------------------------------------------------------------------------- /instances/series/c2.sql: -------------------------------------------------------------------------------- 1 | /* C2 Compute-optimized */ 2 | /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ 3 | /* https://cloud.google.com/compute/docs/compute-optimized-machines#c2_machine_types */ 4 | UPDATE instances SET 5 | series = 'c2', 6 | family = 'Compute-optimized', 7 | cpuPlatform = 'Cascade Lake', 8 | localSsd = '1', 9 | sud = '1', 10 | spot = '1' 11 | WHERE name LIKE 'c2-%'; 12 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 'c2-%-4'; 13 | UPDATE instances SET bandwidth = '16' WHERE name LIKE 'c2-%-8'; 14 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 'c2-%-16'; 15 | UPDATE instances SET bandwidth = '32', tier1 = '50' WHERE name LIKE 'c2-%-30'; 16 | UPDATE instances SET bandwidth = '32', tier1 = '100' WHERE name LIKE 'c2-%-60'; -------------------------------------------------------------------------------- /instances/series/c2d.sql: -------------------------------------------------------------------------------- 1 | /* C2D Compute-optimized */ 2 | /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ 3 | /* https://cloud.google.com/compute/docs/compute-optimized-machines#c2d-standard */ 4 | UPDATE instances SET 5 | series = 'c2d', 6 | family = 'Compute-optimized', 7 | cpuPlatform = 'Milan', 8 | localSsd = '1', 9 | bandwidth = '32', 10 | spot = '1' 11 | WHERE name LIKE 'c2d-%'; 12 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 'c2d-%-2'; 13 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 'c2d-%-4'; 14 | UPDATE instances SET bandwidth = '16' WHERE name LIKE 'c2d-%-8'; 15 | UPDATE instances SET tier1 = '50' WHERE name LIKE 'c2d-%-32'; 16 | UPDATE instances SET tier1 = '50' WHERE name LIKE 'c2d-%-56'; 17 | UPDATE instances SET tier1 = '100' WHERE name LIKE 'c2d-%-112'; -------------------------------------------------------------------------------- /instances/series/c3.sql: -------------------------------------------------------------------------------- 1 | /* C3 Compute-optimized */ 2 | /* https://cloud.google.com/compute/docs/general-purpose-machines#c3-standard_1 */ 3 | UPDATE instances SET 4 | series = 'c3', 5 | family = 'General-purpose', 6 | cpuPlatform = 'Sapphire Rapids', 7 | localSsd = '0', 8 | bandwidth = '32', 9 | spot = '1' 10 | WHERE name LIKE 'c3-%'; 11 | 12 | UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c3-%-4%'; 13 | UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c3-%-8%'; 14 | UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c3-%-22%'; 15 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 'c3-%-44%'; 16 | UPDATE instances SET bandwidth = '62' WHERE name LIKE 'c3-%-88%'; 17 | UPDATE instances SET bandwidth = '100' WHERE name LIKE 'c3-%-176%'; 18 | UPDATE instances SET bandwidth = '100' WHERE name LIKE 'c3-%-192-metal%'; 19 | 20 | UPDATE instances SET tier1 = '50' WHERE name LIKE 'c3-%-44%'; 21 | UPDATE instances SET tier1 = '100' WHERE name LIKE 'c3-%-88%'; 22 | UPDATE instances SET tier1 = '200' WHERE name LIKE 'c3-%-176%'; 23 | UPDATE instances SET tier1 = '200' WHERE name LIKE 'c3-%-192-metal%'; 24 | 25 | UPDATE instances SET localSsd = '1' WHERE name LIKE 'c3-%-lssd'; -------------------------------------------------------------------------------- /instances/series/c3d.sql: -------------------------------------------------------------------------------- 1 | /* C3 Compute-optimized */ 2 | /* https://cloud.google.com/compute/docs/general-purpose-machines#c3-standard_1 */ 3 | UPDATE instances SET 4 | series = 'c3d', 5 | family = 'General-purpose', 6 | cpuPlatform = 'Genoa', 7 | localSsd = '0', 8 | bandwidth = '20', 9 | spot = '1' 10 | WHERE name LIKE 'c3d-%'; 11 | 12 | UPDATE instances SET bandwidth = '40' WHERE name LIKE 'c3d-%-60%'; 13 | UPDATE instances SET bandwidth = '60' WHERE name LIKE 'c3d-%-90%'; 14 | UPDATE instances SET bandwidth = '100' WHERE name LIKE 'c3d-%-180%'; 15 | UPDATE instances SET bandwidth = '100' WHERE name LIKE 'c3d-%-360%'; 16 | 17 | UPDATE instances SET tier1 = '50' WHERE name LIKE 'c3d-%-30%'; 18 | UPDATE instances SET tier1 = '75' WHERE name LIKE 'c3d-%-60%'; 19 | UPDATE instances SET tier1 = '100' WHERE name LIKE 'c3d-%-90%'; 20 | UPDATE instances SET tier1 = '150' WHERE name LIKE 'c3d-%-180%'; 21 | UPDATE instances SET tier1 = '200' WHERE name LIKE 'c3d-%-360%'; 22 | 23 | UPDATE instances SET localSsd = '1' WHERE name LIKE 'c3d-%-lssd'; -------------------------------------------------------------------------------- /instances/series/c4.sql: -------------------------------------------------------------------------------- 1 | /* C4 General-purpose */ 2 | /* https://cloud.google.com/compute/docs/general-purpose-machines#c4_series */ 3 | UPDATE instances SET 4 | series = 'c4', 5 | family = 'General-purpose', 6 | cpuPlatform = 'Emerald Rapids, Granite Rapids', 7 | localSsd = '0', 8 | sud = '0', 9 | spot = '1' 10 | WHERE name LIKE 'c4-%'; 11 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 'c4-%-2%'; 12 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 'c4-%-4%'; 13 | UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c4-%-8%'; 14 | UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c4-%-16%'; 15 | UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c4-%-24%'; 16 | UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c4-%-32%'; 17 | UPDATE instances SET bandwidth = '34' WHERE name LIKE 'c4-%-48%'; 18 | UPDATE instances SET bandwidth = '67' WHERE name LIKE 'c4-%-96%'; 19 | UPDATE instances SET bandwidth = '100' WHERE name LIKE 'c4-%-144%'; 20 | UPDATE instances SET bandwidth = '100' WHERE name LIKE 'c4-%-192%'; 21 | UPDATE instances SET bandwidth = '100' WHERE name LIKE 'c4-%-288%'; 22 | 23 | UPDATE instances SET tier1 = '50' WHERE name LIKE 'c4-%-48%'; 24 | UPDATE instances SET tier1 = '100' WHERE name LIKE 'c4-%-96%'; 25 | UPDATE instances SET tier1 = '150' WHERE name LIKE 'c4-%-144%'; 26 | UPDATE instances SET tier1 = '200' WHERE name LIKE 'c4-%-192%'; 27 | UPDATE instances SET tier1 = '200' WHERE name LIKE 'c4-%-288%'; 28 | 29 | UPDATE instances SET localSsd = '1' WHERE name LIKE 'c4-%-lssd'; -------------------------------------------------------------------------------- /instances/series/c4a.sql: -------------------------------------------------------------------------------- 1 | /* C4A General-purpose */ 2 | /* https://cloud.google.com/compute/docs/general-purpose-machines#c4a_series */ 3 | UPDATE instances SET 4 | series = 'c4a', 5 | family = 'General-purpose', 6 | cpuPlatform = 'Google Axion', 7 | localSsd = '0', 8 | sud = '0', 9 | spot = '1' 10 | WHERE name LIKE 'c4a-%'; 11 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 'c4a-%-1%'; 12 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 'c4a-%-2%'; 13 | UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c4a-%-4%'; 14 | UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c4a-%-8%'; 15 | UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c4a-%-16%'; 16 | UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c4a-%-32%'; 17 | UPDATE instances SET bandwidth = '34' WHERE name LIKE 'c4a-%-48%'; 18 | UPDATE instances SET bandwidth = '45' WHERE name LIKE 'c4a-%-64%'; 19 | UPDATE instances SET bandwidth = '50' WHERE name LIKE 'c4a-%-72%'; 20 | 21 | UPDATE instances SET tier1 = '50' WHERE name LIKE 'c4a-%-32%'; 22 | UPDATE instances SET tier1 = '50' WHERE name LIKE 'c4a-%-48%'; 23 | UPDATE instances SET tier1 = '75' WHERE name LIKE 'c4a-%-64%'; 24 | UPDATE instances SET tier1 = '100' WHERE name LIKE 'c4a-%-72%'; 25 | 26 | UPDATE instances SET localSsd = '1' WHERE name LIKE 'c4a-%-lssd'; -------------------------------------------------------------------------------- /instances/series/c4d.sql: -------------------------------------------------------------------------------- 1 | /* C4D General-purpose */ 2 | /* https://cloud.google.com/compute/docs/general-purpose-machines#c4d_machine_types */ 3 | UPDATE instances SET 4 | series = 'c4d', 5 | family = 'General-purpose', 6 | cpuPlatform = 'Turin', 7 | localSsd = '0', 8 | sud = '0', 9 | spot = '1' 10 | WHERE name LIKE 'c4d-%'; 11 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 'c4d-%-2%'; 12 | UPDATE instances SET bandwidth = '20' WHERE name LIKE 'c4d-%-4%'; 13 | UPDATE instances SET bandwidth = '20' WHERE name LIKE 'c4d-%-8%'; 14 | UPDATE instances SET bandwidth = '20' WHERE name LIKE 'c4d-%-16%'; 15 | UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c4d-%-32%'; 16 | UPDATE instances SET bandwidth = '34' WHERE name LIKE 'c4d-%-48%'; 17 | UPDATE instances SET bandwidth = '45' WHERE name LIKE 'c4d-%-64%'; 18 | UPDATE instances SET bandwidth = '67' WHERE name LIKE 'c4d-%-96%'; 19 | UPDATE instances SET bandwidth = '100' WHERE name LIKE 'c4d-%-192%'; 20 | UPDATE instances SET bandwidth = '100' WHERE name LIKE 'c4d-%-384%'; 21 | 22 | UPDATE instances SET tier1 = '50' WHERE name LIKE 'c4d-%-48%'; 23 | UPDATE instances SET tier1 = '75' WHERE name LIKE 'c4d-%-64%'; 24 | UPDATE instances SET tier1 = '100' WHERE name LIKE 'c4d-%-96%'; 25 | UPDATE instances SET tier1 = '150' WHERE name LIKE 'c4d-%-192%'; 26 | UPDATE instances SET tier1 = '200' WHERE name LIKE 'c4d-%-384%'; 27 | 28 | UPDATE instances SET localSsd = '1' WHERE name LIKE 'c4d-%-lssd'; -------------------------------------------------------------------------------- /instances/series/cpu/README.md: -------------------------------------------------------------------------------- 1 | # CPU Platforms 2 | 3 | * Google documentation: 4 | * Wikipedia 5 | * Intel: 6 | * AMD: 7 | * AMPERE: 8 | * WikiChip 9 | * Intel: 10 | * AMD: 11 | * AMPERE: 12 | 13 | Performance benchmarks are created with [PerfKitBenchmarker](https://github.com/GoogleCloudPlatform/PerfKitBenchmarker) on Compute Engine VM instances. 14 | 15 | * Google documentation: 16 | * Wikipedia: 17 | 18 | More help with resource mappings from on-premises hardware to Google Cloud: 19 | 20 | ## Coremark Benchmark 21 | 22 | Copy benchmarks from website and paste as unformatted text (Crtl+Shift+V) to spreadsheet (`coremark.ods`) and export as CSV (`coremark.csv`). 23 | 24 | Run `coremark.pl` to convert CSV to SQL: 25 | ```shell 26 | perl coremark.pl > coremark.sql 27 | ``` 28 | 29 | ## Intel 30 | 31 | Intel Xeon processor family 32 | 33 | ### Sandy Bridge 34 | 35 | * Code named: Sandy Bridge-EP (E5-46xx) 36 | * Release date: 2012 37 | 38 | ### Ivy Bridge 39 | 40 | * Code named: Ivy Bridge-EP (E5-46xx v2) 41 | * Release date: 2014 42 | 43 | ### Haswell 44 | 45 | * Code name: Haswell-EP (E5-46xx v3) 46 | * Release date: 2015 47 | 48 | ### Broadwell 49 | 50 | * Code name: Broadwell (E3/E5-1xxx/E5-2xxx v4) 51 | * Release date: 2015 52 | 53 | ### Skylake 54 | 55 | * Code name: Skylake-SP 56 | * Release date: 2017 57 | 58 | ### Cascade Lake 59 | 60 | * Code name: Cascade Lake-SP 61 | * Release date: 2019 62 | 63 | ### Ice Lake 64 | 65 | * Code name: Ice Lake-SP 66 | * Release date: 2021 67 | 68 | ### Sapphire Rapids 69 | 70 | * Code name: Sapphire Rapids 71 | * Release date: 2023 72 | 73 | ### Emerald Rapids 74 | 75 | * Code name: Emerald Rapids 76 | * Release date: 2023 77 | * [Wikipedia](https://en.wikipedia.org/wiki/Emerald_Rapids) 78 | 79 | ### Granite Rapids 80 | 81 | * Code name: Granite Rapids 82 | * Release date: 2024 83 | * [Wikipedia](https://en.wikipedia.org/wiki/Granite_Rapids) 84 | 85 | ## AMD 86 | 87 | AMD Zen based Epyc microarchitecture 88 | 89 | ### Rome 90 | 91 | * Generation 2nd 92 | * Release date: 2019 93 | 94 | ### Milan 95 | 96 | * Generation 3rd 97 | * Release date: 2021 98 | 99 | ### Milan X 100 | 101 | * Generation 3rd 102 | * Release date: 2022 103 | 104 | ### Genoa 105 | 106 | * Generation 4rd 107 | * Release date: 2022 108 | 109 | ## Arm 110 | 111 | ### Ampere Altra 112 | 113 | 114 | 115 | * SKU: Q64-30 116 | * Cores: 64 117 | * Frequency: 3.0 GHz 118 | * TDP: 180 W 119 | * Release date: 2020 -------------------------------------------------------------------------------- /instances/series/cpu/coremark.ods: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Cyclenerd/google-cloud-compute-machine-types/22f96a93090f01ac486861d918802d7a1d2821e9/instances/series/cpu/coremark.ods -------------------------------------------------------------------------------- /instances/series/cpu/coremark.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # Copyright 2022 Nils Knieling. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | use strict; 18 | use DBI; 19 | 20 | my $dbh = DBI->connect("dbi:CSV:", undef, undef, { 21 | f_ext => ".csv/r", 22 | csv_sep_char => ";", 23 | csv_class => "Text::CSV_XS", 24 | RaiseError => 1, 25 | }) or die "ERROR: Cannot connect $DBI::errstr\n"; 26 | 27 | my $sth = $dbh->prepare("SELECT MACHINE_TYPE, COREMARK_SCORE, STANDARD_DEVIATION, SAMPLE_COUNT FROM coremark"); 28 | $sth->execute(); 29 | $sth->bind_columns(\my ($name, $coremarkScore, $standardDeviation, $sampleCount)); 30 | print "/*\n"; 31 | print " * GENERATED WITH coremark.pl\n"; 32 | print " * Please see: https://github.com/Cyclenerd/google-cloud-compute-machine-types/blob/master/instances/series/cpu/README.md\n"; 33 | print " */\n"; 34 | while ($sth->fetch) { 35 | if ($name) { 36 | $name =~ s/^\s//; 37 | $name =~ s/\s$//; 38 | $coremarkScore =~ s/,//g; 39 | $coremarkScore =~ s/\s//g; 40 | $sampleCount =~ s/,//g; 41 | $sampleCount =~ s/\s//g; 42 | print "UPDATE instances SET coremarkScore = '$coremarkScore', standardDeviation = '$standardDeviation', sampleCount = '$sampleCount' WHERE name LIKE '$name';\n"; 43 | } 44 | } 45 | $dbh->disconnect; -------------------------------------------------------------------------------- /instances/series/cpu/frequency.sql: -------------------------------------------------------------------------------- 1 | /* Intel */ 2 | /* https://cloud.google.com/compute/docs/cpu-platforms#intel_processors */ 3 | 4 | /* Intel Xeon E5 (Sandy Bridge) */ 5 | UPDATE instances SET cpuBaseClock = '2.6', cpuTurboClock = '3.2', cpuSingleMaxTurboClock = '3.6' WHERE availableCpuPlatform LIKE "%Sandy%" AND series LIKE "n1"; 6 | 7 | /* Intel Xeon E5 v2 (Ivy Bridge) */ 8 | UPDATE instances SET cpuBaseClock = '2.5', cpuTurboClock = '3.1', cpuSingleMaxTurboClock = '3.5' WHERE availableCpuPlatform LIKE "%Ivy%" AND series LIKE "n1"; 9 | 10 | /* Intel Xeon E5 v3 (Haswell) */ 11 | UPDATE instances SET cpuBaseClock = '2.3', cpuTurboClock = '2.8', cpuSingleMaxTurboClock = '3.8' WHERE availableCpuPlatform LIKE "%Haswell%" AND series LIKE "n1"; 12 | 13 | /* Intel Xeon E5 (Broadwell E5) */ 14 | UPDATE instances SET cpuBaseClock = '2.2', cpuTurboClock = '2.8', cpuSingleMaxTurboClock = '3.7' WHERE availableCpuPlatform LIKE "%Broadwell%" AND series LIKE "n1"; 15 | UPDATE instances SET cpuBaseClock = '2.2', cpuTurboClock = '2.8', cpuSingleMaxTurboClock = '3.7' WHERE availableCpuPlatform LIKE "%Broadwell%" AND series LIKE "e2"; 16 | 17 | /* Intel Xeon E7 (Broadwell E7) */ 18 | UPDATE instances SET cpuBaseClock = '2.2', cpuTurboClock = '2.6', cpuSingleMaxTurboClock = '3.3' WHERE availableCpuPlatform LIKE "%Broadwell%" AND series LIKE "m1"; 19 | 20 | /* Intel Xeon Scalable Processor (Skylake) 1st Generation */ 21 | UPDATE instances SET cpuBaseClock = '2.0', cpuTurboClock = '2.7', cpuSingleMaxTurboClock = '3.5' WHERE availableCpuPlatform LIKE "%Skylake%" AND series LIKE "n1"; 22 | UPDATE instances SET cpuBaseClock = '2.0', cpuTurboClock = '2.7', cpuSingleMaxTurboClock = '3.5' WHERE availableCpuPlatform LIKE "%Skylake%" AND series LIKE "e2"; 23 | UPDATE instances SET cpuBaseClock = '2.0', cpuTurboClock = '2.7', cpuSingleMaxTurboClock = '3.5' WHERE availableCpuPlatform LIKE "%Skylake%" AND series LIKE "m1"; 24 | 25 | /* Intel Xeon Scalable Processor (Cascade Lake) 2nd Generation */ 26 | UPDATE instances SET cpuBaseClock = '2.8', cpuTurboClock = '3.4', cpuSingleMaxTurboClock = '3.9' WHERE availableCpuPlatform LIKE "%Cascade Lake%" AND series LIKE "n2"; 27 | UPDATE instances SET cpuBaseClock = '3.1', cpuTurboClock = '3.8', cpuSingleMaxTurboClock = '3.9' WHERE availableCpuPlatform LIKE "%Cascade Lake%" AND series LIKE "c2"; 28 | UPDATE instances SET cpuBaseClock = '2.5', cpuTurboClock = '3.4', cpuSingleMaxTurboClock = '4.0' WHERE availableCpuPlatform LIKE "%Cascade Lake%" AND series LIKE "m2"; 29 | UPDATE instances SET cpuBaseClock = '2.2', cpuTurboClock = '2.9', cpuSingleMaxTurboClock = '3.7' WHERE availableCpuPlatform LIKE "%Cascade Lake%" AND series LIKE "a2"; 30 | UPDATE instances SET cpuBaseClock = '2.2', cpuTurboClock = '2.9', cpuSingleMaxTurboClock = '3.7' WHERE availableCpuPlatform LIKE "%Cascade Lake%" AND series LIKE "g2"; 31 | 32 | /* Intel Xeon Scalable Processor (Ice Lake) 3rd Generation */ 33 | UPDATE instances SET cpuBaseClock = '2.6', cpuTurboClock = '3.4', cpuSingleMaxTurboClock = '3.5' WHERE availableCpuPlatform LIKE "%Ice Lake%" AND series LIKE "n2"; 34 | UPDATE instances SET cpuBaseClock = '3.1', cpuTurboClock = '3.8', cpuSingleMaxTurboClock = '3.9' WHERE availableCpuPlatform LIKE "%Ice Lake%" AND series LIKE "c2"; 35 | UPDATE instances SET cpuBaseClock = '2.6', cpuTurboClock = '3.4', cpuSingleMaxTurboClock = '3.5' WHERE availableCpuPlatform LIKE "%Ice Lake%" AND series LIKE "m3"; 36 | 37 | /* Intel Xeon Scalable Processor (Sapphire Rapids) 4rd Generation */ 38 | UPDATE instances SET cpuBaseClock = '1.9', cpuTurboClock = '3.0', cpuSingleMaxTurboClock = '3.3' WHERE availableCpuPlatform LIKE "%Sapphire Rapids%" AND series LIKE "a3"; 39 | UPDATE instances SET cpuBaseClock = '1.9', cpuTurboClock = '3.0', cpuSingleMaxTurboClock = '3.3' WHERE availableCpuPlatform LIKE "%Sapphire Rapids%" AND series LIKE "c3"; 40 | UPDATE instances SET cpuBaseClock = '1.9', cpuTurboClock = '3.0', cpuSingleMaxTurboClock = '3.3' WHERE availableCpuPlatform LIKE "%Sapphire Rapids%" AND series LIKE "h3"; 41 | UPDATE instances SET cpuBaseClock = '1.9', cpuTurboClock = '3.0', cpuSingleMaxTurboClock = '3.3' WHERE availableCpuPlatform LIKE "%Sapphire Rapids%" AND series LIKE "z3"; 42 | 43 | /* Intel Xeon Scalable Processor (Emerald Rapids) 5th Generation */ 44 | UPDATE instances SET cpuBaseClock = '2.3', cpuTurboClock = '3.1', cpuSingleMaxTurboClock = '4.0' WHERE availableCpuPlatform LIKE "%Emerald Rapids%" AND series LIKE "c4"; 45 | UPDATE instances SET cpuBaseClock = '2.1', cpuTurboClock = '2.9', cpuSingleMaxTurboClock = '4.0' WHERE availableCpuPlatform LIKE "%Emerald Rapids%" AND series LIKE "a4"; 46 | UPDATE instances SET cpuBaseClock = '2.1', cpuTurboClock = '2.9', cpuSingleMaxTurboClock = '4.0' WHERE availableCpuPlatform LIKE "%Emerald Rapids%" AND series LIKE "m4"; 47 | UPDATE instances SET cpuBaseClock = '2.1', cpuTurboClock = '2.9', cpuSingleMaxTurboClock = '3.3' WHERE availableCpuPlatform LIKE "%Emerald Rapids%" AND series LIKE "n4"; 48 | 49 | /* Intel Xeon Scalable Processor (Granite Rapids) 6th Generation */ 50 | UPDATE instances SET cpuBaseClock = '2.8', cpuTurboClock = '3.9', cpuSingleMaxTurboClock = '4.2' WHERE availableCpuPlatform LIKE "%Granite Rapids%" AND series LIKE "c4"; 51 | 52 | /* AMD */ 53 | /* https://cloud.google.com/compute/docs/cpu-platforms#amd_processors */ 54 | 55 | /* AMD EPYC Rome 2nd Generation */ 56 | UPDATE instances SET cpuBaseClock = '2.25', cpuTurboClock = '2.7', cpuSingleMaxTurboClock = '3.3' WHERE availableCpuPlatform LIKE "%Rome%"; 57 | 58 | /* AMD EPYC Milan 3rd Generation */ 59 | UPDATE instances SET cpuBaseClock = '2.45', cpuTurboClock = '2.8', cpuSingleMaxTurboClock = '3.5' WHERE availableCpuPlatform LIKE "%Milan%"; 60 | 61 | /* AMD EPYC Genoa 4rd Generation */ 62 | UPDATE instances SET cpuBaseClock = '2.6', cpuTurboClock = '3.45', cpuSingleMaxTurboClock = '3.7' WHERE availableCpuPlatform LIKE "%Genoa%"; 63 | 64 | /* AMD EPYC Turin 5th Generation */ 65 | UPDATE instances SET cpuBaseClock = '2.7', cpuTurboClock = '3.5', cpuSingleMaxTurboClock = '4.1' WHERE availableCpuPlatform LIKE "%Turin%"; 66 | 67 | 68 | /* Arm */ 69 | /* https://cloud.google.com/compute/docs/cpu-platforms#arm_processors */ 70 | 71 | /* Ampere Altra Q64-30 */ 72 | /* https://amperecomputing.com/briefs/ampere-altra-family-product-brief */ 73 | UPDATE instances SET cpuBaseClock = '3.0', cpuTurboClock = '3.0', cpuSingleMaxTurboClock = '3.0' WHERE availableCpuPlatform LIKE "%Ampere Altra%"; 74 | 75 | /* Google Axion Processors */ 76 | /* https://gist.github.com/Cyclenerd/57ffee632dcb3d7e537fbcdc9779cb50 */ 77 | UPDATE instances SET cpuBaseClock = '3.0', cpuTurboClock = '3.0', cpuSingleMaxTurboClock = '3.0' WHERE availableCpuPlatform LIKE "%Google Axion%"; 78 | -------------------------------------------------------------------------------- /instances/series/e2.sql: -------------------------------------------------------------------------------- 1 | /* E2 General-purpose */ 2 | /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ 3 | /* https://cloud.google.com/compute/docs/general-purpose-machines#e2_machine_types */ 4 | UPDATE instances SET 5 | series = 'e2', 6 | family = 'General-purpose', 7 | cpuPlatform = 'Skylake, Broadwell, Haswell, Rome', 8 | spot = '1' 9 | WHERE name LIKE 'e2-%'; 10 | UPDATE instances SET bandwidth = '4' WHERE name LIKE 'e2-%-2'; 11 | UPDATE instances SET bandwidth = '8' WHERE name LIKE 'e2-%-4'; 12 | UPDATE instances SET bandwidth = '16' WHERE name LIKE 'e2-%-8'; 13 | UPDATE instances SET bandwidth = '16' WHERE name LIKE 'e2-%-16'; 14 | UPDATE instances SET bandwidth = '16' WHERE name LIKE 'e2-%-32'; 15 | 16 | /* E2 shared-core */ 17 | /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ 18 | /* https://cloud.google.com/compute/docs/general-purpose-machines#e2_machine_types */ 19 | UPDATE instances SET bandwidth = '1' WHERE name LIKE 'e2-micro'; 20 | UPDATE instances SET bandwidth = '2' WHERE name LIKE 'e2-small'; 21 | UPDATE instances SET bandwidth = '2' WHERE name LIKE 'e2-medium'; -------------------------------------------------------------------------------- /instances/series/g2.sql: -------------------------------------------------------------------------------- 1 | /* G2 Accelerator-optimized machines */ 2 | /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ 3 | /* https://cloud.google.com/compute/docs/accelerator-optimized-machines#g2-vms */ 4 | UPDATE instances SET 5 | series = 'g2', 6 | family = 'Accelerator-optimized', 7 | cpuPlatform = 'Cascade Lake', 8 | localSsd = '1', 9 | spot = '1' 10 | WHERE name LIKE 'g2-%'; 11 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 'g2-standard-4'; 12 | UPDATE instances SET bandwidth = '16' WHERE name LIKE 'g2-standard-8'; 13 | UPDATE instances SET bandwidth = '16' WHERE name LIKE 'g2-standard-12'; 14 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 'g2-standard-16'; 15 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 'g2-standard-24'; 16 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 'g2-standard-32'; 17 | UPDATE instances SET bandwidth = '50' WHERE name LIKE 'g2-standard-48'; 18 | UPDATE instances SET bandwidth = '100' WHERE name LIKE 'g2-standard-96'; -------------------------------------------------------------------------------- /instances/series/gpu/gpu_names.sql: -------------------------------------------------------------------------------- 1 | /* 2 | * Replace graphics processing units (GPUs) type names 3 | * https://cloud.google.com/compute/docs/gpus#gpus-list 4 | */ 5 | 6 | UPDATE instances SET acceleratorType = "NVIDIA L4 vWS" WHERE acceleratorType LIKE "nvidia-l4-vws"; 7 | UPDATE instances SET acceleratorType = "NVIDIA L4" WHERE acceleratorType LIKE "nvidia-l4"; 8 | 9 | UPDATE instances SET acceleratorType = "NVIDIA A100 40GB" WHERE acceleratorType LIKE "nvidia-tesla-a100"; 10 | UPDATE instances SET acceleratorType = "NVIDIA A100 80GB" WHERE acceleratorType LIKE "nvidia-a100-80gb"; 11 | 12 | UPDATE instances SET acceleratorType = "NVIDIA T4 vWS" WHERE acceleratorType LIKE "nvidia-tesla-t4-vws"; 13 | UPDATE instances SET acceleratorType = "NVIDIA T4" WHERE acceleratorType LIKE "nvidia-tesla-t4"; 14 | 15 | UPDATE instances SET acceleratorType = "NVIDIA P4 vWS" WHERE acceleratorType LIKE "nvidia-tesla-p4-vws"; 16 | UPDATE instances SET acceleratorType = "NVIDIA P4" WHERE acceleratorType LIKE "nvidia-tesla-p4"; 17 | 18 | UPDATE instances SET acceleratorType = "NVIDIA V100" WHERE acceleratorType LIKE "nvidia-tesla-v100"; 19 | 20 | UPDATE instances SET acceleratorType = "NVIDIA P100 vWS" WHERE acceleratorType LIKE "nvidia-tesla-p100-vws"; 21 | UPDATE instances SET acceleratorType = "NVIDIA P100" WHERE acceleratorType LIKE "nvidia-tesla-p100"; 22 | 23 | UPDATE instances SET acceleratorType = "NVIDIA H100 80GB" WHERE acceleratorType LIKE "nvidia-h100-80gb"; 24 | UPDATE instances SET acceleratorType = "NVIDIA H100 80GB Mega" WHERE acceleratorType LIKE "nvidia-h100-mega-80gb"; 25 | 26 | UPDATE instances SET acceleratorType = "NVIDIA K80 (EOL!)" WHERE acceleratorType LIKE "nvidia-tesla-k80"; 27 | -------------------------------------------------------------------------------- /instances/series/h3.sql: -------------------------------------------------------------------------------- 1 | /* H3 Compute-optimized */ 2 | /* https://cloud.google.com/compute/docs/compute-optimized-machines#h3_series */ 3 | UPDATE instances SET 4 | series = 'h3', 5 | family = 'Compute-optimized', 6 | cpuPlatform = 'Sapphire Rapids', 7 | localSsd = '0', 8 | bandwidth = '200', 9 | spot = '0' 10 | WHERE name LIKE 'h3-%'; -------------------------------------------------------------------------------- /instances/series/m1.sql: -------------------------------------------------------------------------------- 1 | /* M1 Memory-optimized megamem */ 2 | /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ 3 | /* https://cloud.google.com/compute/docs/memory-optimized-machines#m1_machine_types */ 4 | UPDATE instances SET 5 | series = 'm1', 6 | family = 'Memory-optimized', 7 | cpuPlatform = 'Skylake', 8 | localSsd = '1', 9 | bandwidth = '32', 10 | sud = '1', 11 | spot = '1' 12 | WHERE name LIKE 'm1-megamem-%'; 13 | 14 | /* M1 Memory-optimized ultramem */ 15 | /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ 16 | /* https://cloud.google.com/compute/docs/memory-optimized-machines#m1_machine_types */ 17 | UPDATE instances SET 18 | series = 'm1', 19 | family = 'Memory-optimized', 20 | cpuPlatform = 'Broadwell', 21 | bandwidth = '32', 22 | sud = '1', 23 | spot = '1' 24 | WHERE name LIKE 'm1-ultramem-%'; -------------------------------------------------------------------------------- /instances/series/m2.sql: -------------------------------------------------------------------------------- 1 | /* M2 Memory-optimized ultramem */ 2 | /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ 3 | /* https://cloud.google.com/compute/docs/memory-optimized-machines#m2_machine_types */ 4 | UPDATE instances SET 5 | series = 'm2', 6 | family = 'Memory-optimized', 7 | cpuPlatform = 'Cascade Lake', 8 | bandwidth = '32', 9 | sud = '1' 10 | WHERE name LIKE 'm2-%'; -------------------------------------------------------------------------------- /instances/series/m3.sql: -------------------------------------------------------------------------------- 1 | /* M3 Memory-optimized */ 2 | /* https://cloud.google.com/compute/docs/memory-optimized-machines#m3_machine_types */ 3 | UPDATE instances SET 4 | series = 'm3', 5 | family = 'Memory-optimized', 6 | cpuPlatform = 'Ice Lake', 7 | localSsd = '1', 8 | bandwidth = '32', 9 | sud = '0', 10 | spot = '1' 11 | WHERE name LIKE 'm3-%'; 12 | UPDATE instances SET tier1 = '50' WHERE name LIKE 'm3-%-64'; 13 | UPDATE instances SET tier1 = '100' WHERE name LIKE 'm3-%-128'; -------------------------------------------------------------------------------- /instances/series/m4.sql: -------------------------------------------------------------------------------- 1 | /* M3 Memory-optimized */ 2 | /* https://cloud.google.com/compute/docs/memory-optimized-machines#m4_series */ 3 | UPDATE instances SET 4 | series = 'm4', 5 | family = 'Memory-optimized', 6 | cpuPlatform = 'Emerald Rapids', 7 | localSsd = '0', 8 | bandwidth = '32', 9 | tier1 = '50', 10 | sud = '0', 11 | spot = '0' 12 | WHERE name LIKE 'm4-%'; 13 | UPDATE instances SET bandwidth = '32', tier1 = '50' WHERE name LIKE 'm4-%-56'; 14 | UPDATE instances SET bandwidth = '50', tier1 = '100' WHERE name LIKE 'm4-%-112'; 15 | UPDATE instances SET bandwidth = '100', tier1 = '200' WHERE name LIKE 'm4-%-224'; 16 | 17 | -------------------------------------------------------------------------------- /instances/series/n1.sql: -------------------------------------------------------------------------------- 1 | /* N1 General-purpose */ 2 | /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ 3 | /* https://cloud.google.com/compute/docs/general-purpose-machines#n1_machines */ 4 | UPDATE instances SET 5 | series = 'n1', 6 | family = 'General-purpose', 7 | cpuPlatform = 'Skylake, Broadwell, Haswell, Sandy Bridge, Ivy Bridge', 8 | localSsd = '1', 9 | sud = '1', 10 | spot = '1' 11 | WHERE name LIKE 'n1-%'; 12 | UPDATE instances SET bandwidth = '2' WHERE name LIKE 'n1-%-1'; 13 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n1-%-2'; 14 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n1-%-4'; 15 | UPDATE instances SET bandwidth = '16' WHERE name LIKE 'n1-%-8'; 16 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n1-%-16'; 17 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n1-%-32'; 18 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n1-%-64'; 19 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n1-%-96'; 20 | 21 | /* N1 shared-core */ 22 | /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ 23 | /* https://cloud.google.com/compute/docs/general-purpose-machines#n1_machines */ 24 | UPDATE instances SET 25 | series = 'n1', 26 | family = 'General-purpose', 27 | cpuPlatform = 'Skylake, Broadwell, Haswell, Sandy Bridge, Ivy Bridge', 28 | bandwidth = '1', 29 | sud = '1', 30 | spot = '1' 31 | WHERE name LIKE 'g1-%' OR name LIKE 'f1-%'; -------------------------------------------------------------------------------- /instances/series/n2.sql: -------------------------------------------------------------------------------- 1 | /* N2 General-purpose */ 2 | /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ 3 | /* https://cloud.google.com/compute/docs/general-purpose-machines#n2_machines */ 4 | UPDATE instances SET 5 | series = 'n2', 6 | family = 'General-purpose', 7 | cpuPlatform = 'Cascade Lake, Ice Lake', 8 | localSsd = '1', 9 | sud = '1', 10 | spot = '1' 11 | WHERE name LIKE 'n2-%'; 12 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n2-%-2'; 13 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n2-%-4'; 14 | UPDATE instances SET bandwidth = '16' WHERE name LIKE 'n2-%-8'; 15 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n2-%-16'; 16 | UPDATE instances SET bandwidth = '32', tier1 = '50' WHERE name LIKE 'n2-%-32'; 17 | UPDATE instances SET bandwidth = '32', tier1 = '50' WHERE name LIKE 'n2-%-48'; 18 | UPDATE instances SET bandwidth = '32', tier1 = '75' WHERE name LIKE 'n2-%-64'; 19 | UPDATE instances SET bandwidth = '32', tier1 = '100' WHERE name LIKE 'n2-%-80'; 20 | UPDATE instances SET bandwidth = '32', tier1 = '100' WHERE name LIKE 'n2-%-96'; 21 | UPDATE instances SET bandwidth = '32', tier1 = '100' WHERE name LIKE 'n2-%-128'; -------------------------------------------------------------------------------- /instances/series/n2d.sql: -------------------------------------------------------------------------------- 1 | /* N2D General-purpose */ 2 | /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ 3 | /* https://cloud.google.com/compute/docs/general-purpose-machines#n2d_machines */ 4 | UPDATE instances SET 5 | series = 'n2d', 6 | family = 'General-purpose', 7 | cpuPlatform = 'Rome, Milan', 8 | localSsd = '1', 9 | sud = '1', 10 | spot = '1' 11 | WHERE name LIKE 'n2d-%'; 12 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n2d-%-2'; 13 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n2d-%-4'; 14 | UPDATE instances SET bandwidth = '16' WHERE name LIKE 'n2d-%-8'; 15 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n2d-%-16'; 16 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n2d-%-32'; 17 | UPDATE instances SET bandwidth = '32', tier1 = '50' WHERE name LIKE 'n2d-%-48'; 18 | UPDATE instances SET bandwidth = '32', tier1 = '50' WHERE name LIKE 'n2d-%-64'; 19 | UPDATE instances SET bandwidth = '32', tier1 = '50' WHERE name LIKE 'n2d-%-80'; 20 | UPDATE instances SET bandwidth = '32', tier1 = '100' WHERE name LIKE 'n2d-%-96'; 21 | UPDATE instances SET bandwidth = '32', tier1 = '100' WHERE name LIKE 'n2d-%-128'; 22 | UPDATE instances SET bandwidth = '32', tier1 = '100' WHERE name LIKE 'n2d-%-224'; -------------------------------------------------------------------------------- /instances/series/n4.sql: -------------------------------------------------------------------------------- 1 | /* N4 General-purpose */ 2 | /* https://cloud.google.com/compute/docs/general-purpose-machines#n4_series */ 3 | UPDATE instances SET 4 | series = 'n4', 5 | family = 'General-purpose', 6 | cpuPlatform = 'Emerald Rapids', 7 | localSsd = '0', 8 | sud = '0', 9 | spot = '1' 10 | WHERE name LIKE 'n4-%'; 11 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n4-%-2'; 12 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n4-%-4'; 13 | UPDATE instances SET bandwidth = '16' WHERE name LIKE 'n4-%-8'; 14 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n4-%-16'; 15 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n4-%-32'; 16 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n4-%-48'; 17 | UPDATE instances SET bandwidth = '45' WHERE name LIKE 'n4-%-64'; 18 | UPDATE instances SET bandwidth = '50' WHERE name LIKE 'n4-%-80'; 19 | -------------------------------------------------------------------------------- /instances/series/sap/hana.sql: -------------------------------------------------------------------------------- 1 | /* SAP HANA certified machine types */ 2 | /* https://cloud.google.com/solutions/sap/docs/certifications-sap-hana#hana-cert-table-vms */ 3 | 4 | UPDATE instances SET hana = '1' WHERE name LIKE 'c3-highmem-88'; 5 | UPDATE instances SET hana = '1' WHERE name LIKE 'c3-standard-44'; 6 | UPDATE instances SET hana = '1' WHERE name LIKE 'c3-highmem-44'; 7 | UPDATE instances SET hana = '1' WHERE name LIKE 'c3-highmem-88'; 8 | UPDATE instances SET hana = '1' WHERE name LIKE 'c3-highmem-176'; 9 | UPDATE instances SET hana = '1' WHERE name LIKE 'c3-highmem-192-metal'; 10 | 11 | UPDATE instances SET hana = '1' WHERE name LIKE 'c4-highmem-32'; 12 | UPDATE instances SET hana = '1' WHERE name LIKE 'c4-highmem-48'; 13 | UPDATE instances SET hana = '1' WHERE name LIKE 'c4-highmem-96'; 14 | UPDATE instances SET hana = '1' WHERE name LIKE 'c4-highmem-192'; 15 | 16 | UPDATE instances SET hana = '1' WHERE name LIKE 'n1-highmem-32'; 17 | UPDATE instances SET hana = '1' WHERE name LIKE 'n1-highmem-64'; 18 | UPDATE instances SET hana = '1' WHERE name LIKE 'n1-highmem-96'; 19 | 20 | UPDATE instances SET hana = '1' WHERE name LIKE 'n2-highmem-32'; 21 | UPDATE instances SET hana = '1' WHERE name LIKE 'n2-highmem-48'; 22 | UPDATE instances SET hana = '1' WHERE name LIKE 'n2-highmem-64'; 23 | UPDATE instances SET hana = '1' WHERE name LIKE 'n2-highmem-80'; 24 | UPDATE instances SET hana = '1' WHERE name LIKE 'n2-highmem-96'; 25 | UPDATE instances SET hana = '1' WHERE name LIKE 'n2-highmem-128'; 26 | 27 | UPDATE instances SET hana = '1' WHERE name LIKE 'm1-%'; 28 | 29 | UPDATE instances SET hana = '1' WHERE name LIKE 'm2-%'; 30 | 31 | UPDATE instances SET hana = '1' WHERE name LIKE 'm3-%'; 32 | 33 | UPDATE instances SET hana = '1' WHERE name LIKE 'm4-%'; -------------------------------------------------------------------------------- /instances/series/t2a.sql: -------------------------------------------------------------------------------- 1 | /* Tau T2A General-purpose */ 2 | /* https://cloud.google.com/compute/docs/general-purpose-machines#t2a_machines */ 3 | UPDATE instances SET 4 | series = 't2a', 5 | family = 'General-purpose', 6 | cpuPlatform = 'Ampere Altra', 7 | spot = '1' 8 | WHERE name LIKE 't2a-%'; 9 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 't2a-%-1'; 10 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 't2a-%-2'; 11 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 't2a-%-4'; 12 | UPDATE instances SET bandwidth = '16' WHERE name LIKE 't2a-%-8'; 13 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 't2a-%-16'; 14 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 't2a-%-32'; 15 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 't2a-%-48'; 16 | -------------------------------------------------------------------------------- /instances/series/t2d.sql: -------------------------------------------------------------------------------- 1 | /* Tau T2D General-purpose */ 2 | /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ 3 | /* https://cloud.google.com/compute/docs/general-purpose-machines#t2d_machines */ 4 | UPDATE instances SET 5 | series = 't2d', 6 | family = 'General-purpose', 7 | cpuPlatform = 'Milan', 8 | spot = '1' 9 | WHERE name LIKE 't2d-%'; 10 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 't2d-%-1'; 11 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 't2d-%-2'; 12 | UPDATE instances SET bandwidth = '10' WHERE name LIKE 't2d-%-4'; 13 | UPDATE instances SET bandwidth = '16' WHERE name LIKE 't2d-%-8'; 14 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 't2d-%-16'; 15 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 't2d-%-32'; 16 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 't2d-%-48'; 17 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 't2d-%-60'; -------------------------------------------------------------------------------- /instances/series/z3.sql: -------------------------------------------------------------------------------- 1 | /* Z3 Storage-optimized */ 2 | /* https://cloud.google.com/compute/docs/storage-optimized-machines */ 3 | UPDATE instances SET 4 | series = 'z3', 5 | family = 'Storage-optimized', 6 | cpuPlatform = 'Sapphire Rapids', 7 | localSsd = '1', 8 | spot = '1' 9 | WHERE name LIKE 'z3-%'; 10 | 11 | UPDATE instances SET bandwidth = '23' WHERE name LIKE 'z3-highmem-8%'; 12 | UPDATE instances SET bandwidth = '23' WHERE name LIKE 'z3-highmem-16%'; 13 | UPDATE instances SET bandwidth = '23' WHERE name LIKE 'z3-highmem-22%'; 14 | UPDATE instances SET bandwidth = '32' WHERE name LIKE 'z3-highmem-32%'; 15 | UPDATE instances SET bandwidth = '32', tier1 = '50' WHERE name LIKE 'z3-highmem-44%'; 16 | UPDATE instances SET bandwidth = '62', tier1 = '100' WHERE name LIKE 'z3-highmem-88%'; 17 | UPDATE instances SET bandwidth = '100', tier1 = '200' WHERE name LIKE 'z3-highmem-176%'; 18 | UPDATE instances SET bandwidth = '100', tier1 = '200' WHERE name LIKE 'z3-highmem-192%'; 19 | 20 | UPDATE instances SET localSsd = '3000' WHERE name LIKE 'z3-highmem-14-standardlssd'; 21 | UPDATE instances SET localSsd = '6000' WHERE name LIKE 'z3-highmem-22-standardlssd'; 22 | UPDATE instances SET localSsd = '9000' WHERE name LIKE 'z3-highmem-44-standardlssd'; 23 | UPDATE instances SET localSsd = '18000' WHERE name LIKE 'z3-highmem-88-standardlssd'; 24 | UPDATE instances SET localSsd = '36000' WHERE name LIKE 'z3-highmem-176-standardlssd'; 25 | 26 | UPDATE instances SET localSsd = '3000' WHERE name LIKE 'z3-highmem-8-highlssd'; 27 | UPDATE instances SET localSsd = '6000' WHERE name LIKE 'z3-highmem-16-highlssd'; 28 | UPDATE instances SET localSsd = '9000' WHERE name LIKE 'z3-highmem-22-highlssd'; 29 | UPDATE instances SET localSsd = '12000' WHERE name LIKE 'z3-highmem-32-highlssd'; 30 | UPDATE instances SET localSsd = '18000' WHERE name LIKE 'z3-highmem-44-highlssd'; 31 | UPDATE instances SET localSsd = '36000' WHERE name LIKE 'z3-highmem-88-highlssd'; 32 | UPDATE instances SET localSsd = '72000' WHERE name LIKE 'z3-highmem-192-highlssd-metal'; 33 | 34 | -------------------------------------------------------------------------------- /regions/README.md: -------------------------------------------------------------------------------- 1 | # Google Cloud Regions 2 | 3 | Here you can find the SQL files that add the different information from the Google websites. 4 | The information is in addition to the data of the Google Cloud Compute API. 5 | 6 | Feel free to make changes if something is wrong or you want to expand it. 7 | 8 | The SQL files are read during the [build](../build/) process. 9 | 10 | ## Carbon Data (`carbon.sql`) 11 | 12 | Mirror [carbon data across GCP regions](https://cloud.google.com/sustainability/region-carbon#data) from GitHub repo : 13 | 14 | ```shell 15 | curl -o "carbon.csv" \ 16 | "https://raw.githubusercontent.com/GoogleCloudPlatform/region-carbon-info/main/data/yearly/2022.csv" 17 | ``` 18 | 19 | Run `carbon.pl` to convert CSV to SQL: 20 | ```shell 21 | perl carbon.pl > carbon.sql 22 | ``` 23 | 24 | ## Region Locations (`regions.sql`) 25 | 26 | Add long region location name, latitude and longitude. 27 | 28 | Mirror [regions.json](https://github.com/GoogleCloudPlatform/region-picker/blob/main/data/regions.json) from GitHub repo : 29 | 30 | ```shell 31 | curl -O "https://raw.githubusercontent.com/GoogleCloudPlatform/region-picker/main/data/regions.json" 32 | ``` 33 | 34 | Run `regions.pl` to convert CSV to SQL: 35 | ```shell 36 | perl regions.pl > regions.sql 37 | ``` 38 | 39 | ## Country Codes (`country.sql`) 40 | 41 | Source: 42 | 43 | Add ISO 3166-1 alpha-2 country code to `country.sql`. -------------------------------------------------------------------------------- /regions/carbon.csv: -------------------------------------------------------------------------------- 1 | Google Cloud Region,Location,Google CFE,Grid carbon intensity (gCO2eq / kWh) 2 | africa-south1,Johannesburg,0.16,646 3 | asia-east1,Taiwan,0.18,451 4 | asia-east2,Hong Kong,0.28,360 5 | asia-northeast1,Tokyo,0.16,459 6 | asia-northeast2,Osaka,0.30,385 7 | asia-northeast3,Seoul,0.35,378 8 | asia-south1,Mumbai,0.14,648 9 | asia-south2,Delhi,0.29,529 10 | asia-southeast1,Singapore,0.04,369 11 | asia-southeast2,Jakarta,0.13,580 12 | australia-southeast1,Sydney,0.33,501 13 | australia-southeast2,Melbourne,0.40,456 14 | europe-central2,Warsaw,0.31,723 15 | europe-north1,Finland,0.98,46 16 | europe-southwest1,Madrid,0.76,131 17 | europe-west1,Belgium,0.82,122 18 | europe-west2,London,0.92,136 19 | europe-west3,Frankfurt,0.90,345 20 | europe-west4,Netherlands,0.80,236 21 | europe-west6,Zurich,0.92,59 22 | europe-west8,Milan,0.52,249 23 | europe-west9,Paris,0.94,34 24 | europe-west10,Berlin,0.90,345 25 | europe-west12,Turin,0.52,249 26 | me-central1,Doha,0.00,575 27 | me-central2,Dammam,0.00,569 28 | me-west1,Tel Aviv,0.05,463 29 | northamerica-northeast1,Montréal,1.00,2 30 | northamerica-northeast2,Toronto,0.87,47 31 | southamerica-east1,Sāo Paulo,0.90,56 32 | southamerica-west1,Santiago,0.91,138 33 | us-central1,Iowa,0.95,430 34 | us-east1,South Carolina,0.29,560 35 | us-east5,Columbus,0.52,322 36 | us-east4,Northern Virginia,0.52,322 37 | us-south1,Dallas,0.79,321 38 | us-west1,Oregon,0.84,94 39 | us-west2,Los Angeles,0.55,198 40 | us-west3,Salt Lake City,0.29,588 41 | us-west4,Las Vegas,0.26,373 -------------------------------------------------------------------------------- /regions/carbon.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # Copyright 2022-2024 Nils Knieling. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | use strict; 18 | use DBI; 19 | 20 | my $dbh = DBI->connect("dbi:CSV:", undef, undef, { 21 | f_ext => ".csv/r", 22 | csv_sep_char => ",", 23 | csv_class => "Text::CSV_XS", 24 | RaiseError => 1, 25 | }) or die "ERROR: Cannot connect $DBI::errstr\n"; 26 | 27 | # CSV col names: 28 | # Google Cloud Region, 29 | # Location, 30 | # Google CFE, 31 | # Grid carbon intensity (gCO2eq / kWh) 32 | my $sth = $dbh->prepare("SELECT * FROM carbon"); 33 | $sth->execute(); 34 | $sth->bind_columns(\my ($region, $location, $cfe, $co2_kwh)); 35 | print "/*\n"; 36 | print " * GENERATED WITH carbon.pl\n"; 37 | print " * Please see: https://github.com/Cyclenerd/google-cloud-compute-machine-types/blob/master/regions/README.md\n"; 38 | print " */\n"; 39 | while ($sth->fetch) { 40 | if ($region) { 41 | # Google Cloud Region 42 | $region =~ s/\s//; 43 | # Google CFE% 44 | if ($cfe =~ /^([0,1]\.\d{2}$)/) { 45 | $cfe = $1 * 100; 46 | } else { 47 | $cfe = ""; 48 | } 49 | # Grid carbon intensity (gCO2eq/kWh) 50 | if ($co2_kwh =~ /^(\d+)$/) { 51 | $co2_kwh = $1; 52 | } else { 53 | $co2_kwh = ""; 54 | } 55 | # For a location to be considered "low carbon", 56 | # it must belong to a region with a Google CFE% of at least 75%, 57 | my $low_co2 = "0"; 58 | if ($cfe >= "75") { 59 | $low_co2 = "1"; 60 | # or, if CFE% information is not available, 61 | # a grid carbon intensity of maximum 200 gCO2eq/kWh. 62 | } elsif (!$cfe && $co2_kwh <= "200") { 63 | $low_co2 = "1"; 64 | } 65 | print "UPDATE instances SET regionCfe = '$cfe', regionCo2Kwh = '$co2_kwh', regionLowCo2 = '$low_co2' WHERE region LIKE '$region';\n"; 66 | } 67 | } 68 | $dbh->disconnect; -------------------------------------------------------------------------------- /regions/carbon.sql: -------------------------------------------------------------------------------- 1 | /* 2 | * GENERATED WITH carbon.pl 3 | * Please see: https://github.com/Cyclenerd/google-cloud-compute-machine-types/blob/master/regions/README.md 4 | */ 5 | UPDATE instances SET regionCfe = '16', regionCo2Kwh = '646', regionLowCo2 = '0' WHERE region LIKE 'africa-south1'; 6 | UPDATE instances SET regionCfe = '18', regionCo2Kwh = '451', regionLowCo2 = '0' WHERE region LIKE 'asia-east1'; 7 | UPDATE instances SET regionCfe = '28', regionCo2Kwh = '360', regionLowCo2 = '0' WHERE region LIKE 'asia-east2'; 8 | UPDATE instances SET regionCfe = '16', regionCo2Kwh = '459', regionLowCo2 = '0' WHERE region LIKE 'asia-northeast1'; 9 | UPDATE instances SET regionCfe = '30', regionCo2Kwh = '385', regionLowCo2 = '0' WHERE region LIKE 'asia-northeast2'; 10 | UPDATE instances SET regionCfe = '35', regionCo2Kwh = '378', regionLowCo2 = '0' WHERE region LIKE 'asia-northeast3'; 11 | UPDATE instances SET regionCfe = '14', regionCo2Kwh = '648', regionLowCo2 = '0' WHERE region LIKE 'asia-south1'; 12 | UPDATE instances SET regionCfe = '29', regionCo2Kwh = '529', regionLowCo2 = '0' WHERE region LIKE 'asia-south2'; 13 | UPDATE instances SET regionCfe = '4', regionCo2Kwh = '369', regionLowCo2 = '0' WHERE region LIKE 'asia-southeast1'; 14 | UPDATE instances SET regionCfe = '13', regionCo2Kwh = '580', regionLowCo2 = '0' WHERE region LIKE 'asia-southeast2'; 15 | UPDATE instances SET regionCfe = '33', regionCo2Kwh = '501', regionLowCo2 = '0' WHERE region LIKE 'australia-southeast1'; 16 | UPDATE instances SET regionCfe = '40', regionCo2Kwh = '456', regionLowCo2 = '0' WHERE region LIKE 'australia-southeast2'; 17 | UPDATE instances SET regionCfe = '31', regionCo2Kwh = '723', regionLowCo2 = '0' WHERE region LIKE 'europe-central2'; 18 | UPDATE instances SET regionCfe = '98', regionCo2Kwh = '46', regionLowCo2 = '1' WHERE region LIKE 'europe-north1'; 19 | UPDATE instances SET regionCfe = '76', regionCo2Kwh = '131', regionLowCo2 = '1' WHERE region LIKE 'europe-southwest1'; 20 | UPDATE instances SET regionCfe = '82', regionCo2Kwh = '122', regionLowCo2 = '1' WHERE region LIKE 'europe-west1'; 21 | UPDATE instances SET regionCfe = '92', regionCo2Kwh = '136', regionLowCo2 = '1' WHERE region LIKE 'europe-west2'; 22 | UPDATE instances SET regionCfe = '90', regionCo2Kwh = '345', regionLowCo2 = '1' WHERE region LIKE 'europe-west3'; 23 | UPDATE instances SET regionCfe = '80', regionCo2Kwh = '236', regionLowCo2 = '1' WHERE region LIKE 'europe-west4'; 24 | UPDATE instances SET regionCfe = '92', regionCo2Kwh = '59', regionLowCo2 = '1' WHERE region LIKE 'europe-west6'; 25 | UPDATE instances SET regionCfe = '52', regionCo2Kwh = '249', regionLowCo2 = '0' WHERE region LIKE 'europe-west8'; 26 | UPDATE instances SET regionCfe = '94', regionCo2Kwh = '34', regionLowCo2 = '1' WHERE region LIKE 'europe-west9'; 27 | UPDATE instances SET regionCfe = '90', regionCo2Kwh = '345', regionLowCo2 = '1' WHERE region LIKE 'europe-west10'; 28 | UPDATE instances SET regionCfe = '52', regionCo2Kwh = '249', regionLowCo2 = '0' WHERE region LIKE 'europe-west12'; 29 | UPDATE instances SET regionCfe = '0', regionCo2Kwh = '575', regionLowCo2 = '0' WHERE region LIKE 'me-central1'; 30 | UPDATE instances SET regionCfe = '0', regionCo2Kwh = '569', regionLowCo2 = '0' WHERE region LIKE 'me-central2'; 31 | UPDATE instances SET regionCfe = '5', regionCo2Kwh = '463', regionLowCo2 = '0' WHERE region LIKE 'me-west1'; 32 | UPDATE instances SET regionCfe = '100', regionCo2Kwh = '2', regionLowCo2 = '1' WHERE region LIKE 'northamerica-northeast1'; 33 | UPDATE instances SET regionCfe = '87', regionCo2Kwh = '47', regionLowCo2 = '1' WHERE region LIKE 'northamerica-northeast2'; 34 | UPDATE instances SET regionCfe = '90', regionCo2Kwh = '56', regionLowCo2 = '1' WHERE region LIKE 'southamerica-east1'; 35 | UPDATE instances SET regionCfe = '91', regionCo2Kwh = '138', regionLowCo2 = '1' WHERE region LIKE 'southamerica-west1'; 36 | UPDATE instances SET regionCfe = '95', regionCo2Kwh = '430', regionLowCo2 = '1' WHERE region LIKE 'us-central1'; 37 | UPDATE instances SET regionCfe = '29', regionCo2Kwh = '560', regionLowCo2 = '0' WHERE region LIKE 'us-east1'; 38 | UPDATE instances SET regionCfe = '52', regionCo2Kwh = '322', regionLowCo2 = '0' WHERE region LIKE 'us-east5'; 39 | UPDATE instances SET regionCfe = '52', regionCo2Kwh = '322', regionLowCo2 = '0' WHERE region LIKE 'us-east4'; 40 | UPDATE instances SET regionCfe = '79', regionCo2Kwh = '321', regionLowCo2 = '1' WHERE region LIKE 'us-south1'; 41 | UPDATE instances SET regionCfe = '84', regionCo2Kwh = '94', regionLowCo2 = '1' WHERE region LIKE 'us-west1'; 42 | UPDATE instances SET regionCfe = '55', regionCo2Kwh = '198', regionLowCo2 = '0' WHERE region LIKE 'us-west2'; 43 | UPDATE instances SET regionCfe = '29', regionCo2Kwh = '588', regionLowCo2 = '0' WHERE region LIKE 'us-west3'; 44 | UPDATE instances SET regionCfe = '26', regionCo2Kwh = '373', regionLowCo2 = '0' WHERE region LIKE 'us-west4'; 45 | -------------------------------------------------------------------------------- /regions/country.sql: -------------------------------------------------------------------------------- 1 | /* https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 */ 2 | 3 | UPDATE instances SET regionLocationCountryCode = 'AU' WHERE regionLocationLong LIKE '%Australia%'; 4 | UPDATE instances SET regionLocationCountryCode = 'BE' WHERE regionLocationLong LIKE '%Belgium%'; 5 | UPDATE instances SET regionLocationCountryCode = 'BR' WHERE regionLocationLong LIKE '%Brazil%'; 6 | UPDATE instances SET regionLocationCountryCode = 'CA' WHERE regionLocationLong LIKE '%Canada%'; 7 | UPDATE instances SET regionLocationCountryCode = 'CH' WHERE regionLocationLong LIKE '%Switzerland%'; 8 | UPDATE instances SET regionLocationCountryCode = 'CL' WHERE regionLocationLong LIKE '%Chile%'; 9 | UPDATE instances SET regionLocationCountryCode = 'DE' WHERE regionLocationLong LIKE '%Germany%'; 10 | UPDATE instances SET regionLocationCountryCode = 'ES' WHERE regionLocationLong LIKE '%Spain%'; 11 | UPDATE instances SET regionLocationCountryCode = 'FI' WHERE regionLocationLong LIKE '%Finland%'; 12 | UPDATE instances SET regionLocationCountryCode = 'FR' WHERE regionLocationLong LIKE '%France%'; 13 | UPDATE instances SET regionLocationCountryCode = 'GB' WHERE regionLocationLong LIKE '%UK%'; 14 | UPDATE instances SET regionLocationCountryCode = 'HK' WHERE regionLocationLong LIKE '%Hong Kong%'; 15 | UPDATE instances SET regionLocationCountryCode = 'ID' WHERE regionLocationLong LIKE '%Indonesia%'; 16 | UPDATE instances SET regionLocationCountryCode = 'IL' WHERE regionLocationLong LIKE '%Israel%'; 17 | UPDATE instances SET regionLocationCountryCode = 'IN' WHERE regionLocationLong LIKE '%India%'; 18 | UPDATE instances SET regionLocationCountryCode = 'IT' WHERE regionLocationLong LIKE '%Italy%'; 19 | UPDATE instances SET regionLocationCountryCode = 'JP' WHERE regionLocationLong LIKE '%Japan%'; 20 | UPDATE instances SET regionLocationCountryCode = 'KR' WHERE regionLocationLong LIKE '%South Korea%'; 21 | UPDATE instances SET regionLocationCountryCode = 'MX' WHERE regionLocationLong LIKE '%Mexico%'; 22 | UPDATE instances SET regionLocationCountryCode = 'NL' WHERE regionLocationLong LIKE '%Netherlands%'; 23 | UPDATE instances SET regionLocationCountryCode = 'PL' WHERE regionLocationLong LIKE '%Poland%'; 24 | UPDATE instances SET regionLocationCountryCode = 'QA' WHERE regionLocationLong LIKE '%Qatar%'; 25 | UPDATE instances SET regionLocationCountryCode = 'SA' WHERE regionLocationLong LIKE '%Saudi Arabia%'; 26 | UPDATE instances SET regionLocationCountryCode = 'SE' WHERE regionLocationLong LIKE '%Sweden%'; 27 | UPDATE instances SET regionLocationCountryCode = 'SG' WHERE regionLocationLong LIKE '%Singapore%'; 28 | UPDATE instances SET regionLocationCountryCode = 'TW' WHERE regionLocationLong LIKE '%Taiwan%'; 29 | UPDATE instances SET regionLocationCountryCode = 'US' WHERE regionLocationLong LIKE '%USA%'; 30 | UPDATE instances SET regionLocationCountryCode = 'ZA' WHERE regionLocationLong LIKE '%South Africa%'; 31 | -------------------------------------------------------------------------------- /regions/extra.sql: -------------------------------------------------------------------------------- 1 | /* Extra Data for Regions */ 2 | 3 | UPDATE instances SET regionLocationLong = "Doha, Qatar", regionLat = "25.2409741", regionLng = "51.5126395" WHERE region LIKE "me-central1"; 4 | UPDATE instances SET regionLocationLong = "Dammam, Saudi Arabia", regionLat = "26.3622236", regionLng = "49.6807149" WHERE region LIKE "me-central2"; 5 | UPDATE instances SET regionLocationLong = "Tel Aviv, Israel", regionLat = "32.0858103", regionLng = "34.7697987" WHERE region LIKE "me-west1"; 6 | 7 | /* https://www.domstol.se/mark--och-miljodomstolen-vid-nacka-tingsratt/nyheter/2021/06/mark--och-miljodomstolen-lamnar-tillstand-till-datacenter-i-horndal-avesta-kommun/ */ 8 | UPDATE instances SET regionLocationLong = "Stockholm, Sweden", regionLat = "60.2936275", regionLng = "16.3941995" WHERE region LIKE "europe-north2"; 9 | 10 | /* Source: On-site inspection ;) */ 11 | UPDATE instances SET regionLocationLong = "Berlin, Germany", regionLat = "52.2630", regionLng = "13.5727" WHERE region LIKE "europe-west10"; 12 | 13 | /* https://cloud.google.com/blog/products/infrastructure/heita-south-africa-new-cloud-region */ 14 | UPDATE instances SET regionLocationLong = "Johannesburg, South Africa", regionLat = "-26.1714376", regionLng = "27.8841339" WHERE region LIKE "africa-south1"; 15 | 16 | /* Source: Google Maps search "Google Data Center" and 2021-carbon-free-energy-data-centers.pdf */ 17 | UPDATE instances SET regionLocationLong = "St. Ghislain, Belgium", regionLat = "50.4690", regionLng = "3.8658" WHERE region LIKE "europe-west1"; 18 | UPDATE instances SET regionLocationLong = "Eemshaven, Netherlands", regionLat = "53.4259", regionLng = "6.8642" WHERE region LIKE "europe-west4"; 19 | UPDATE instances SET regionLocationLong = "Hamina, Finland", regionLat = "60.5376", regionLng = "27.1163" WHERE region LIKE "europe-north1"; 20 | UPDATE instances SET regionLocationLong = "The Dalles, Oregon, USA", regionLat = "45.6407", regionLng = "-121.1991" WHERE region LIKE "us-west1"; 21 | UPDATE instances SET regionLocationLong = "Las Vegas, Nevada, USA", regionLat = "36.0563", regionLng = "-115.0090" WHERE region LIKE "us-west4"; 22 | UPDATE instances SET regionLocationLong = "Council Bluffs, Iowa, USA", regionLat = "41.2210", regionLng = "-95.8639" WHERE region LIKE "us-central1"; 23 | 24 | /* 25 | Source: https://cloud.google.com/blog/products/infrastructure/new-google-cloud-region-in-turin-italy-now-open 26 | */ 27 | UPDATE instances SET regionLocationLong = "Turin, Italy", regionLat = "45.146729", regionLng = "7.742147" WHERE region LIKE "europe-west12"; 28 | 29 | /* 30 | Source: https://cloud.google.com/blog/products/infrastructure/new-google-cloud-region-in-madrid-spain-now-open 31 | [...] Built in partnership with Telefónica [...] 32 | */ 33 | UPDATE instances SET regionLat = "40.5195333", regionLng = "3.3409366" WHERE region LIKE "europe-southwest1"; 34 | 35 | /* https://cloud.google.com/blog/products/infrastructure/expanding-cloud-infrastructure-around-the-world */ 36 | UPDATE instances SET regionLat = "20.583333", regionLng = "-100.383333", regionLocationLong = "Querétaro, Mexico" WHERE region LIKE "northamerica-south1"; 37 | 38 | 39 | /* https://cloud.google.com/compute/docs/regions-zones/ */ 40 | UPDATE instances SET regionLocationLong = "Ashburn, Northern Virginia, USA" WHERE region LIKE "us-east4"; 41 | UPDATE instances SET regionLocationLong = "Changhua County, Taiwan, Republic of China" WHERE region LIKE "asia-east1"; 42 | UPDATE instances SET regionLocationLong = "Jurong West, Singapore" WHERE region LIKE "asia-southeast1"; 43 | UPDATE instances SET regionLocationLong = "Moncks Corner, South Carolina, USA" WHERE region LIKE "us-east1"; 44 | UPDATE instances SET regionLocationLong = "Montréal, Québec, Canada" WHERE region LIKE "northamerica-northeast1"; 45 | UPDATE instances SET regionLocationLong = "Osasco, São Paulo, Brazil" WHERE region LIKE "southamerica-east1"; 46 | UPDATE instances SET regionLocationLong = "Toronto, Ontario, Canada" WHERE region LIKE "northamerica-northeast2"; 47 | 48 | /* 49 | * europe-west9 (Paris, France) is Global Switch data center in Clichy 50 | * Source: https://lafibre.info/datacenter/incendie-maitrise-globalswitch-clichy/ 51 | */ 52 | UPDATE instances SET regionLat = "48.8996", regionLng = "2.2961" WHERE region LIKE "europe-west9"; 53 | -------------------------------------------------------------------------------- /regions/regions.json: -------------------------------------------------------------------------------- 1 | { 2 | "asia-east1":{ 3 | "name":"Taiwan, Republic of China", 4 | "flag": "https://upload.wikimedia.org/wikipedia/commons/7/72/Flag_of_the_Republic_of_China.svg", 5 | "latitude": 23.69781, 6 | "longitude": 120.960515 7 | }, 8 | "asia-east2":{ 9 | "name":"Hong Kong, People's Republic of China", 10 | "flag": "https://upload.wikimedia.org/wikipedia/commons/5/5b/Flag_of_Hong_Kong.svg", 11 | "latitude": 22.396428, 12 | "longitude": 114.109497 13 | }, 14 | "asia-northeast1":{ 15 | "name":"Tokyo, Japan", 16 | "flag": "https://upload.wikimedia.org/wikipedia/en/9/9e/Flag_of_Japan.svg", 17 | "latitude": 35.6762, 18 | "longitude": 139.6503 19 | }, 20 | "asia-northeast2":{ 21 | "name":"Osaka, Japan", 22 | "flag": "https://upload.wikimedia.org/wikipedia/en/9/9e/Flag_of_Japan.svg", 23 | "latitude": 34.6937, 24 | "longitude": 135.5023 25 | }, 26 | "asia-northeast3":{ 27 | "name":"Seoul, South Korea", 28 | "flag": "https://upload.wikimedia.org/wikipedia/commons/0/09/Flag_of_South_Korea.svg", 29 | "latitude": 37.5665, 30 | "longitude": 126.9780 31 | }, 32 | "asia-south1":{ 33 | "name":"Mumbai, India", 34 | "flag": "https://upload.wikimedia.org/wikipedia/en/4/41/Flag_of_India.svg", 35 | "latitude": 19.0760, 36 | "longitude": 72.8777 37 | }, 38 | "asia-south2":{ 39 | "name":"Delhi, India", 40 | "flag": "https://upload.wikimedia.org/wikipedia/en/4/41/Flag_of_India.svg", 41 | "latitude": 28.7041, 42 | "longitude": 77.1025 43 | }, 44 | "asia-southeast1":{ 45 | "name":"Singapore", 46 | "flag": "https://upload.wikimedia.org/wikipedia/commons/4/48/Flag_of_Singapore.svg", 47 | "latitude": 1.3521, 48 | "longitude": 103.8198 49 | }, 50 | "asia-southeast2":{ 51 | "name":"Jakarta, Indonesia", 52 | "flag": "https://upload.wikimedia.org/wikipedia/commons/9/9f/Flag_of_Indonesia.svg", 53 | "latitude": -6.2088, 54 | "longitude": 106.8456 55 | }, 56 | "australia-southeast1":{ 57 | "name":"Sydney, Australia", 58 | "flag": "https://upload.wikimedia.org/wikipedia/commons/8/88/Flag_of_Australia_%28converted%29.svg", 59 | "latitude": -33.8688, 60 | "longitude": 151.2093 61 | }, 62 | "australia-southeast2":{ 63 | "name":"Melbourne, Australia", 64 | "flag": "https://upload.wikimedia.org/wikipedia/commons/8/88/Flag_of_Australia_%28converted%29.svg", 65 | "latitude": -37.8136, 66 | "longitude": 144.9631 67 | }, 68 | "europe-central2":{ 69 | "name":"Warsaw, Poland", 70 | "flag": "https://upload.wikimedia.org/wikipedia/en/1/12/Flag_of_Poland.svg", 71 | "latitude": 52.2297, 72 | "longitude": 21.0122 73 | }, 74 | "europe-north1":{ 75 | "name":"Hamina, Finland", 76 | "flag": "https://upload.wikimedia.org/wikipedia/commons/b/bc/Flag_of_Finland.svg", 77 | "latitude": 60.5693, 78 | "longitude": 27.1878 79 | }, 80 | "europe-southwest1":{ 81 | "name":"Madrid, Spain", 82 | "flag": "https://upload.wikimedia.org/wikipedia/en/9/9a/Flag_of_Spain.svg", 83 | "latitude": 40.4167, 84 | "longitude": -3.7025 85 | }, 86 | "europe-west1":{ 87 | "name":"Belgium", 88 | "flag": "https://upload.wikimedia.org/wikipedia/commons/9/92/Flag_of_Belgium_%28civil%29.svg", 89 | "latitude": 50.5039, 90 | "longitude": 4.4699 91 | }, 92 | "europe-west2":{ 93 | "name":"London, UK", 94 | "flag": "https://upload.wikimedia.org/wikipedia/en/a/ae/Flag_of_the_United_Kingdom.svg", 95 | "latitude": 51.5074, 96 | "longitude": -0.1278 97 | }, 98 | "europe-west3":{ 99 | "name":"Frankfurt, Germany", 100 | "flag": "https://upload.wikimedia.org/wikipedia/en/b/ba/Flag_of_Germany.svg", 101 | "latitude": 50.1109, 102 | "longitude": 8.6821 103 | }, 104 | "europe-west4":{ 105 | "name":"Netherlands", 106 | "flag": "https://upload.wikimedia.org/wikipedia/commons/2/20/Flag_of_the_Netherlands.svg", 107 | "latitude": 52.1326, 108 | "longitude": 5.2913 109 | }, 110 | "europe-west6":{ 111 | "name":"Zurich, Switzerland", 112 | "flag": "https://upload.wikimedia.org/wikipedia/commons/f/f3/Flag_of_Switzerland.svg", 113 | "latitude": 47.3769, 114 | "longitude": 8.5417 115 | }, 116 | "europe-west8":{ 117 | "name":"Milan, Italy", 118 | "flag": "https://upload.wikimedia.org/wikipedia/en/0/03/Flag_of_Italy.svg", 119 | "latitude": 45.4669, 120 | "longitude": 9.19 121 | }, 122 | "europe-west9":{ 123 | "name":"Paris, France", 124 | "flag": "https://upload.wikimedia.org/wikipedia/en/c/c3/Flag_of_France.svg", 125 | "latitude": 48.8566, 126 | "longitude": 2.3522 127 | }, 128 | "northamerica-northeast1":{ 129 | "name":"Montréal, Canada", 130 | "flag": "https://upload.wikimedia.org/wikipedia/commons/d/d9/Flag_of_Canada_%28Pantone%29.svg", 131 | "latitude": 45.5017, 132 | "longitude": -73.5673 133 | }, 134 | "northamerica-northeast2":{ 135 | "name":"Toronto, Canada", 136 | "flag": "https://upload.wikimedia.org/wikipedia/commons/d/d9/Flag_of_Canada_%28Pantone%29.svg", 137 | "latitude": 43.7417, 138 | "longitude": -79.3733 139 | }, 140 | "southamerica-east1":{ 141 | "name":"São Paulo, Brazil", 142 | "flag": "https://upload.wikimedia.org/wikipedia/en/0/05/Flag_of_Brazil.svg", 143 | "latitude": -23.5505, 144 | "longitude": -46.6333 145 | }, 146 | "southamerica-west1":{ 147 | "name":"Santiago, Chile", 148 | "flag": "https://upload.wikimedia.org/wikipedia/commons/7/78/Flag_of_Chile.svg", 149 | "latitude": -33.45, 150 | "longitude": -70.6667 151 | }, 152 | "us-central1":{ 153 | "name":"Iowa, USA", 154 | "flag": "https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg", 155 | "latitude": 41.8780, 156 | "longitude": -93.0977 157 | }, 158 | "us-east1":{ 159 | "name":"South Carolina, USA", 160 | "flag": "https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg", 161 | "latitude": 33.8361, 162 | "longitude": -81.1637 163 | }, 164 | "us-east4":{ 165 | "name":"Northern Virginia, USA", 166 | "flag": "https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg", 167 | "latitude": 38.8334, 168 | "longitude": -77.2365 169 | }, 170 | "us-east5":{ 171 | "name":"Columbus, Ohio, USA", 172 | "flag": "https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg", 173 | "latitude": 39.9622, 174 | "longitude": -83.0006 175 | }, 176 | "us-south1":{ 177 | "name":"Dallas, Texas, USA", 178 | "flag": "https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg", 179 | "latitude": 32.7792, 180 | "longitude": -96.8089 181 | }, 182 | "us-west1":{ 183 | "name":"Oregon, USA", 184 | "flag": "https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg", 185 | "latitude": 43.8041, 186 | "longitude": -120.5542 187 | }, 188 | "us-west2":{ 189 | "name":"Los Angeles, California, USA", 190 | "flag": "https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg", 191 | "latitude": 34.0522, 192 | "longitude": -118.2437 193 | }, 194 | "us-west3":{ 195 | "name":"Salt Lake City, Utah, USA", 196 | "flag": "https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg", 197 | "latitude": 40.7608, 198 | "longitude": -111.8910 199 | }, 200 | "us-west4":{ 201 | "name":"Las Vegas, Nevada, USA", 202 | "flag": "https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg", 203 | "latitude": 36.1699, 204 | "longitude": -115.1398 205 | } 206 | } 207 | -------------------------------------------------------------------------------- /regions/regions.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl 2 | 3 | # Copyright 2022 Nils Knieling. All Rights Reserved. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | use utf8; 18 | binmode(STDOUT, ':encoding(utf8)'); 19 | use strict; 20 | use JSON::XS; 21 | 22 | open(FH, "regions.json") or die "JSON file 'regions.json' can't be opened"; 23 | my $json = ""; 24 | while(){ 25 | $json .= $_; 26 | } 27 | close(FH); 28 | my $regions = JSON::XS->new->utf8->decode($json); 29 | 30 | print "/*\n"; 31 | print " * GENERATED WITH regions.pl\n"; 32 | print " * Please see: https://github.com/Cyclenerd/google-cloud-compute-machine-types/blob/master/regions/README.md\n"; 33 | print " */\n"; 34 | 35 | my @names = keys %$regions; 36 | foreach my $name (sort @names) { 37 | print 'UPDATE instances SET regionLocationLong = "'. $regions->{$name}->{'name'} .'", regionLat = "'. $regions->{$name}->{'latitude'} .'", regionLng = "'. $regions->{$name}->{'longitude'} .'" WHERE region LIKE "'. $name ."\";\n"; 38 | } 39 | -------------------------------------------------------------------------------- /regions/regions.sql: -------------------------------------------------------------------------------- 1 | /* 2 | * GENERATED WITH regions.pl 3 | * Please see: https://github.com/Cyclenerd/google-cloud-compute-machine-types/blob/master/regions/README.md 4 | */ 5 | UPDATE instances SET regionLocationLong = "Taiwan, Republic of China", regionLat = "23.69781", regionLng = "120.960515" WHERE region LIKE "asia-east1"; 6 | UPDATE instances SET regionLocationLong = "Hong Kong, People's Republic of China", regionLat = "22.396428", regionLng = "114.109497" WHERE region LIKE "asia-east2"; 7 | UPDATE instances SET regionLocationLong = "Tokyo, Japan", regionLat = "35.6762", regionLng = "139.6503" WHERE region LIKE "asia-northeast1"; 8 | UPDATE instances SET regionLocationLong = "Osaka, Japan", regionLat = "34.6937", regionLng = "135.5023" WHERE region LIKE "asia-northeast2"; 9 | UPDATE instances SET regionLocationLong = "Seoul, South Korea", regionLat = "37.5665", regionLng = "126.978" WHERE region LIKE "asia-northeast3"; 10 | UPDATE instances SET regionLocationLong = "Mumbai, India", regionLat = "19.076", regionLng = "72.8777" WHERE region LIKE "asia-south1"; 11 | UPDATE instances SET regionLocationLong = "Delhi, India", regionLat = "28.7041", regionLng = "77.1025" WHERE region LIKE "asia-south2"; 12 | UPDATE instances SET regionLocationLong = "Singapore", regionLat = "1.3521", regionLng = "103.8198" WHERE region LIKE "asia-southeast1"; 13 | UPDATE instances SET regionLocationLong = "Jakarta, Indonesia", regionLat = "-6.2088", regionLng = "106.8456" WHERE region LIKE "asia-southeast2"; 14 | UPDATE instances SET regionLocationLong = "Sydney, Australia", regionLat = "-33.8688", regionLng = "151.2093" WHERE region LIKE "australia-southeast1"; 15 | UPDATE instances SET regionLocationLong = "Melbourne, Australia", regionLat = "-37.8136", regionLng = "144.9631" WHERE region LIKE "australia-southeast2"; 16 | UPDATE instances SET regionLocationLong = "Warsaw, Poland", regionLat = "52.2297", regionLng = "21.0122" WHERE region LIKE "europe-central2"; 17 | UPDATE instances SET regionLocationLong = "Hamina, Finland", regionLat = "60.5693", regionLng = "27.1878" WHERE region LIKE "europe-north1"; 18 | UPDATE instances SET regionLocationLong = "Madrid, Spain", regionLat = "40.4167", regionLng = "-3.7025" WHERE region LIKE "europe-southwest1"; 19 | UPDATE instances SET regionLocationLong = "Belgium", regionLat = "50.5039", regionLng = "4.4699" WHERE region LIKE "europe-west1"; 20 | UPDATE instances SET regionLocationLong = "London, UK", regionLat = "51.5074", regionLng = "-0.1278" WHERE region LIKE "europe-west2"; 21 | UPDATE instances SET regionLocationLong = "Frankfurt, Germany", regionLat = "50.1109", regionLng = "8.6821" WHERE region LIKE "europe-west3"; 22 | UPDATE instances SET regionLocationLong = "Netherlands", regionLat = "52.1326", regionLng = "5.2913" WHERE region LIKE "europe-west4"; 23 | UPDATE instances SET regionLocationLong = "Zurich, Switzerland", regionLat = "47.3769", regionLng = "8.5417" WHERE region LIKE "europe-west6"; 24 | UPDATE instances SET regionLocationLong = "Milan, Italy", regionLat = "45.4669", regionLng = "9.19" WHERE region LIKE "europe-west8"; 25 | UPDATE instances SET regionLocationLong = "Paris, France", regionLat = "48.8566", regionLng = "2.3522" WHERE region LIKE "europe-west9"; 26 | UPDATE instances SET regionLocationLong = "Montréal, Canada", regionLat = "45.5017", regionLng = "-73.5673" WHERE region LIKE "northamerica-northeast1"; 27 | UPDATE instances SET regionLocationLong = "Toronto, Canada", regionLat = "43.7417", regionLng = "-79.3733" WHERE region LIKE "northamerica-northeast2"; 28 | UPDATE instances SET regionLocationLong = "São Paulo, Brazil", regionLat = "-23.5505", regionLng = "-46.6333" WHERE region LIKE "southamerica-east1"; 29 | UPDATE instances SET regionLocationLong = "Santiago, Chile", regionLat = "-33.45", regionLng = "-70.6667" WHERE region LIKE "southamerica-west1"; 30 | UPDATE instances SET regionLocationLong = "Iowa, USA", regionLat = "41.878", regionLng = "-93.0977" WHERE region LIKE "us-central1"; 31 | UPDATE instances SET regionLocationLong = "South Carolina, USA", regionLat = "33.8361", regionLng = "-81.1637" WHERE region LIKE "us-east1"; 32 | UPDATE instances SET regionLocationLong = "Northern Virginia, USA", regionLat = "38.8334", regionLng = "-77.2365" WHERE region LIKE "us-east4"; 33 | UPDATE instances SET regionLocationLong = "Columbus, Ohio, USA", regionLat = "39.9622", regionLng = "-83.0006" WHERE region LIKE "us-east5"; 34 | UPDATE instances SET regionLocationLong = "Dallas, Texas, USA", regionLat = "32.7792", regionLng = "-96.8089" WHERE region LIKE "us-south1"; 35 | UPDATE instances SET regionLocationLong = "Oregon, USA", regionLat = "43.8041", regionLng = "-120.5542" WHERE region LIKE "us-west1"; 36 | UPDATE instances SET regionLocationLong = "Los Angeles, California, USA", regionLat = "34.0522", regionLng = "-118.2437" WHERE region LIKE "us-west2"; 37 | UPDATE instances SET regionLocationLong = "Salt Lake City, Utah, USA", regionLat = "40.7608", regionLng = "-111.891" WHERE region LIKE "us-west3"; 38 | UPDATE instances SET regionLocationLong = "Las Vegas, Nevada, USA", regionLat = "36.1699", regionLng = "-115.1398" WHERE region LIKE "us-west4"; 39 | --------------------------------------------------------------------------------