Repository: Cyclenerd/google-cloud-compute-machine-types Branch: master Commit: 6df0dc708acd Files: 119 Total size: 426.3 KB Directory structure: gitextract_uvs6_j8g/ ├── .github/ │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.md │ │ ├── config.yml │ │ └── feature_request.md │ └── PULL_REQUEST_TEMPLATE.md ├── .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 │ ├── cpanfile │ ├── site.pl │ └── src/ │ ├── 404.tt2 │ ├── ads.txt │ ├── 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/ │ │ └── favicon/ │ │ ├── README.txt │ │ └── site.webmanifest │ ├── 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 │ ├── popin-min.js │ ├── region.tt2 │ ├── regions.tt2 │ ├── regions_header.tt2 │ ├── robots.txt │ ├── sap.tt2 │ ├── sitemap.tt2 │ └── vs.tt2 ├── 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 │ ├── n4a.sql │ ├── n4d.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 ================================================ FILE CONTENTS ================================================ ================================================ FILE: .github/FUNDING.yml ================================================ github: Cyclenerd ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report.md ================================================ --- name: Bug report about: Create a report to help us improve title: 'Bug: Good title' labels: 'bug' assignees: '' --- **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - OS: [e.g. iOS] - Browser [e.g. chrome, safari] - Version [e.g. 22] **Smartphone (please complete the following information):** - Device: [e.g. iPhone6] - OS: [e.g. iOS8.1] - Browser [e.g. stock browser, safari] - Version [e.g. 22] **Additional context** Add any other context about the problem here. ================================================ FILE: .github/ISSUE_TEMPLATE/config.yml ================================================ blank_issues_enabled: false contact_links: - name: Contact me on Mastodon url: https://fosstodon.org/@cyclenerd about: Feel free to follow me on Mastodon and send me a message ================================================ FILE: .github/ISSUE_TEMPLATE/feature_request.md ================================================ --- name: Feature request about: Suggest an idea for this project title: 'Feature request: Good title' labels: 'enhancement' assignees: '' --- **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. **Describe alternatives you've considered** A clear and concise description of any alternative solutions or features you've considered. **Additional context** Add any other context or screenshots about the feature request here. ================================================ FILE: .github/PULL_REQUEST_TEMPLATE.md ================================================ First off, thanks for taking the time to contribute! ## Please Complete the Following - [ ] I read `CONTRIBUTING.md` - [ ] I used tabs to indent - [ ] I have tested my change ## Notes Feel free to put whatever you want here. ================================================ FILE: .gitignore ================================================ /site/** /build/*.csv /build/*.gz /build/*.json /build/*.yml /build/*.conf /build/*.db /build/*.db-journal /build/machine-types-regions.sql /build/machine-types-regions.sql.gz /build/publicipranges.json /build/publicipaddresses.sql .~lock* ================================================ FILE: CODE_OF_CONDUCT.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. ## Our Standards Examples of behavior that contributes to a positive environment for our community include: * Demonstrating empathy and kindness toward other people * Being respectful of differing opinions, viewpoints, and experiences * Giving and gracefully accepting constructive feedback * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience * Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: * The use of sexualized language or imagery, and sexual attention or advances of any kind * Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or email address, without their explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. ## Scope This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at nils [at] nkn-it (dot) de. All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident. ## Enforcement Guidelines Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: ### 1. Correction **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. ### 2. Warning **Community Impact**: A violation through a single incident or series of actions. **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. ### 3. Temporary Ban **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within the community. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. ================================================ FILE: CONTRIBUTING.md ================================================ # How to contribute First off, thanks for taking the time to contribute! ## Submitting changes 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/)). Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this: ``` $ git commit -m "A brief summary of the commit > > A paragraph describing what changed and its impact." ``` ## Coding style Start reading the code and you'll get the hang of it. It is optimized for readability: * Please also update the documentation. * Space before the opening curly of a multi-line BLOCK. * No space before the semicolon. * Space around most operators. * No space between function name and its opening parenthesis. * Line up corresponding things vertically, especially if it'd be too long to fit on one line anyway. * Please use tabs to indent. * Be nice. One more thing: * Keep it simple! 👍 Thanks! ❤️❤️❤️ ================================================ FILE: LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ================================================ FILE: README.md ================================================ # Google Cloud Compute Comparison [![Badge: Google Cloud](https://img.shields.io/badge/Google%20Cloud-%234285F4.svg?logo=google-cloud&logoColor=white)](#readme) [![Badge: LICENSE](https://img.shields.io/github/license/cyclenerd/google-cloud-compute-machine-types)](https://github.com/Cyclenerd/google-cloud-compute-machine-types/blob/master/LICENSE) 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. ## Instance Picker [![Screenshot: gcloud-compute.com - Instance Picker](./img/grid.png)](https://gcloud-compute.com/) ## Comparison [![Screenshot: gcloud-compute.com - Comparison](./img/compare.png)](https://gcloud-compute.com/comparison/e2-standard-4/vs/t2a-standard-4.html) ## 🖊️ Add, edit or change machine type information The Google Compute Engine API is used to get all machine types in all regions and zones. Additional information is read via SQL files during the build process. Dive into the [build](./build/) folder to see how the data is retrieved, processed, and integrated. Feel free to explore and contribute! ## ❤️ Contributing Have a patch that will benefit this project? Awesome! Follow these steps to have it accepted. 1. Please read [how to contribute](CONTRIBUTING.md). 1. Fork this Git repository and make your changes. 1. Create a Pull Request. 1. Incorporate review feedback to your changes. 1. Accepted! ## 📜 License All files in this repository are under the [Apache License, Version 2.0](LICENSE) unless noted otherwise. Portions of this webapp are modifications based on work created and shared by [Google](https://developers.google.com/readme/policies) and used according to terms described in the [Creative Commons 4.0 Attribution License](https://creativecommons.org/licenses/by/4.0/). Please note: * No warranty * No official Google product ================================================ FILE: build/00_config.sh ================================================ #!/usr/bin/env bash DB='gce.db' CSV_GCLOUD_MACHINE_TYPES="machinetypes.csv" CSV_GCLOUD_ZONES="zones.csv" CSV_GCLOUD_DISK_TYPES="disktypes.csv" CSV_GCLOUD_IMAGES="images.csv" CSV_EXPORT='machine-types-regions.csv' SQL_EXPORT='machine-types-regions.sql' ================================================ FILE: build/01_create_database.sh ================================================ #!/usr/bin/env bash set -e # # Create SQLite3 database for GCE machine type informations # source "00_config.sh" sqlite3 "$DB" < "01_create_database.sql" ================================================ FILE: build/01_create_database.sql ================================================ /* * Create SQLite3 database for GCE machine type informations */ DROP TABLE IF EXISTS "machinetypes"; CREATE TABLE "machinetypes" ( "name" TEXT NOT NULL DEFAULT '', 'description' TEXT NOT NULL DEFAULT '', 'location' TEXT NOT NULL DEFAULT '', 'region' TEXT NOT NULL DEFAULT '', 'zone' TEXT NOT NULL DEFAULT '', 'guestCpus' INT NOT NULL DEFAULT '0', 'isSharedCpu' TEXT NOT NULL DEFAULT 'false', 'memoryGB' REAL NOT NULL DEFAULT '0.0', 'guestAcceleratorCount' INT NOT NULL DEFAULT '0', 'guestAcceleratorType' TEXT NOT NULL DEFAULT '', 'maximumPersistentDisks' INT NOT NULL DEFAULT '0', 'maximumPersistentDisksSizeGb' INT NOT NULL DEFAULT '0', PRIMARY KEY("name", "zone") ); DROP TABLE IF EXISTS "zones"; CREATE TABLE "zones" ( "name" TEXT NOT NULL DEFAULT '', 'availableCpuPlatforms' TEXT NOT NULL DEFAULT '', PRIMARY KEY("name") ); DROP TABLE IF EXISTS "instances"; CREATE TABLE "instances" ( "name" TEXT NOT NULL DEFAULT '', "series" TEXT DEFAULT 'TODO', "family" TEXT DEFAULT 'TODO', "description" TEXT DEFAULT '', "location" TEXT NOT NULL DEFAULT '', "region" TEXT NOT NULL DEFAULT '', "regionLocation" TEXT NOT NULL DEFAULT '', "regionLocationLong" TEXT NOT NULL DEFAULT '', "regionLocationCountryCode" TEXT NOT NULL DEFAULT '', "regionCfe" REAL DEFAULT '', "regionCo2Kwh" REAL DEFAULT '', "regionLowCo2" REAL DEFAULT '0.0', "regionLat" REAL DEFAULT '0.0', "regionLng" REAL DEFAULT '0.0', "regionPublicIpv4Addr" REAL DEFAULT '0.0', "zoneCount" REAL DEFAULT '0.0', "zones" TEXT DEFAULT '', "vCpus" REAL DEFAULT '0.0', "sharedCpu" TEXT DEFAULT 'false', "intel" REAL DEFAULT '0.0', "amd" REAL DEFAULT '0.0', "arm" REAL DEFAULT '0.0', "cpuPlatformCount" REAL DEFAULT '0.0', "cpuPlatform" TEXT DEFAULT '', "cpuBaseClock" REAL DEFAULT '0.0', "cpuTurboClock" REAL DEFAULT '0.0', "cpuSingleMaxTurboClock" REAL DEFAULT '0.0', "availableCpuPlatformCount" REAL DEFAULT '0.0', "availableCpuPlatform" TEXT DEFAULT '', "coremarkScore" REAL DEFAULT '', "standardDeviation" REAL DEFAULT '', "sampleCount" REAL DEFAULT '', "memoryGB" REAL DEFAULT '0.0', "acceleratorCount" REAL DEFAULT '0.0', "acceleratorType" TEXT DEFAULT '', "disks" REAL DEFAULT '0.0', "disksSizeGb" REAL DEFAULT '0.0', "localSsd" REAL DEFAULT '0.0', "bandwidth" REAL DEFAULT '0.0', "tier1" REAL DEFAULT '0.0', "sap" REAL DEFAULT '0.0', "saps" REAL DEFAULT '', "hana" REAL DEFAULT '0.0', "sud" REAL DEFAULT '0.0', "spot" REAL DEFAULT '0.0', "hour" REAL DEFAULT '0.0', "hourSpot" REAL DEFAULT '0.0', "month" REAL DEFAULT '0.0', "month1yCud" REAL DEFAULT '0.0', "month3yCud" REAL DEFAULT '0.0', "monthSpot" REAL DEFAULT '0.0', "monthSles" REAL DEFAULT '0.0', "monthSlesSap" REAL DEFAULT '0.0', "monthSlesSap1yCud" REAL DEFAULT '0.0', "monthSlesSap3yCud" REAL DEFAULT '0.0', "monthRhel" REAL DEFAULT '0.0', "monthRhel1yCud" REAL DEFAULT '0.0', "monthRhel3yCud" REAL DEFAULT '0.0', "monthRhelSap" REAL DEFAULT '0.0', "monthRhelSap1yCud" REAL DEFAULT '0.0', "monthRhelSap3yCud" REAL DEFAULT '0.0', "monthWindows" REAL DEFAULT '0.0', PRIMARY KEY("name", "region") ); DROP TABLE IF EXISTS "disktypes"; CREATE TABLE "disktypes" ( "name" TEXT NOT NULL DEFAULT '', 'description' TEXT NOT NULL DEFAULT '', 'location' TEXT NOT NULL DEFAULT '', 'region' TEXT NOT NULL DEFAULT '', 'zone' TEXT NOT NULL DEFAULT '', PRIMARY KEY("name", "zone") ); DROP TABLE IF EXISTS "disks"; CREATE TABLE "disks" ( "name" TEXT NOT NULL DEFAULT '', "description" TEXT DEFAULT '', "location" TEXT NOT NULL DEFAULT '', "region" TEXT NOT NULL DEFAULT '', "regionLocation" TEXT NOT NULL DEFAULT '', "zoneCount" REAL DEFAULT '0.0', "zones" TEXT DEFAULT '', "monthGb" REAL DEFAULT '0.0', PRIMARY KEY("name", "region") ); DROP TABLE IF EXISTS "images"; CREATE TABLE "images" ( "name" TEXT NOT NULL DEFAULT '', "description" TEXT DEFAULT '', "diskSizeGb" REAL DEFAULT '0.0', "project" TEXT NOT NULL DEFAULT '', "family" TEXT NOT NULL DEFAULT '', "architecture" TEXT NOT NULL DEFAULT '', "creation" REAL DEFAULT '0.0', PRIMARY KEY("name", "project", "family") ); /* Index */ CREATE INDEX IF NOT EXISTS "instances-name-index" ON instances(name COLLATE NOCASE); CREATE INDEX IF NOT EXISTS "instances-region-index" ON instances(region COLLATE NOCASE); CREATE INDEX IF NOT EXISTS "instances-region-name-index" ON instances(region, name COLLATE NOCASE); CREATE INDEX IF NOT EXISTS "instances-region-hana-index" ON instances(region, hana); CREATE INDEX IF NOT EXISTS "instances-region-sap-index" ON instances(region, sap); CREATE INDEX IF NOT EXISTS "instances-region-series-index" ON instances(region, series COLLATE NOCASE); CREATE INDEX IF NOT EXISTS "disks-name-index" ON disks(name COLLATE NOCASE); CREATE INDEX IF NOT EXISTS "disks-region-index" ON disks(region COLLATE NOCASE); ================================================ FILE: build/02_get.sh ================================================ #!/usr/bin/env bash set -e # # Export all Google Compute Engine machine types and zones via the # Google Compute Engine API and create CSV file # source "00_config.sh" echo "Download pricing..." curl -OL "https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/raw/master/pricing.yml" echo # Create CSV file with machine types echo "Executing: 'gcloud compute machine-types list', please wait..." printf "%s;" \ "name" \ "description" \ "zone" \ "guestCpus" \ "isSharedCpu" \ "memoryGB" \ "guestAcceleratorCount" \ "guestAcceleratorType" \ "maximumPersistentDisks" \ "maximumPersistentDisksSizeGb" \ "deprecated" > "$CSV_GCLOUD_MACHINE_TYPES" echo "" >> "$CSV_GCLOUD_MACHINE_TYPES" gcloud compute machine-types list \ --quiet \ --filter="ZONE:-" \ --format="csv[no-heading,separator=';']( \ name, \ description, \ zone, \ guestCpus, \ isSharedCpu, \ MEMORY_GB, \ accelerators.guestAcceleratorCount, \ accelerators.guestAcceleratorType, \ maximumPersistentDisks, \ maximumPersistentDisksSizeGb, \ deprecated.state)" >> "$CSV_GCLOUD_MACHINE_TYPES" # Create CSV file with zones and available CPU platforms echo "Executing: 'gcloud compute zones list', please wait..." printf "%s;" \ "name" \ "availableCpuPlatforms" > "$CSV_GCLOUD_ZONES" echo "" >> "$CSV_GCLOUD_ZONES" gcloud compute zones list \ --quiet \ --format="csv[no-heading,separator=';'](name, availableCpuPlatforms.list())" >> "$CSV_GCLOUD_ZONES" # Fix Google Axion CPU platform name: # Parse the CSV file line by line. If 'Google Axion' is in line and 'Google Axion_' remove 'Google Axion_'. perl -i -pe "s/Google Axion_,//g if /Google Axion/" "$CSV_GCLOUD_ZONES" perl -i -pe "s/Google Axion_//g if /Google Axion/" "$CSV_GCLOUD_ZONES" # Create CSV file with disk types echo "Executing: 'gcloud compute disk-types list', please wait..." printf "%s;" \ "name" \ "zone" \ "description" > "$CSV_GCLOUD_DISK_TYPES" echo "" >> "$CSV_GCLOUD_DISK_TYPES" gcloud compute disk-types list \ --quiet \ --filter="ZONE:-" \ --format="csv[no-heading,separator=';']( \ name, \ zone, \ description)" >> "$CSV_GCLOUD_DISK_TYPES" # Create CSV files with images echo "Executing: 'gcloud compute images list', please wait..." # Standard images echo "name;description;diskSizeGb;project;family;architecture;creation;deprecated;status" > "$CSV_GCLOUD_IMAGES" gcloud compute images list \ --quiet \ --format="csv[no-heading,separator=';'](NAME,description,diskSizeGb,PROJECT,FAMILY,architecture,creationTimestamp,DEPRECATED,STATUS)" >> "$CSV_GCLOUD_IMAGES" # Community images # https://cloud.google.com/compute/docs/images#almalinux gcloud compute images list \ --project almalinux-cloud \ --no-standard-images \ --quiet \ --format="csv[no-heading,separator=';'](NAME,description,diskSizeGb,PROJECT,FAMILY,architecture,creationTimestamp,DEPRECATED,STATUS)" >> "$CSV_GCLOUD_IMAGES" # https://cloud.google.com/compute/docs/images#freebsd gcloud compute images list \ --project freebsd-org-cloud-dev \ --no-standard-images \ --quiet \ --format="csv[no-heading,separator=';'](NAME,description,diskSizeGb,PROJECT,FAMILY,architecture,creationTimestamp,DEPRECATED,STATUS)" >> "$CSV_GCLOUD_IMAGES" # Deep Learning on Linux images gcloud compute images list \ --project ml-images \ --filter="creationTimestamp > -P1Y" \ --no-standard-images \ --quiet \ --format="csv[no-heading,separator=';'](NAME,description,diskSizeGb,PROJECT,FAMILY,architecture,creationTimestamp,DEPRECATED,STATUS)" >> "$CSV_GCLOUD_IMAGES" # https://cloud.google.com/deep-learning-vm/docs/images#listing-versions gcloud compute images list \ --project deeplearning-platform-release \ --filter="creationTimestamp > -P1Y" \ --no-standard-images \ --quiet \ --format="csv[no-heading,separator=';'](NAME,description,diskSizeGb,PROJECT,FAMILY,architecture,creationTimestamp,DEPRECATED,STATUS)" >> "$CSV_GCLOUD_IMAGES" # High Performance Computing (HPC) gcloud compute images list \ --project cloud-hpc-image-public \ --filter="creationTimestamp > -P1Y" \ --no-standard-images \ --quiet \ --format="csv[no-heading,separator=';'](NAME,description,diskSizeGb,PROJECT,FAMILY,architecture,creationTimestamp,DEPRECATED,STATUS)" >> "$CSV_GCLOUD_IMAGES" echo "DONE" ================================================ FILE: build/03_copy.pl ================================================ #!/usr/bin/env perl # Copyright 2022 Nils Knieling. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Copy machine types from CSV export to SQLite database # use utf8; binmode(STDOUT, ':encoding(utf8)'); use strict; use DBI; # CSV files without .csv my $csv_gcloud_machine_types = 'machinetypes'; my $csv_gcloud_zones = 'zones'; my $csv_gcloud_disk_types = 'disktypes'; my $csv_gcloud_images = 'images'; my $csv_gcloud_community_images = 'imagescommunity'; my $csv_gcloud_deeplearning_images = 'imagesdeeplearning'; # SQLite database file my $db_file = 'gce.db'; # Open CSV my $csv = DBI->connect("dbi:CSV:", undef, undef, { f_ext => ".csv/r", csv_sep_char => ";", csv_class => "Text::CSV_XS", RaiseError => 1, }) or die "ERROR: Cannot connect $DBI::errstr\n"; # Open DB my $db = DBI->connect("dbi:SQLite:dbname=$db_file","","") or die "ERROR: Cannot connect $DBI::errstr\n"; ############################################################################### # MACHINE TYPES ############################################################################### print "Machine types\n"; $db->do("DELETE FROM machinetypes") or die "ERROR: Cannot delete table $DBI::errstr\n"; # Select machine types from CSV my $select = qq ~ SELECT name, description, zone, guestCpus, isSharedCpu, memoryGB, guestAcceleratorCount, guestAcceleratorType, maximumPersistentDisks, maximumPersistentDisksSizeGb, deprecated FROM $csv_gcloud_machine_types ~; my $sth = $csv->prepare($select); $sth->execute; $sth->bind_columns (\my ( $name, $description, $zone, $guestCpus, $isSharedCpu, $memoryGB, $guestAcceleratorCount, $guestAcceleratorType, $maximumPersistentDisks, $maximumPersistentDisksSizeGb, $deprecated )); # Create values for insert my @values = (); while ($sth->fetch) { next if ($deprecated); # Skip deprecated machine-types print "$name, $zone\n"; # Location and region my @zone_parts = split(/-/, $zone); my $location = "$zone_parts[0]"; my $region = "$zone_parts[0]-$zone_parts[1]"; $isSharedCpu = lc($isSharedCpu); # Create value for SQL INSERT my $value = qq ~ ( '$name', '$description', '$location', '$region', '$zone', '$guestCpus', '$isSharedCpu', '$memoryGB', '$guestAcceleratorCount', '$guestAcceleratorType', '$maximumPersistentDisks', '$maximumPersistentDisksSizeGb' ) ~; $value =~ s/\t//g; push(@values, $value); } $sth->finish; # Insert machine types to database table my $insert = qq ~ INSERT INTO machinetypes ( 'name', 'description', 'location', 'region', 'zone', 'guestCpus', 'isSharedCpu', 'memoryGB', 'guestAcceleratorCount', 'guestAcceleratorType', 'maximumPersistentDisks', 'maximumPersistentDisksSizeGb' ) VALUES ~; $insert .= join(",", @values); $insert .= ";\n"; $db->do($insert) or die "ERROR: Cannot insert machine types $DBI::errstr\n"; ############################################################################### # ZONES ############################################################################### print "Zones\n"; $db->do("DELETE FROM zones") or die "ERROR: Cannot delete table $DBI::errstr\n"; # Select machine types from CSV my $select_zones = "SELECT name, availableCpuPlatforms FROM $csv_gcloud_zones"; $sth = $csv->prepare($select_zones); $sth->execute; $sth->bind_columns (\my ($name, $availableCpuPlatforms)); # Create values for insert my @zones = (); while ($sth->fetch) { print "$name\n"; # Create value for SQL INSERT my $zone = "('$name', '$availableCpuPlatforms')"; push(@zones, $zone); } $sth->finish; my $insert_zones = "INSERT INTO zones ('name', 'availableCpuPlatforms') VALUES"; $insert_zones .= join(",", @zones); $insert_zones .= ";\n"; $db->do($insert_zones) or die "ERROR: Cannot insert zones $DBI::errstr\n"; ############################################################################### # DISK TYPES ############################################################################### print "Disk types\n"; $db->do("DELETE FROM disktypes") or die "ERROR: Cannot delete table $DBI::errstr\n"; # Select disk types from CSV my $select_disks = "SELECT name, description, zone FROM $csv_gcloud_disk_types"; $sth = $csv->prepare($select_disks); $sth->execute; $sth->bind_columns (\my ($name, $description, $zone)); # Create values for insert my @disks = (); while ($sth->fetch) { print "$name, $zone\n"; # Location and region my @zone_parts = split(/-/, $zone); my $location = "$zone_parts[0]"; my $region = "$zone_parts[0]-$zone_parts[1]"; # Create value for SQL INSERT my $value = "('$name', '$description', '$location', '$region', '$zone')"; push(@disks, $value); } $sth->finish; # Insert machine types to database table my $insert_disks = qq ~ INSERT INTO disktypes ( 'name', 'description', 'location', 'region', 'zone' ) VALUES ~; $insert_disks .= join(",", @disks); $insert_disks .= ";\n"; $db->do($insert_disks) or die "ERROR: Cannot insert disk types $DBI::errstr\n"; ############################################################################### # IMAGES ############################################################################### print "Images\n"; $db->do("DELETE FROM images") or die "ERROR: Cannot delete table $DBI::errstr\n"; my $insert_images = qq ~ REPLACE INTO images ( 'name', 'description', 'diskSizeGb', 'project', 'family', 'architecture', 'creation' ) VALUES ~; my $select_images = "SELECT name, description, diskSizeGb, project, family, architecture, creation FROM $csv_gcloud_images WHERE status LIKE 'READY'"; $sth = $csv->prepare($select_images); $sth->execute; $sth->bind_columns (\my ($name, $description, $diskSizeGb, $project, $family, $architecture, $creation)); while ($sth->fetch) { print "$project, $family, $name\n"; my $value = "$insert_images ('$name', '$description', '$diskSizeGb', '$project', '$family', '$architecture', '$creation')"; $db->do($value) or die "ERROR: Cannot insert images $DBI::errstr\n"; } $sth->finish; print "DONE\n"; ================================================ FILE: build/04_clean_up.sh ================================================ #!/usr/bin/env bash set -e # # Clean up (Remove disconnected data centers...) # source "00_config.sh" sqlite3 "$DB" < "../instances/clean_up.sql" ================================================ FILE: build/05_copy_disks.pl ================================================ #!/usr/bin/env perl # Copyright 2022 Nils Knieling. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Copy disk types per region to disks table # use utf8; binmode(STDOUT, ':encoding(utf8)'); use strict; use DBI; my $db_file = 'gce.db'; # Open DB my $db = DBI->connect("dbi:SQLite:dbname=$db_file","","") or die "ERROR: Cannot connect $DBI::errstr\n"; ############################################################################### # Copy DISK TYPES to DISKS ############################################################################### $db->do("DELETE FROM disks") or die "ERROR: Cannot delete table $DBI::errstr\n"; # Select 'disktypes' my $select = qq ~ SELECT name, description, location, region, (SELECT COUNT(zone) FROM disktypes WHERE name LIKE D.name AND region LIKE D.region) AS zoneCount, (SELECT GROUP_CONCAT(zone) FROM disktypes WHERE name LIKE D.name AND region LIKE D.region ORDER BY zone) AS zones FROM disktypes D GROUP BY name, region; ~; my $sth = $db->prepare($select); $sth->execute; $sth->bind_columns ( \my ( $name, $description, $location, $region, $zoneCount, $zones )); # Insert disk type per region to disks table my @values = (); while ($sth->fetch) { print "$name, $region\n"; # Sort zones my @zones_unsorted = split(',', $zones); $zones = join(', ', sort @zones_unsorted); # Create value for SQL INSERT my $value = "('$name', '$description', '$location', '$region', '$zoneCount', '$zones')"; push(@values, $value); } $sth->finish; my $insert = qq ~ INSERT INTO disks ( 'name', 'description', 'location', 'region', 'zoneCount', 'zones' ) VALUES ~; $insert .= join(",", @values); $insert .= ";\n"; $db->do($insert) or die "ERROR: Cannot insert $DBI::errstr\n"; print "DONE\n"; ================================================ FILE: build/05_copy_instances.pl ================================================ #!/usr/bin/env perl # Copyright 2022 Nils Knieling. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Copy machine types per region to instances table # use utf8; binmode(STDOUT, ':encoding(utf8)'); use strict; use DBI; my $db_file = 'gce.db'; # Open DB my $db = DBI->connect("dbi:SQLite:dbname=$db_file","","") or die "ERROR: Cannot connect $DBI::errstr\n"; ############################################################################### # Copy MACHINE TYPES to INSTANCES ############################################################################### $db->do("DELETE FROM instances") or die "ERROR: Cannot delete table $DBI::errstr\n"; # Select 'machinetypes' my $select = qq ~ SELECT name, description, location, region, (SELECT COUNT(zone) FROM machinetypes WHERE name LIKE M.name AND region LIKE M.region) AS zoneCount, (SELECT GROUP_CONCAT(zone) FROM machinetypes WHERE name LIKE M.name AND region LIKE M.region ORDER BY zone) AS zones, guestCpus, isSharedCpu, memoryGB, guestAcceleratorCount, guestAcceleratorType, maximumPersistentDisks, maximumPersistentDisksSizeGb FROM machinetypes M GROUP BY name, region; ~; my $sth = $db->prepare($select); $sth->execute; $sth->bind_columns ( \my ( $name, $description, $location, $region, $zoneCount, $zones, $guestCpus, $isSharedCpu, $memoryGB, $guestAcceleratorCount, $guestAcceleratorType, $maximumPersistentDisks, $maximumPersistentDisksSizeGb )); # Insert machine type per region to instances table my @values = (); while ($sth->fetch) { print "$name, $region\n"; # Shared CPU if (lc($isSharedCpu) eq 'true') { $isSharedCpu = '1'; } else { $isSharedCpu = '0' } # Sort zones my @zones_unsorted = split(',', $zones); $zones = join(', ', sort @zones_unsorted); # Create value for SQL INSERT my $value = qq ~ ( '$name', '$description', '$location', '$region', '$zoneCount', '$zones', '$guestCpus', '$isSharedCpu', '$memoryGB', '$guestAcceleratorCount', '$guestAcceleratorType', '$maximumPersistentDisks', '$maximumPersistentDisksSizeGb' ) ~; $value =~ s/\t//g; push(@values, $value); } $sth->finish; my $insert = qq ~ INSERT INTO instances ( 'name', 'description', 'location', 'region', 'zoneCount', 'zones', 'vCpus', 'sharedCpu', 'memoryGB', 'acceleratorCount', 'acceleratorType', 'disks', 'disksSizeGb' ) VALUES ~; $insert .= join(",", @values); $insert .= ";\n"; $db->do($insert) or die "ERROR: Cannot insert $DBI::errstr\n"; print "DONE\n"; ================================================ FILE: build/06_add_costs.pl ================================================ #!/usr/bin/env perl # Copyright 2022-2024 Nils Knieling. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Add costs for machine types in region from pricing (https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator) # use utf8; binmode(STDOUT, ':encoding(utf8)'); use strict; use DBI; use YAML::XS qw(LoadFile); use App::Options ( option => { pricing => { required => 1, default => 'pricing.yml', description => "YAML file with GCP pricing information" }, }, ); # Open DB my $db_file = 'gce.db'; my $db = DBI->connect("dbi:SQLite:dbname=$db_file","","") or die "ERROR: Cannot connect $DBI::errstr\n"; # Load YAML file with GCP information my $pricing_file = $App::options{pricing}; unless (-r "$pricing_file") { # read die "ERROR: Cannot open YAML file '$pricing_file' for GCP information import!\n"; } my $gcp = LoadFile("$pricing_file"); ############################################################################### # INSTANCES ############################################################################### print "\nInstances\n"; foreach my $machine (keys %{ $gcp->{'compute'}->{'instance'} }) { print "$machine\n"; # OS license per month my $sles = $gcp->{'compute'}->{'license'}->{$machine}->{'cost'}->{'sles'}->{'month'}; my $slesSap = $gcp->{'compute'}->{'license'}->{$machine}->{'cost'}->{'sles-sap'}->{'month'}; my $slesSap1y = $gcp->{'compute'}->{'license'}->{$machine}->{'cost'}->{'sles-sap'}->{'month_1y'} || $slesSap; my $slesSap3y = $gcp->{'compute'}->{'license'}->{$machine}->{'cost'}->{'sles-sap'}->{'month_3y'} || $slesSap; my $rhel = $gcp->{'compute'}->{'license'}->{$machine}->{'cost'}->{'rhel'}->{'month'}; my $rhel1y = $gcp->{'compute'}->{'license'}->{$machine}->{'cost'}->{'rhel'}->{'month_1y'} || $rhel; my $rhel3y = $gcp->{'compute'}->{'license'}->{$machine}->{'cost'}->{'rhel'}->{'month_3y'} || $rhel; my $rhelSap = $gcp->{'compute'}->{'license'}->{$machine}->{'cost'}->{'rhel-sap'}->{'month'}; my $rhelSap1y = $gcp->{'compute'}->{'license'}->{$machine}->{'cost'}->{'rhel-sap'}->{'month_1y'} || $rhelSap; my $rhelSap3y = $gcp->{'compute'}->{'license'}->{$machine}->{'cost'}->{'rhel-sap'}->{'month_3y'} || $rhelSap; my $windows = $gcp->{'compute'}->{'license'}->{$machine}->{'cost'}->{'windows'}->{'month'}; foreach my $region (keys %{ $gcp->{'compute'}->{'instance'}->{$machine}->{'cost'} }) { print "\t$region\n"; # vCPU and memory in region per hour and month my $hour = $gcp->{'compute'}->{'instance'}->{$machine}->{'cost'}->{$region}->{'hour'} || '0.0'; my $hour_spot = $gcp->{'compute'}->{'instance'}->{$machine}->{'cost'}->{$region}->{'hour_spot'} || $hour; my $month = $gcp->{'compute'}->{'instance'}->{$machine}->{'cost'}->{$region}->{'month'} || '0.0'; my $month_1y = $gcp->{'compute'}->{'instance'}->{$machine}->{'cost'}->{$region}->{'month_1y'} || $month; my $month_3y = $gcp->{'compute'}->{'instance'}->{$machine}->{'cost'}->{$region}->{'month_3y'} || $month; my $month_spot = $gcp->{'compute'}->{'instance'}->{$machine}->{'cost'}->{$region}->{'month_spot'} || $month; my $update = qq ~ UPDATE instances SET hour = '$hour', hourSpot = '$hour_spot', month = '$month', month1yCud = '$month_1y', month3yCud = '$month_3y', monthSpot = '$month_spot', monthSles = '$sles', monthSlesSap = '$slesSap', monthSlesSap1yCud = '$slesSap1y', monthSlesSap3yCud = '$slesSap3y', monthRhel = '$rhel', monthRhel1yCud = '$rhel1y', monthRhel3yCud = '$rhel3y', monthRhelSap = '$rhelSap', monthRhelSap1yCud = '$rhelSap1y', monthRhelSap3yCud = '$rhelSap3y', monthWindows = '$windows' WHERE name LIKE '$machine' AND region LIKE '$region' ~; $db->do($update) or die "ERROR: Cannot update $DBI::errstr\n"; } } ############################################################################### # DISKS ############################################################################### print "\nDisks\n"; # gcosts -> gcloud disk-types name mapping my %storage_types = ( 'local' => 'local-ssd', 'balanced' => 'pd-balanced', 'extreme' => 'pd-extreme', 'ssd' => 'pd-ssd', 'hdd' => 'pd-standard', 'hdd' => 'pd-standard', 'hyperdisk-extreme' => 'hyperdisk-extreme', ); foreach my $storage_type (keys %storage_types) { my $disk_type = $storage_types{$storage_type}; print "$storage_type [$disk_type]\n"; foreach my $region (keys %{ $gcp->{'compute'}->{'storage'}->{$storage_type}->{'cost'} }) { print "\t$region\n"; my $month = $gcp->{'compute'}->{'storage'}->{$storage_type}->{'cost'}->{$region}->{'month'}; my $update = "UPDATE disks SET monthGb = '$month' WHERE name LIKE '$disk_type' AND region LIKE '$region'"; $db->do($update) or die "ERROR: Cannot update $DBI::errstr\n"; } } ############################################################################### # LOCATION NAME ############################################################################### print "\nRegion Locations\n"; # Update region location foreach my $region (keys %{ $gcp->{'region'} }) { my $regionLocation = $gcp->{'region'}->{$region}->{'location'}; print "$region : $regionLocation\n"; $db->do("UPDATE instances SET regionLocation = '$regionLocation', regionLocationLong = '$regionLocation' WHERE region LIKE '$region'") or die "ERROR: Cannot update $DBI::errstr\n"; $db->do("UPDATE disks SET regionLocation = '$regionLocation' WHERE region LIKE '$region'") or die "ERROR: Cannot update $DBI::errstr\n"; } ############################################################################### # TEST ############################################################################### print "\nTest\n"; # Check regions without location my $sth = $db->prepare("SELECT region FROM instances WHERE regionLocation LIKE '' GROUP BY region"); $sth->execute; $sth->bind_columns (\my ($region)); while ($sth->fetch) { print "WARNING: Location of region '$region' missing!\n"; my $deleteLocation = "DELETE FROM instances WHERE region LIKE '$region'"; $db->do($deleteLocation) or die "ERROR: Cannot delete instances in unknown location $DBI::errstr\n"; } # Check disks without price $sth = $db->prepare("SELECT name, region FROM disks WHERE monthGb <= 0"); $sth->execute; $sth->bind_columns (\my ($name, $region)); while ($sth->fetch) { print "WARNING: Costs per month missing for disk type '$name' in region '$region'.\n"; } # Chech instances without price $sth = $db->prepare("SELECT name, region FROM instances WHERE hour <= 0"); $sth->execute; $sth->bind_columns (\my ($name, $region)); while ($sth->fetch) { print "WARNING: Costs per hour missing for machine type '$name' in region '$region'.\n"; my $deleteInstance = "DELETE FROM instances WHERE name LIKE '$name' AND region LIKE '$region'"; $db->do($deleteInstance) or die "ERROR: Cannot delete instance without price $DBI::errstr\n"; } print "DONE\n"; ================================================ FILE: build/07_add.sh ================================================ #!/usr/bin/env bash set -e # # Add additional machine type and region informations # source "00_config.sh" for MY_SERIES in ../instances/series/*.sql; do echo "$MY_SERIES" sqlite3 "$DB" < "$MY_SERIES" done echo "Add carbon data across GCP regions" sqlite3 "$DB" < ../regions/carbon.sql echo "Add long location name, latitude and longitude of GCP regions" sqlite3 "$DB" < ../regions/regions.sql echo "Add extra data for GCP regions" sqlite3 "$DB" < ../regions/extra.sql echo "Add country names of GCP regions" sqlite3 "$DB" < ../regions/country.sql ================================================ FILE: build/08_cpu.pl ================================================ #!/usr/bin/env perl # Copyright 2022 Nils Knieling. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Check available CPU platforms per instance in region and update machine type # use utf8; binmode(STDOUT, ':encoding(utf8)'); use strict; use DBI; use Data::Dumper; my $db_file = 'gce.db'; # Open DB my $db = DBI->connect("dbi:SQLite:dbname=$db_file","","") or die "ERROR: Cannot connect $DBI::errstr\n"; print "\nZones\n"; my $select_zones = "SELECT name, availableCpuPlatforms FROM zones ORDER BY name"; my $sth = $db->prepare($select_zones); $sth->execute; $sth->bind_columns ( \my ($zone, $availableCpuPlatforms) ); my $cpuPlatforms = {}; # all CPU platforms my $availableCpuPlatformsInRegion = {}; # available CPU platforms in region while ($sth->fetch) { print "$zone\n"; my @zone_parts = split(/-/, $zone); my $location = "$zone_parts[0]"; my $region = "$zone_parts[0]-$zone_parts[1]"; # Store CPU platform in Perl Hash reference foreach my $cpu (split(',', $availableCpuPlatforms)) { $availableCpuPlatformsInRegion->{"$region"}->{"$cpu"} = '1'; $cpuPlatforms->{"$cpu"} = '1'; } } print "\nMachine types\n"; my $select_instances = "SELECT name, region, cpuPlatform FROM instances"; my $sth = $db->prepare($select_instances); $sth->execute; $sth->bind_columns ( \my ($name, $region, $cpuPlatform) ); my %unknown_cpuPlatform = (); while ($sth->fetch) { print "$name, $region\n"; my @cpuPlatformsInRegion = (); # available CPU platforms for machine type in the region, cross-checked with the available CPU platforms in the zones. my @cpuPlatformsForInstance = (); # CPU platforms for machine type foreach my $instance_cpuPlatform (sort split(',', $cpuPlatform)) { print "\t$instance_cpuPlatform"; # Check if the CPU platform of the instance is known my $found = 0; foreach my $cpu (keys %{$cpuPlatforms}) { if ($cpu =~ m/$instance_cpuPlatform/i) { $found = '1'; push (@cpuPlatformsForInstance, $cpu); # Store longer name } } if ($found) { print " [found]"; # Check if CPU platform for this machine type is available in the region foreach my $cpu (keys %{$availableCpuPlatformsInRegion->{"$region"}}) { if ($cpu =~ m/$instance_cpuPlatform/i) { print " [available]"; push (@cpuPlatformsInRegion, $cpu); } } } else { print " [unknown]"; $unknown_cpuPlatform{"$instance_cpuPlatform"} = '1'; } print "\n"; } # CPU platform for machine type my $update_cpuPlatformCount = scalar @cpuPlatformsForInstance; my $update_cpuPlatform = join(', ', sort @cpuPlatformsForInstance); # CPU platform for machine type and available in region my $update_availableCpuPlatformCount = scalar @cpuPlatformsInRegion; my $update_availableCpuPlatform = join(', ', sort @cpuPlatformsInRegion); # Set Intel and AMD my $intel = '0'; $intel = '1' if ($update_availableCpuPlatform =~ m/intel/i ); my $amd = '0'; $amd = '1' if ($update_availableCpuPlatform =~ m/amd/i ); my $arm = '0'; $arm = '1' if ($update_availableCpuPlatform =~ m/ampere/i ); $arm = '1' if ($update_availableCpuPlatform =~ m/axion/i ); my $update = qq ~ UPDATE instances SET intel = '$intel', amd = '$amd', arm = '$arm', cpuPlatformCount = '$update_cpuPlatformCount', cpuPlatform = '$update_cpuPlatform', availableCpuPlatformCount = '$update_availableCpuPlatformCount', availableCpuPlatform = '$update_availableCpuPlatform' WHERE name LIKE '$name' AND region LIKE '$region' ~; $db->do($update) or die "ERROR: Cannot update available CPU platform for instance in region $DBI::errstr\n"; } if (keys %unknown_cpuPlatform) { print "Unknown CPU platforms:\n"; foreach my $cpu (keys %unknown_cpuPlatform) { print "\t $cpu\n"; } die "Please check and fix!\n"; } print "\nClean up unavailable CPU platforms\n"; my $select_not_available = "SELECT name, region FROM instances WHERE availableCpuPlatformCount == '0'"; my $sth = $db->prepare($select_not_available); $sth->execute; $sth->bind_columns ( \my ($name, $region) ); my $unavailable = 0; while ($sth->fetch) { print "$name, $region\n"; $unavailable++; } $db->do("DELETE FROM instances WHERE availableCpuPlatformCount == '0'") or die "ERROR: Cannot clean up unavailable CPU platforms $DBI::errstr\n"; if ($unavailable) { print "Unavailable CPU platforms for machine type in region: $unavailable\n"; } print "DONE\n"; ================================================ FILE: build/08_publicipranges.pl ================================================ #!/usr/bin/env perl # Copyright 2022 Nils Knieling. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Calculate public IP addresses # Thank you PatMyron: https://github.com/PatMyron/cloud/issues/11#issuecomment-922591282 # use utf8; binmode(STDOUT, ':encoding(utf8)'); use strict; use JSON::XS; open(FH, "publicipranges.json") or die "JSON file 'publicipranges.json' can't be opened"; my $json = ""; while(){ $json .= $_; } close(FH); my $publicipranges = JSON::XS->new->utf8->decode($json); my %regions; my $total = "0"; foreach my $prefix (sort @{$publicipranges->{'prefixes'}}) { my $name = $prefix->{'scope'}; if ($prefix->{'ipv4Prefix'} =~ /\/(\d+)$/) { my $mask = $1; my $ipv4 = 2**(32-$mask); $regions{$name} += $ipv4; $total += $ipv4; } } foreach my $region (sort keys %regions) { my $ipv4 = $regions{$region} || "0.0"; print "UPDATE instances SET regionPublicIpv4Addr = '$ipv4' WHERE region LIKE '$region';\n"; } ================================================ FILE: build/08_publicipranges.sh ================================================ #!/usr/bin/env bash set -e # # Add number of public IP addresses for each GCP region # source "00_config.sh" echo "Get public IP ranges" curl -o "publicipranges.json" "https://www.gstatic.com/ipranges/cloud.json" echo "Calculate public IP addresses" perl "08_publicipranges.pl" > "publicipaddresses.sql" echo "Add number of public IP addresses for each GCP region" sqlite3 "$DB" < "publicipaddresses.sql" ================================================ FILE: build/09_more.sh ================================================ #!/usr/bin/env bash set -e # # Add more machine type informations # source "00_config.sh" echo "Frequency (GHz)" sqlite3 "$DB" < "../instances/series/cpu/frequency.sql" echo "EEMBC CoreMark Benchmark" sqlite3 "$DB" < "../instances/series/cpu/coremark.sql" echo "GPU Type Names" sqlite3 "$DB" < "../instances/series/gpu/gpu_names.sql" echo "SAP certified machine types" sqlite3 "$DB" < "../instances/series/sap/sap.sql" echo "SAP HANA certified machine types" sqlite3 "$DB" < "../instances/series/sap/hana.sql" ================================================ FILE: build/10_export.sh ================================================ #!/usr/bin/env bash set -e # # Export CSV and SQL file # source "00_config.sh" echo "» SQL Export" { echo 'DROP TABLE IF EXISTS "instances";' sqlite3 "$DB" '.dump instances' echo 'DROP TABLE IF EXISTS "disks";' sqlite3 "$DB" '.dump disks' echo 'DROP TABLE IF EXISTS "images";' sqlite3 "$DB" '.dump images' } > "$SQL_EXPORT" gzip -fk "$SQL_EXPORT" echo "» CSV Export" sqlite3 \ -header \ -csv "$DB" "SELECT * FROM instances ORDER BY region, name;" > "$CSV_EXPORT" ================================================ FILE: build/11_test.sh ================================================ #!/usr/bin/env bash set -e # # Test # source "00_config.sh" # Check TODOs if grep 'TODO' < "$CSV_EXPORT"; then echo "ERROR: There are still TODOs" exit 9 fi # Check costs # n2-standard-8 in europe-west4 with SUD : 249 if ! cat "$CSV_EXPORT" | grep 'n2-standard-8,' | grep 'europe-west4,' | head -n 1 | grep ',249' > /dev/null; then echo "ERROR: n2-standard-8 in europe-west4 with cost 249 not found" exit 9 fi echo "DONE" ================================================ FILE: build/README.md ================================================ # Build Ready to tweak and test this webapp locally? Follow these instructions: ## Requirements * [Google Cloud CLI](https://cloud.google.com/sdk/docs/install) (`gcloud`) * SQLite3 (`sqlite3`) * Perl 5 (`perl`) * Perl modules: * [App::Options](https://metacpan.org/pod/App::Options) * [Encode](https://metacpan.org/pod/Encode) * [YAML::XS](https://metacpan.org/pod/YAML::XS) (and `libyaml`) * [JSON::XS](https://metacpan.org/pod/JSON::XS) * [DBD::CSV](https://metacpan.org/pod/DBD::CSV) * [DBD::SQLite](https://metacpan.org/pod/DBD::SQLite) * [Template::Toolkit](https://metacpan.org/pod/Template::Toolkit) * [plackup](https://metacpan.org/dist/Plack/view/script/plackup)
Debian/Ubuntu Packages: ```shell sudo apt update sudo apt install \ libapp-options-perl \ libdbd-csv-perl \ libdbd-sqlite3-perl \ libencode-perl \ libjson-xs-perl \ libplack-perl \ libtemplate-perl \ libyaml-libyaml-perl \ sqlite3 ``` [Google Cloud CLI](https://cloud.google.com/sdk/docs/install#deb): ```shell sudo apt-get install apt-transport-https ca-certificates gnupg # Add the gcloud CLI distribution URI as a package source 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 # Import the Google Cloud public key. curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo tee /usr/share/keyrings/cloud.google.gpg # Update and install the gcloud CLI sudo apt-get update sudo apt-get install google-cloud-cli ```
macOS Homebrew packages: ```shell brew install perl brew install cpanminus pkg-config brew install sqlite3 brew install --cask google-cloud-sdk ``` Perl modules: ```shell cpanm --installdeps . ```
## Database Run: ```shell bash build.sh ``` 1. Create SQLite3 database `gce.db` for GCE machine type informations 1. Export all Google Compute Engine machine types ans zones via the Google Compute Engine API to CSV file `machinetypes.csv` and `zones.csv` 1. Copy machine types ans zones from CSV file to SQLite database `gce.db` table `machinetypes` and `zones` 1. Clean up (Remove disconnected data centers...) 1. Copy machine types per region to database table `instances` and disk types per region to table `disks` 1. Add costs for machine types in region from [pricing](https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator) 7. Add [additional machine type informations](../instances/series/) 1. Add CPU platforms and IP addresses 1. Add available CPU platforms per instance in region 1. Add number of public IP addresses for each GCP region 1. Add even more * Frequency (GHz) * EEMBC CoreMark Benchmark * SAP and HANA certified machine types 1. Export CSV and SQL file 1. Test ## Websites Create: ```shell perl site.pl ``` No regions and comparison: ```shell perl site.pl \ --comparison=0 \ --region=0 ``` Only `g1-small` and `europe-west4`: ```shell perl site.pl \ --comparison=1 \ --limit_comparison=g1-small \ --region=1 \ --limit_region=europe-west4 ``` This Perl script creates static websites (Templates are located in the [src](./src/) folder). The websites are stored in the directory `../site/`. The JavaScript grid library [AG Grid Community](https://www.ag-grid.com/) is used. Run: ```bash plackup --host "127.0.0.1" --port "8080" ``` ================================================ FILE: build/app.psgi ================================================ #!/usr/bin/env perl use strict; use warnings; use Plack::App::Directory; my $app = Plack::App::Directory->new({ root => "../site/" })->to_app; ================================================ FILE: build/build.sh ================================================ #!/usr/bin/env bash set -e echo "1. Create" bash "01_create_database.sh" echo "2. Get" bash "02_get.sh" echo "3. Copy" perl "03_copy.pl" echo "4. Clean up" bash "04_clean_up.sh" echo "5. Copy instances and disks" perl "05_copy_instances.pl" perl "05_copy_disks.pl" echo "6. Add costs" perl "06_add_costs.pl" echo "7. Add informations" bash "07_add.sh" echo "8.1. Add available CPU platforms" perl "08_cpu.pl" echo "8.2. Add number of public IP addresses" bash "08_publicipranges.sh" echo "9. Add more" bash "09_more.sh" echo "10. Export" bash "10_export.sh" echo "11. Test" bash "11_test.sh" ================================================ FILE: build/cpanfile ================================================ # Check version with 'cpan -D DBD::SQLite' recommends 'perl', '5.34'; requires 'App::Options', '1.12'; requires 'Encode', '3.16'; requires 'JSON::XS', '4.03'; requires 'YAML::XS', '0.83'; requires 'DBD::CSV', '0.58'; requires 'DBD::SQLite', '1.70'; requires 'Template::Toolkit', '3.1'; requires 'Plack', '1.0048'; ================================================ FILE: build/site.pl ================================================ #!/usr/bin/env perl # Copyright 2022-2026 Nils Knieling. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Create static website with all GCE machines in regions # use utf8; binmode(STDOUT, ':encoding(utf8)'); use strict; use DBI; use Encode qw(decode); use JSON::XS; use Template; use File::Copy; use App::Options ( option => { region => { required => '1', default => '1', description => "Create instance in region websites (/:REGION/:INSTANCE.html)" }, limit_region => { required => '0', default => '', description => "Create websites only for this region" }, comparison => { required => '1', default => '1', description => "Create instance comparison websites (/comparison/:INSTANCE/vs/:INSTANCE.html)" }, limit_comparison => { required => '0', default => '', description => "Create comparison websites only for this machine type" }, site_folder => { required => '0', default => '../site/', description => "Site storage folder path" }, }, ); my $create_region = $App::options{region}; my $limit_region = $App::options{limit_region}; my $create_comparison = $App::options{comparison}; my $limit_comparison = $App::options{limit_comparison}; my $site_folder = $App::options{site_folder}; # Ensure site_folder ends with a slash $site_folder .= '/' unless $site_folder =~ /\/$/; my $db_file = 'gce.db'; my $gmtime = gmtime(); my $timestamp = time(); # Exports my $csv_export = 'machine-types-regions.csv'; my $sql_export = 'machine-types-regions.sql.gz'; my $filesize_csv_export = -s "$csv_export" || die "ERROR: Cannot get CSV '$csv_export' filesize!\n"; my $filesize_sql_export = -s "$sql_export" || die "ERROR: Cannot get SQL '$sql_export' filesize!\n"; # MiB $filesize_csv_export = sprintf '%.2f', $filesize_csv_export / 1048576; $filesize_sql_export = sprintf '%.2f', $filesize_sql_export / 1048576; print "Create websites...\n"; my $dbh = DBI->connect("dbi:SQLite:dbname=$db_file","","") or die "ERROR: Cannot connect $DBI::errstr\n"; my $template = Template->new( INCLUDE_PATH => './src', PRE_PROCESS => 'config.tt2', VARIABLES => { 'gmtime' => $gmtime, 'timestamp' => $timestamp, } ); my @files = (); ############################################################################### # INSTANCES ############################################################################### my $sql_instances = qq ~ SELECT UPPER(series) AS series, name, description, family, vCpus, LOWER(sharedCpu) AS sharedCpu, MAX(intel) AS intel, MAX(amd) AS amd, MAX(arm) AS arm, MAX(cpuPlatformCount) AS cpuPlatformCount, (SELECT cpuPlatform FROM instances WHERE name = I.name ORDER BY cpuPlatformCount) AS cpuPlatform, MAX(cpuBaseClock) AS cpuBaseClock, MAX(cpuTurboClock) AS cpuTurboClock, MAX(cpuSingleMaxTurboClock) AS cpuSingleMaxTurboClock, MAX(coremarkScore) AS coremarkScore, MAX(standardDeviation) AS standardDeviation, MAX(sampleCount) AS sampleCount, memoryGB, bandwidth, tier1, disks, disksSizeGb/1024 AS diskSizeTiB, localSsd, acceleratorCount, acceleratorType, MAX(sap) AS sap, MAX(saps) AS saps, MAX(hana) AS hana, MAX(spot) AS spot, COUNT(region) AS regionCount, (SELECT GROUP_CONCAT(region) FROM instances WHERE name = I.name ORDER BY region) AS regions, MAX(sud) AS sud, ROUND(MIN(hour), 4) AS minHour, ROUND(AVG(hour), 4) AS avgHour, ROUND(MAX(hour), 4) AS maxHour, ROUND(MIN(hourSpot), 4) AS minHourSpot, ROUND(AVG(hourSpot), 4) AS avgHourSpot, ROUND(MAX(hourSpot), 4) AS maxHourSpot, ROUND(MIN(month), 2) AS minMonth, ROUND(AVG(month), 2) AS avgMonth, ROUND(MAX(month), 2) AS maxMonth, ROUND(MIN(month1yCud), 2) AS minMonth1yCud, ROUND(AVG(month1yCud), 2) AS avgMonth1yCud, ROUND(MAX(month1yCud), 2) AS maxMonth1yCud, ROUND(MIN(month3yCud), 2) AS minMonth3yCud, ROUND(AVG(month3yCud), 2) AS avgMonth3yCud, ROUND(MAX(month3yCud), 2) AS maxMonth3yCud, ROUND(MIN(monthSpot), 2) AS minMonthSpot, ROUND(AVG(monthSpot), 2) AS avgMonthSpot, ROUND(MAX(monthSpot), 2) AS maxMonthSpot, ROUND(monthSles, 2) AS monthSles, ROUND(monthSlesSap, 2) AS monthSlesSap, ROUND(monthSlesSap1yCud, 2) AS monthSlesSap1yCud, ROUND(monthSlesSap3yCud, 2) AS monthSlesSap3yCud, ROUND(monthRhel, 2) AS monthRhel, ROUND(monthRhel1yCud, 2) AS monthRhel1yCud, ROUND(monthRhel3yCud, 2) AS monthRhel3yCud, ROUND(monthRhelSap, 2) AS monthRhelSap, ROUND(monthRhelSap1yCud, 2) AS monthRhelSap1yCud, ROUND(monthRhelSap3yCud, 2) AS monthRhelSap3yCud, ROUND(monthWindows, 2) AS monthWindows FROM instances I GROUP BY name ORDER BY vCpus, name; ~; my $sth = $dbh->prepare($sql_instances); $sth->execute(); my @instances = (); my $id = '1'; while (my $instance = $sth->fetchrow_hashref) { $instance->{'id'} = $id; push(@instances, $instance); $id++; } $sth->finish; push(@files, 'instances.html'); $template->process('instances.tt2', { 'instances' => \@instances }, "${site_folder}instances.html") || die "Template process failed: ", $template->error(), "\n"; # CPU push(@files, 'intel.html'); $template->process('intel.tt2', { 'instances' => \@instances }, "${site_folder}intel.html") || die "Template process failed: ", $template->error(), "\n"; push(@files, 'amd.html'); $template->process('amd.tt2', { 'instances' => \@instances }, "${site_folder}amd.html") || die "Template process failed: ", $template->error(), "\n"; push(@files, 'arm.html'); $template->process('arm.tt2', { 'instances' => \@instances }, "${site_folder}arm.html") || die "Template process failed: ", $template->error(), "\n"; push(@files, 'gpu.html'); $template->process('gpu.tt2', { 'instances' => \@instances }, "${site_folder}gpu.html") || die "Template process failed: ", $template->error(), "\n"; # SAP push(@files, 'sap.html'); $template->process('sap.tt2', { 'instances' => \@instances }, "${site_folder}sap.html") || die "Template process failed: ", $template->error(), "\n"; push(@files, 'hana.html'); $template->process('hana.tt2', { 'instances' => \@instances }, "${site_folder}hana.html") || die "Template process failed: ", $template->error(), "\n"; ############################################################################### # DISKS ############################################################################### my $sql_disks = qq ~ SELECT name, description, COUNT(region) AS regionCount, ROUND(MIN(monthGb), 2) AS minMonth, ROUND(AVG(monthGb), 2) AS avgMonth, ROUND(MAX(monthGb), 2) AS maxMonth FROM disks D GROUP BY name ORDER BY name; ~; $sth = $dbh->prepare($sql_disks); $sth->execute(); my @disks = (); $id = '1'; while (my $disk = $sth->fetchrow_hashref) { $disk->{'id'} = $id; push(@disks, $disk); $id++; } $sth->finish; push(@files, 'disks.html'); $template->process('disks.tt2', { 'disks' => \@disks }, "${site_folder}disks.html") || die "Template process failed: ", $template->error(), "\n"; $template->process('disks.js', {}, "${site_folder}disks.js") || die "Template process failed: ", $template->error(), "\n"; ############################################################################### # DISKS in REGIONS ############################################################################### my $sql_disks_regions = qq ~ SELECT region AS name, regionLocation AS regionLocation, MAX(zoneCount) AS zoneCount, (SELECT ROUND(MAX(monthGb), 3) FROM disks WHERE region = D.region AND name = "local-ssd") AS local, (SELECT ROUND(MAX(monthGb), 3) FROM disks WHERE region = D.region AND name = "pd-balanced") AS balanced, (SELECT ROUND(MAX(monthGb), 3) FROM disks WHERE region = D.region AND name = "pd-extreme") AS extreme, (SELECT ROUND(MAX(monthGb), 3) FROM disks WHERE region = D.region AND name = "pd-ssd") AS ssd, (SELECT ROUND(MAX(monthGb), 3) FROM disks WHERE region = D.region AND name = "pd-standard") AS standard FROM disks D GROUP BY region ORDER BY region; ~; $sth = $dbh->prepare($sql_disks_regions); $sth->execute(); my @disks_regions = (); while (my $region = $sth->fetchrow_hashref) { push(@disks_regions, $region); } $sth->finish; # Regions push(@files, 'diskpricing.html'); $template->process('diskpricing.tt2', { 'disks_regions' => \@disks_regions }, "${site_folder}diskpricing.html") || die "Template process failed: ", $template->error(), "\n"; ############################################################################### # REGIONS ############################################################################### my $sql_regions = qq ~ SELECT region AS name, regionLocation AS regionLocation, regionLocationLong AS regionLocationLong, regionLocationCountryCode AS regionLocationCountryCode, regionCfe AS regionCfe, regionCo2Kwh AS regionCo2Kwh, regionLowCo2 AS regionLowCo2, regionLat AS regionLat, regionLng AS regionLng, MAX(regionPublicIpv4Addr) AS regionPublicIpv4Addr, MAX(zoneCount) AS zoneCount, (SELECT COUNT(name) FROM instances WHERE region = I.region AND availableCpuPlatform LIKE "%Haswell%") AS intelHaswell, (SELECT COUNT(name) FROM instances WHERE region = I.region AND availableCpuPlatform LIKE "%Broadwell%") AS intelBroadwell, (SELECT COUNT(name) FROM instances WHERE region = I.region AND availableCpuPlatform LIKE "%Skylake%") AS intelSkylake, (SELECT COUNT(name) FROM instances WHERE region = I.region AND availableCpuPlatform LIKE "%Cascade Lake%") AS intelCascadeLake, (SELECT COUNT(name) FROM instances WHERE region = I.region AND availableCpuPlatform LIKE "%Ice Lake%") AS intelIceLake, (SELECT COUNT(name) FROM instances WHERE region = I.region AND availableCpuPlatform LIKE "%Sapphire%") AS intelSapphireRapids, (SELECT COUNT(name) FROM instances WHERE region = I.region AND availableCpuPlatform LIKE "%Emerald%") AS intelEmeraldRapids, (SELECT COUNT(name) FROM instances WHERE region = I.region AND availableCpuPlatform LIKE "%Granite%") AS intelGraniteRapids, (SELECT COUNT(name) FROM instances WHERE region = I.region AND availableCpuPlatform LIKE "%Rome%") AS amdRome, (SELECT COUNT(name) FROM instances WHERE region = I.region AND availableCpuPlatform LIKE "%Milan%") AS amdMilan, (SELECT COUNT(name) FROM instances WHERE region = I.region AND availableCpuPlatform LIKE "%Genoa%") AS amdGenoa, (SELECT COUNT(name) FROM instances WHERE region = I.region AND availableCpuPlatform LIKE "%Turin%") AS amdTurin, (SELECT COUNT(name) FROM instances WHERE region = I.region AND availableCpuPlatform LIKE "%Altra%") AS armAmpereAltra, (SELECT COUNT(name) FROM instances WHERE region = I.region AND availableCpuPlatform LIKE "%Axion%") AS armGoogleAxion, (SELECT COUNT(name) FROM instances WHERE region = I.region AND family LIKE "%General%") AS generalCount, (SELECT COUNT(name) FROM instances WHERE region = I.region AND family LIKE "%Compute%") AS computeCount, (SELECT COUNT(name) FROM instances WHERE region = I.region AND family LIKE "%Memory%") AS memoryCount, (SELECT COUNT(name) FROM instances WHERE region = I.region AND family LIKE "%Accelerator%") AS acceleratorCount, (SELECT COUNT(name) FROM instances WHERE region = I.region AND family LIKE "%Storage%") AS storageCount, (SELECT COUNT(name) FROM instances WHERE region = I.region AND sap >= 1) AS sap, (SELECT COUNT(name) FROM instances WHERE region = I.region AND hana >= 1) AS hana, (SELECT ROUND(MIN(hour), 4) FROM instances WHERE region = I.region AND name LIKE "e2-standard-8") AS e2Standard8Hour, (SELECT ROUND(MIN(month), 2) FROM instances WHERE region = I.region AND name LIKE "e2-standard-8") AS e2Standard8Month FROM instances I GROUP BY region ORDER BY region; ~; $sth = $dbh->prepare($sql_regions); $sth->execute(); my @regions = (); $id = '1'; while (my $region = $sth->fetchrow_hashref) { $region->{'id'} = $id; push(@regions, $region); $id++; } $sth->finish; # Regions push(@files, 'regions.html'); $template->process('regions.tt2', { 'regions' => \@regions }, "${site_folder}regions.html") || die "Template process failed: ", $template->error(), "\n"; # Map with regions push(@files, 'map.html'); $template->process('map.tt2', { 'regions' => \@regions }, "${site_folder}map.html") || die "Template process failed: ", $template->error(), "\n"; # CPU platforms in regions push(@files, 'platforms.html'); $template->process('platforms.tt2', { 'regions' => \@regions }, "${site_folder}platforms.html") || die "Template process failed: ", $template->error(), "\n"; ############################################################################### # REGION ############################################################################### # Instances in Region foreach my $region (@regions) { my $name = $region->{'name'} || 'missing'; # Instances my $sql_instances_in_region = qq ~ SELECT UPPER(series) AS series, name, description, family, vCpus, LOWER(sharedCpu) AS sharedCpu, intel, amd, arm, availableCpuPlatformCount, cpuPlatformCount, cpuBaseClock, cpuTurboClock, cpuSingleMaxTurboClock, memoryGB, sap, saps, hana, zoneCount, sud, ROUND(hour, 4) AS hour, ROUND(hourSpot, 4) AS hourSpot, ROUND(month, 2) AS month, ROUND(month1yCud, 2) AS month1yCud, ROUND(month3yCud, 2) AS month3yCud, ROUND(monthSpot, 2) AS monthSpot, ROUND(monthSles, 2) AS monthSles, ROUND(monthSlesSap, 2) AS monthSlesSap, ROUND(monthSlesSap1yCud, 2) AS monthSlesSap1yCud, ROUND(monthSlesSap3yCud, 2) AS monthSlesSap3yCud, ROUND(monthRhel, 2) AS monthRhel, ROUND(monthRhel1yCud, 2) AS monthRhel1yCud, ROUND(monthRhel3yCud, 2) AS monthRhel3yCud, ROUND(monthRhelSap, 2) AS monthRhelSap, ROUND(monthRhelSap1yCud, 2) AS monthRhelSap1yCud, ROUND(monthRhelSap3yCud, 2) AS monthRhelSap3yCud, ROUND(monthWindows, 2) AS monthWindows FROM instances WHERE region LIKE '$name' ORDER BY vCpus, name; ~; $sth = $dbh->prepare($sql_instances_in_region); $sth->execute(); my @instances_in_region = (); $id = '1'; while (my $instance = $sth->fetchrow_hashref) { $instance->{'id'} = $id; push(@instances_in_region, $instance); $id++; } # Disks my $sql_disks_in_region = qq ~ SELECT name, description, zoneCount, monthGb FROM disks WHERE region LIKE '$name' ORDER BY name; ~; $sth = $dbh->prepare($sql_disks_in_region); $sth->execute(); my @disks_in_region = (); $id = '1'; while (my $disk = $sth->fetchrow_hashref) { $disk->{'id'} = $id; push(@disks_in_region, $disk); $id++; } my $html_file = "${site_folder}$name.html"; print "$html_file\n"; push(@files, "$name".'.html'); $template->process('region.tt2', { 'region' => $region, 'regions' => \@regions, 'instances' => \@instances, 'disks_in_region' => \@disks_in_region, 'instances_in_region' => \@instances_in_region }, "$html_file") || die "Template process failed: ", $template->error(), "\n"; } ############################################################################### # INSTANCE ############################################################################### # Instance in Regions foreach my $instance (@instances) { my $name = $instance->{'name'} || 'missing'; my $sql_instance_regions = qq ~ SELECT region AS name, regionLocation AS regionLocation, regionCfe AS regionCfe, regionCo2Kwh AS regionCo2Kwh, regionLowCo2 AS regionLowCo2, zoneCount AS zoneCount, availableCpuPlatformCount AS availableCpuPlatformCount, ROUND(hour, 4) AS hour, ROUND(hourSpot, 4) AS hourSpot, ROUND(month, 2) AS month, ROUND(month1yCud, 2) AS month1yCud, ROUND(month3yCud, 2) AS month3yCud, ROUND(monthSpot, 2) AS monthSpot, ROUND(monthSles, 2) AS monthSles, ROUND(monthSlesSap, 2) AS monthSlesSap, ROUND(monthSlesSap1yCud, 2) AS monthSlesSap1yCud, ROUND(monthSlesSap3yCud, 2) AS monthSlesSap3yCud, ROUND(monthRhel, 2) AS monthRhel, ROUND(monthRhel1yCud, 2) AS monthRhel1yCud, ROUND(monthRhel3yCud, 2) AS monthRhel3yCud, ROUND(monthRhelSap, 2) AS monthRhelSap, ROUND(monthRhelSap1yCud, 2) AS monthRhelSap1yCud, ROUND(monthRhelSap3yCud, 2) AS monthRhelSap3yCud, ROUND(monthWindows, 2) AS monthWindows FROM instances WHERE name LIKE '$name' ORDER BY hour, region; ~; $sth = $dbh->prepare($sql_instance_regions); $sth->execute(); my @instance_regions = (); $id = '1'; while (my $region = $sth->fetchrow_hashref) { $region->{'id'} = $id; push(@instance_regions, $region); $id++; } $sth->finish; my $html_file = "${site_folder}$name.html"; print "$html_file\n"; push(@files, "$name".'.html'); $template->process('instance.tt2', { 'instance' => $instance, 'instances' => \@instances, 'regions' => \@instance_regions }, "$html_file") || die "Template process failed: ", $template->error(), "\n"; } ############################################################################### # DISK ############################################################################### # Disk in Regions foreach my $disk (@disks) { my $name = $disk->{'name'} || 'missing'; my $sql_disk_regions = qq ~ SELECT region AS name, regionLocation AS regionLocation, zoneCount AS zoneCount, monthGb FROM disks WHERE name LIKE '$name' ORDER BY monthGb, region; ~; $sth = $dbh->prepare($sql_disk_regions); $sth->execute(); my @disk_regions = (); $id = '1'; while (my $region = $sth->fetchrow_hashref) { $region->{'id'} = $id; push(@disk_regions, $region); $id++; } $sth->finish; my $html_file = "${site_folder}$name.html"; print "$html_file\n"; push(@files, "$name".'.html'); $template->process('disk.tt2', { 'disk' => $disk, 'regions' => \@disk_regions }, "$html_file") || die "Template process failed: ", $template->error(), "\n"; } ############################################################################### # INSTANCE in REGION ############################################################################### # Zones my $sql_zones = "SELECT name, availableCpuPlatforms FROM zones ORDER BY name"; $sth = $dbh->prepare($sql_zones); $sth->execute(); my @zones = (); $id = '1'; while (my $zone = $sth->fetchrow_hashref) { $zone->{'id'} = $id; push(@zones, $zone); $id++; } $sth->finish; # Instance in Region my $sql_instance_in_region = qq ~ SELECT UPPER(series) AS series, name, description, family, vCpus, LOWER(sharedCpu) AS sharedCpu, cpuPlatform, cpuPlatformCount, intel, amd, arm, availableCpuPlatform, availableCpuPlatformCount, (cpuPlatformCount - availableCpuPlatformCount) AS notAvailableCpuPlatformCount, cpuBaseClock, cpuTurboClock, cpuSingleMaxTurboClock, ROUND(coremarkScore, 0) AS coremarkScore, ROUND(standardDeviation, 0) AS standardDeviation, ROUND(sampleCount, 0) AS sampleCount, memoryGB, bandwidth, tier1, disks, disksSizeGb/1024 AS diskSizeTiB, localSsd, ROUND(acceleratorCount, 0) AS acceleratorCount, acceleratorType, sap, saps, hana, spot, region, regionLocation, regionLocationLong, regionLocationCountryCode, regionCfe, regionCo2Kwh, regionLowCo2, regionLat, regionLng, zoneCount, zones, sud, ROUND(hour, 4) AS hour, ROUND(hourSpot, 4) AS hourSpot, ROUND(month, 2) AS month, ROUND(month1yCud, 2) AS month1yCud, ROUND(month3yCud, 2) AS month3yCud, ROUND(monthSpot, 2) AS monthSpot, ROUND(monthSles, 2) AS monthSles, ROUND(monthSlesSap, 2) AS monthSlesSap, ROUND(monthSlesSap1yCud, 2) AS monthSlesSap1yCud, ROUND(monthSlesSap3yCud, 2) AS monthSlesSap3yCud, ROUND(monthRhel, 2) AS monthRhel, ROUND(monthRhel1yCud, 2) AS monthRhel1yCud, ROUND(monthRhel3yCud, 2) AS monthRhel3yCud, ROUND(monthRhelSap, 2) AS monthRhelSap, ROUND(monthRhelSap1yCud, 2) AS monthRhelSap1yCud, ROUND(monthRhelSap3yCud, 2) AS monthRhelSap3yCud, ROUND(monthWindows, 2) AS monthWindows, ROUND(coremarkScore/hour, 0) AS coremarkHour, ROUND(coremarkScore/hourSpot, 0) AS coremarkHourSpot, ROUND(saps/hour, 0) AS sapsHour FROM instances ORDER BY name, region; ~; my $sth = $dbh->prepare($sql_instance_in_region); $sth->execute(); my @instances_in_regions = (); my $id = '1'; while (my $instance = $sth->fetchrow_hashref) { my $name = $instance->{'name'} || 'missing'; my $region = $instance->{'region'} || 'missing'; next if ($limit_region && $limit_region ne "$region"); # skip region if limit is set $instance->{'id'} = $id; push(@instances_in_regions, $instance); if ($create_region) { my $html_file = "${site_folder}$region/$name.html"; print "$id : $html_file\n"; $template->process('instance_in_region.tt2', { 'instance' => $instance, 'regions' => \@regions, 'zones' => \@zones, }, "$html_file") || die "Template process failed: ", $template->error(), "\n"; } $id++; } $sth->finish; ############################################################################### # COMPARISON ############################################################################### if ($create_comparison) { my $id = '1'; foreach my $instance_a (@instances) { my $name_a = $instance_a->{'name'} || 'missing'; next if ($limit_comparison && $name_a ne "$limit_comparison"); $template->process('vs.tt2', { 'instance_a' => $instance_a, 'instances' => \@instances }, "${site_folder}comparison/$name_a/vs.html") || die "Template process failed: ", $template->error(), "\n"; foreach my $instance_b (@instances) { my $name_b = $instance_b->{'name'} || 'missing'; next if ($name_a eq $name_b); # Costs in regions for instance A my $sql_regions_for_a = qq ~ SELECT region AS region, regionLocation AS regionLocation, regionCfe AS regionCfe, regionCo2Kwh AS regionCo2Kwh, regionLowCo2 AS regionLowCo2, zoneCount AS zoneCount, availableCpuPlatformCount AS availableCpuPlatformCount, ROUND(hour, 4) AS hour, ROUND(hourSpot, 4) AS hourSpot, ROUND(month, 2) AS month, ROUND(month1yCud, 2) AS month1yCud, ROUND(month3yCud, 2) AS month3yCud, ROUND(monthSpot, 2) AS monthSpot FROM instances WHERE name LIKE '$name_a' ORDER BY region; ~; $sth = $dbh->prepare($sql_regions_for_a); $sth->execute(); my @regions_a = (); while (my $region = $sth->fetchrow_hashref) { push(@regions_a, $region); } $sth->finish; # Costs in regions for instance B my $sql_regions_for_b = qq ~ SELECT region AS region, regionLocation AS regionLocation, regionCfe AS regionCfe, regionCo2Kwh AS regionCo2Kwh, regionLowCo2 AS regionLowCo2, zoneCount AS zoneCount, availableCpuPlatformCount AS availableCpuPlatformCount, ROUND(hour, 4) AS hour, ROUND(hourSpot, 4) AS hourSpot, ROUND(month, 2) AS month, ROUND(month1yCud, 2) AS month1yCud, ROUND(month3yCud, 2) AS month3yCud, ROUND(monthSpot, 2) AS monthSpot FROM instances WHERE name LIKE '$name_b' ORDER BY region; ~; $sth = $dbh->prepare($sql_regions_for_b); $sth->execute(); my @regions_b = (); while (my $region = $sth->fetchrow_hashref) { push(@regions_b, $region); } $sth->finish; my $html_file = "${site_folder}comparison/$name_a/vs/$name_b.html"; print "$id : $html_file\n"; $template->process('comparison.tt2', { 'instances' => \@instances, 'instance_a' => $instance_a, 'instance_b' => $instance_b, 'regions' => \@regions, 'regions_a' => \@regions_a, 'regions_b' => \@regions_b, }, "$html_file") || die "Template process failed: ", $template->error(), "\n"; $id++; } } } ############################################################################### # IMAGES ############################################################################### # Operating system details: https://cloud.google.com/compute/docs/images/os-details $sth = $dbh->prepare("SELECT project AS name, COUNT(name) as imageCount FROM images GROUP BY project ORDER BY project ASC"); $sth->execute(); my @image_projects = (); while (my $image_project = $sth->fetchrow_hashref) { push(@image_projects, $image_project); } $sth->finish; my $sql_image_family = qq ~ SELECT project, family AS name, (SELECT name FROM images WHERE project LIKE I.project AND family LIKE I.family ORDER BY creation DESC LIMIT 1) AS image, (SELECT architecture FROM images WHERE project LIKE I.project AND family LIKE I.family ORDER BY creation DESC LIMIT 1) AS architecture, (SELECT description FROM images WHERE project LIKE I.project AND family LIKE I.family ORDER BY creation DESC LIMIT 1) AS description, (SELECT MAX(diskSizeGb) FROM images WHERE project LIKE I.project AND family LIKE I.family ORDER BY creation DESC LIMIT 1) AS diskSizeGb, (SELECT creation FROM images WHERE project LIKE I.project AND family LIKE I.family ORDER BY creation DESC LIMIT 1) AS creation FROM images I GROUP BY project, family ORDER BY family DESC; ~; $sth = $dbh->prepare($sql_image_family); $sth->execute(); my @image_families = (); while (my $image_family = $sth->fetchrow_hashref) { push(@image_families, $image_family); } $sth->finish; push(@files, 'images.html'); $template->process('images.tt2', { 'image_projects' => \@image_projects, 'image_famlies' => \@image_families }, "${site_folder}images.html") || die "Template process failed: ", $template->error(), "\n"; ############################################################################### # MISC ############################################################################### # Index $template->process('index.tt2', { 'instances' => \@instances, 'disks' => \@disks, 'regions' => \@regions, 'instances_in_regions' => \@instances_in_regions }, "${site_folder}index.html") || die "Template process failed: ", $template->error(), "\n"; # Grid push(@files, 'grid.html'); my $json = encode_json \@instances_in_regions; $json = decode('UTF-8', $json); # force UTF-8 $template->process('main.js', {}, "${site_folder}main.js") || die "Template process failed: ", $template->error(), "\n"; $template->process('grid.tt2', {}, "${site_folder}grid.html") || die "Template process failed: ", $template->error(), "\n"; $template->process('instance_in_region.json', { 'json' => $json }, "${site_folder}instance_in_region.json") || die "Template process failed: ", $template->error(), "\n"; # Download push(@files, 'download.html'); $template->process('download.tt2', { 'csvFileSize' => $filesize_csv_export, 'sqlFileSize' => $filesize_sql_export, }, "${site_folder}download.html") || die "Template process failed: ", $template->error(), "\n"; # gcosts push(@files, 'gcosts.html'); $template->process('gcosts.tt2', {}, "${site_folder}gcosts.html") || die "Template process failed: ", $template->error(), "\n"; # Imprint $template->process('imprint.tt2', {}, "${site_folder}imprint.html") || die "Template process failed: ", $template->error(), "\n"; # 404 $template->process('404.tt2', {}, "${site_folder}404.html") || die "Template process failed: ", $template->error(), "\n"; # Sitemap $template->process('sitemap.tt2', { 'files' => \@files }, "${site_folder}sitemap.txt") || die "Template process failed: ", $template->error(), "\n"; # Robots.txt $template->process('robots.txt', { 'regions' => \@regions }, "${site_folder}robots.txt") || die "Template process failed: ", $template->error(), "\n"; # SQL and CSV Export copy("$sql_export", "${site_folder}machine-types-regions.sql.gz"); copy("$csv_export", "${site_folder}machine-types-regions.csv"); # Images mkdir("${site_folder}img/"); my @images = ( 'combine-filter.png', 'csv.png', 'filter.png', 'gcosts.png', 'show-more.png', 'social.png', 'sort.png', 'usage.png', ); foreach my $image (@images) { copy("./src/img/$image", "${site_folder}img/$image"); } # Favicon my @favicons = ( 'favicon.ico', 'favicon-16x16.png', 'favicon-32x32.png', 'apple-touch-icon.png', 'android-chrome-192x192.png', 'android-chrome-512x512.png', 'site.webmanifest', ); foreach my $favicon (@favicons) { copy("./src/img/favicon/$favicon", "${site_folder}$favicon"); } copy("./src/ads.txt", "${site_folder}ads.txt"); copy("./src/popin-min.js", "${site_folder}popin-min.js"); print "DONE\n"; ================================================ FILE: build/src/404.tt2 ================================================ [%- PROCESS header.tt2 -%]

404 - Page Not Found

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

Start

[% PROCESS footer.tt2 %] ================================================ FILE: build/src/ads.txt ================================================ google.com, pub-7267449040388963, DIRECT, f08c47fec0942fa0 ================================================ FILE: build/src/amd.tt2 ================================================ [%- PROCESS header.tt2 -%] [%- PROCESS instances_header.tt2 -%]

Google Compute Engine Machine Types with AMD CPU Platform

[%- countAmd = 0; FOREACH instance IN instances; IF instance.amd; countAmd = countAmd + 1; END; END -%]

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

✅ Instance Picker with filter on CPU Platform

[%- PROCESS instances_tr.tt2; -%] [%- instancePlatformTh() -%] [%- FOREACH instance IN instances; IF instance.amd; instancePlatformTr(instance); END; END -%]
[% PROCESS footer.tt2 %] ================================================ FILE: build/src/arm.tt2 ================================================ [%- PROCESS header.tt2 -%] [%- PROCESS instances_header.tt2 -%]

Google Compute Engine Machine Types with Arm CPU Platform

[%- countArm = 0; FOREACH instance IN instances; IF instance.arm; countArm = countArm + 1; END; END -%]

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

✅ Instance Picker with filter on Arm-based CPU

[%- PROCESS instances_tr.tt2; -%] [%- instancePlatformTh() -%] [%- FOREACH instance IN instances; IF instance.arm; instancePlatformTr(instance); END; END -%]
[% PROCESS footer.tt2 %] ================================================ FILE: build/src/comparison.tt2 ================================================ [%- PROCESS header.tt2 -%]

Google Compute Engine Comparison [% instance_a.name %] vs. [% instance_b.name %]

Google Compute Engine machine type comparison [% instance_a.name %] ([% instance_a.vCpus %] vCPU, [% instance_a.memoryGB %] GB memory) versus [% instance_b.name %] ([% instance_b.vCpus %] vCPU, [% instance_b.memoryGB %] GB memory).

Show [% instance_a.name %] Show [% instance_b.name %] Compare [% instance_a.name %] Compare [% instance_b.name %]

Google Cloud VMs

Technical facts about the Google Compute Engine machine types [% instance_a.name %] and [% instance_b.name %].

[% tableCompareText(instance_a.series || '', instance_b.series || '') %] [% tableCompareText(instance_a.family || '', instance_b.family || '') %] [% tableCompareNumber(instance_a.regionCount || 0, instance_b.regionCount || 0) %] [% tableCompareNumber(instance_a.vCpus || 0, instance_b.vCpus || 0) %] [% tableCompareNumber(instance_a.memoryGB || 0, instance_b.memoryGB || 0) %] [% tableCompareNumber(instance_a.cpuPlatformCount || 0, instance_b.cpuPlatformCount || 0) %] [% tableCompareNumber(instance_a.cpuBaseClock || 0, instance_b.cpuBaseClock || 0) %] [% tableCompareNumber(instance_a.cpuTurboClock || 0, instance_b.cpuTurboClock || 0) %] [% tableCompareNumber(instance_a.cpuSingleMaxTurboClock || 0, instance_b.cpuSingleMaxTurboClock || 0) %] [% tableCompareNumber(instance_a.acceleratorCount || 0, instance_b.acceleratorCount || 0) %] [% tableCompareText(instance_a.acceleratorType || '', instance_b.acceleratorType || '') %] [% tableCompareNumber(instance_a.coremarkScore || 0, instance_b.coremarkScore || 0) %] [% tableCompareNumber(instance_a.standardDeviation || 0, instance_b.standardDeviation || 0) %] [% tableCompareNumber(instance_a.sampleCount || 0, instance_b.sampleCount || 0) %] [% tableCompareNumber(instance_a.saps || 0, instance_b.saps || 0) %] [% tableCompareNumber(instance_a.bandwidth || 0, instance_b.bandwidth || 0) %] [% tableCompareNumber(instance_a.tier1 || 0, instance_b.tier1 || 0) %] [% tableCompareNumber(instance_a.diskSizeTiB || 0, instance_b.diskSizeTiB || 0) %] [% tableCompareNumber(instance_a.disks || 0, instance_b.disks || 0) %] [% tableCompareBoolean(instance_a.localSsd || 0, instance_b.localSsd || 0) %] [% tableCompareBoolean(instance_a.sap || 0, instance_b.sap || 0) %] [% tableCompareBoolean(instance_a.hana || 0, instance_b.hana || 0) %] [% tableCompareBoolean(instance_a.spot || 0, instance_b.spot || 0) %] [% tableCompareBoolean(instance_a.sud || 0, instance_b.sud || 0) %]
[% instance_a.name %] [% instance_b.name %]
Series [% instance_a.series %][% instance_b.series %]
Family [% instance_a.family %][% instance_b.family %]
Regions [% instance_a.regionCount %][% instance_b.regionCount %]
vCPU [% instance_a.vCpus %][% badgeSharedCpu(instance_a) %][% instance_b.vCpus %][% badgeSharedCpu(instance_b) %]
Memory [% instance_a.memoryGB %] GB[% instance_b.memoryGB %] GB
CPU Platform [% listCpuPlatform(instance_a) %][% listCpuPlatform(instance_b) %]
CPU Base Frequency [% instance_a.cpuBaseClock %] GHz[% instance_b.cpuBaseClock %] GHz
CPU Turbo Frequency [% instance_a.cpuTurboClock %] GHz[% instance_b.cpuTurboClock %] GHz
CPU Max. Turbo Frequency [% instance_a.cpuSingleMaxTurboClock %] GHz[% instance_b.cpuSingleMaxTurboClock %] GHz
Accelerator (GPUs) [% instance_a.acceleratorCount %][% instance_b.acceleratorCount %]
Accelerator Type [% instance_a.acceleratorType %][% instance_b.acceleratorType %]
EEMBC CoreMark Benchmark (?) [% IF instance_a.coremarkScore %][% instance_a.coremarkScore %][% ELSE %]-[% END %][% IF instance_b.coremarkScore %][% instance_b.coremarkScore %][% ELSE %]-[% END %]
EEMBC CoreMark Standard Deviation [% IF instance_a.standardDeviation %][% instance_a.standardDeviation %] %[% ELSE %]-[% END %][% IF instance_b.standardDeviation %][% instance_b.standardDeviation %] %[% ELSE %]-[% END %]
EEMBC CoreMark Sample Count [% IF instance_a.sampleCount %][% instance_a.sampleCount %][% ELSE %]-[% END %][% IF instance_b.sampleCount %][% instance_b.sampleCount %][% ELSE %]-[% END %]
SAP Standard Benchmark (?) [% IF instance_a.saps %][% instance_a.saps %][% ELSE %]-[% END %][% IF instance_b.saps %][% instance_b.saps %][% ELSE %]-[% END %]
Network Bandwidth [% instance_a.bandwidth %] Gbps[% instance_b.bandwidth %] Gbps
Network Tier 1 [% IF instance_a.tier1 %][% instance_a.tier1 %] Gbps[% ELSE %]-[% END %][% IF instance_b.tier1 %][% instance_b.tier1 %] Gbps[% ELSE %]-[% END %]
Max. Disk Size [% instance_a.diskSizeTiB %] TB[% instance_b.diskSizeTiB %] TB
Max. Number of Disks [% instance_a.disks %][% instance_b.disks %]
Local SSD [% booleanLocalSsd(instance_a) %][% booleanLocalSsd(instance_b) %]
SAP Application [% booleanSap(instance_a) %][% booleanSap(instance_b) %]
SAP HANA [% booleanHana(instance_a) %][% booleanHana(instance_b) %]
Spot Provisioning Mode (Spot VM) [% booleanSpot(instance_a) %][% booleanSpot(instance_b) %]
Sustained Use Discount (SUD) [% booleanSud(instance_a) %][% booleanSud(instance_b) %]
[% instance_a.name %] [% instance_b.name %]

Costs (Pricing)

Average prices across all regions for Google Compute Engine machine types [% instance_a.name %] and [% instance_b.name %].

Price per Hour

[% tableCompareCosts(instance_a.avgHour || 0, instance_b.avgHour || 0) %] [% tableCompareCosts(instance_a.avgHourSpot || 0, instance_b.avgHourSpot || 0) %]
[% instance_a.name %] [% instance_b.name %]
Standard price per hour [% instance_a.avgHour %][% instance_b.avgHour %]
Spot provisioning model (Spot VM) [% instance_a.avgHourSpot %][% instance_b.avgHourSpot %]

Price per Month

[% tableCompareCosts(instance_a.avgMonth || 0, instance_b.avgMonth || 0) %] [% tableCompareCosts(instance_a.avgMonthSpot || 0, instance_b.avgMonthSpot || 0) %] [% tableCompareCosts(instance_a.avgMonth1yCud || 0, instance_b.avgMonth1yCud || 0) %] [% tableCompareCosts(instance_a.avgMonth3yCud || 0, instance_b.avgMonth3yCud || 0) %]
[% instance_a.name %] [% instance_b.name %]
Price per month [% instance_a.avgMonth %] [% badgeSud(instance_a) %] [% instance_b.avgMonth %] [% badgeSud(instance_b) %]
Spot provisioning model (Spot VM) [% instance_a.avgMonthSpot %][% instance_b.avgMonthSpot %]
1 year commitment (CUD) [% instance_a.avgMonth1yCud %][% instance_b.avgMonth1yCud %]
3 year commitment (CUD) [% instance_a.avgMonth3yCud %][% instance_b.avgMonth3yCud %]

Operating System Licenses Costs

Monthly costs for paid premium operating system licenses for Google Compute Engine machine types [% instance_a.name %] and [% instance_b.name %].

[% tableCompareCosts(instance_a.monthWindows || 0, instance_b.monthWindows || 0) %] [% tableCompareCosts(instance_a.monthSles || 0, instance_b.monthSles || 0) %] [% tableCompareCosts(instance_a.monthRhel || 0, instance_b.monthRhel || 0) %] [% tableCompareCosts(instance_a.monthRhel1yCud || 0, instance_b.monthRhel1yCud || 0) %] [% tableCompareCosts(instance_a.monthRhel3yCud || 0, instance_b.monthRhel3yCud || 0) %] [% tableCompareCosts(instance_a.monthSlesSap || 0, instance_b.monthSlesSap || 0) %] [% tableCompareCosts(instance_a.monthSlesSap1yCud || 0, instance_b.monthSlesSap1yCud || 0) %] [% tableCompareCosts(instance_a.monthSlesSap3yCud || 0, instance_b.monthSlesSap3yCud || 0) %] [% tableCompareCosts(instance_a.monthRhelSap || 0, instance_b.monthRhelSap || 0) %] [% tableCompareCosts(instance_a.monthRhelSap1yCud || 0, instance_b.monthRhelSap1yCud || 0) %] [% tableCompareCosts(instance_a.monthRhelSap3yCud || 0, instance_b.monthRhelSap3yCud || 0) %]
[% instance_a.name %] [% instance_b.name %]
Microsoft Windows Server [% instance_a.monthWindows %][% instance_b.monthWindows %]
SUSE Linux Enterprise Server [% instance_a.monthSles %][% instance_b.monthSles %]
Red Hat Enterprise Linux [% instance_a.monthRhel %][% instance_b.monthRhel %]
Red Hat Enterprise Linux w. 1 year CUD [% instance_a.monthRhel1yCud %][% instance_b.monthRhel1yCud %]
Red Hat Enterprise Linux w. 3 year CUD [% instance_a.monthRhel3yCud %][% instance_b.monthRhel3yCud %]
SUSE Linux Enterprise Server for SAP [% instance_a.monthSlesSap %][% instance_b.monthSlesSap %]
SUSE Linux Enterprise Server for SAP w. 1 year CUD [% instance_a.monthSlesSap1yCud %][% instance_b.monthSlesSap1yCud %]
SUSE Linux Enterprise Server for SAP w. 3 year CUD [% instance_a.monthSlesSap3yCud %][% instance_b.monthSlesSap3yCud %]
Red Hat Enterprise Linux for SAP [% instance_a.monthRhelSap %][% instance_b.monthRhelSap %]
Red Hat Enterprise Linux for SAP w. 1 year CUD [% instance_a.monthRhelSap1yCud %][% instance_b.monthRhelSap1yCud %]
Red Hat Enterprise Linux for SAP w. 3 year CUD [% instance_a.monthRhelSap3yCud %][% instance_b.monthRhelSap3yCud %]

Regions

Costs for Google Compute Engine machine types [% instance_a.name %] and [% instance_b.name %] in Google Cloud regions in which the VMs are available.

[% FOREACH region IN regions %] [%- costs_a = 0; costs_b = 0; FOREACH region_a IN regions_a; IF region_a.region == region.name; costs_a = region_a.hour; END; END; FOREACH region_b IN regions_b; IF region_b.region == region.name; costs_b = region_b.hour; END; END; -%] [% IF costs_a %] [% ELSE %] [% END %] [% IF costs_a && costs_b %] [% tableCompareCosts(costs_a || 0, costs_b || 0) %] [% ELSE %] [% END %] [% IF costs_b %] [% ELSE %] [% END %] [%- costs_a = 0; costs_b = 0; FOREACH region_a IN regions_a; IF region_a.region == region.name; costs_a = region_a.hourSpot; END; END; FOREACH region_b IN regions_b; IF region_b.region == region.name; costs_b = region_b.hourSpot; END; END; -%] [% IF costs_a %] [% ELSE %] [% END %] [% IF costs_a && costs_b %] [% tableCompareCosts(costs_a || 0, costs_b || 0) %] [% ELSE %] [% END %] [% IF costs_b %] [% ELSE %] [% END %] [%- costs_a = 0; costs_b = 0; FOREACH region_a IN regions_a; IF region_a.region == region.name; costs_a = region_a.month; END; END; FOREACH region_b IN regions_b; IF region_b.region == region.name; costs_b = region_b.month; END; END; -%] [% IF costs_a %] [% ELSE %] [% END %] [% IF costs_a && costs_b %] [% tableCompareCosts(costs_a || 0, costs_b || 0) %] [% ELSE %] [% END %] [% IF costs_b %] [% ELSE %] [% END %] [%- costs_a = 0; costs_b = 0; FOREACH region_a IN regions_a; IF region_a.region == region.name; costs_a = region_a.month1yCud; END; END; FOREACH region_b IN regions_b; IF region_b.region == region.name; costs_b = region_b.month1yCud; END; END; -%] [% IF costs_a %] [% ELSE %] [% END %] [% IF costs_a && costs_b %] [% tableCompareCosts(costs_a || 0, costs_b || 0) %] [% ELSE %] [% END %] [% IF costs_b %] [% ELSE %] [% END %] [%- costs_a = 0; costs_b = 0; FOREACH region_a IN regions_a; IF region_a.region == region.name; costs_a = region_a.month3yCud; END; END; FOREACH region_b IN regions_b; IF region_b.region == region.name; costs_b = region_b.month3yCud; END; END; -%] [% IF costs_a %] [% ELSE %] [% END %] [% IF costs_a && costs_b %] [% tableCompareCosts(costs_a || 0, costs_b || 0) %] [% ELSE %] [% END %] [% IF costs_b %] [% ELSE %] [% END %] [% END %]
Region Hour Spot Month 1 year CUD 3 year CUD
Name Location [% instance_a.name %] [% instance_b.name %] [% instance_a.name %] [% instance_b.name %] [% instance_a.name %] [% instance_b.name %] [% instance_a.name %] [% instance_b.name %] [% instance_a.name %] [% instance_b.name %]
[% region.name %] [% region.regionLocation %] [% costs_a %]N.A.-[% costs_b %]N.A.[% costs_a %]N.A.-[% costs_b %]N.A. [% costs_a %] [% badgeSud(instance_a) %] N.A.- [% costs_b %] [% badgeSud(instance_b) %] N.A. [% costs_a %] N.A.- [% costs_b %] N.A. [% costs_a %] N.A.- [% costs_b %] N.A.
[% PROCESS footer.tt2 %] ================================================ FILE: build/src/config.tt2 ================================================ [%- site = { url => 'https://gcloud-compute.com', github = { repo => 'https://github.com/Cyclenerd/google-cloud-compute-machine-types', issues => 'https://github.com/Cyclenerd/google-cloud-compute-machine-types/issues', }, agGrid = { css => 'https://cdn.jsdelivr.net/npm/ag-grid-community@31.0.3/styles/ag-grid.min.css' theme => 'https://cdn.jsdelivr.net/npm/ag-grid-community@31.0.3/styles/ag-theme-balham.min.css' js => 'https://cdn.jsdelivr.net/npm/ag-grid-community@31.0.3/dist/ag-grid-community.min.noStyle.js' }, agCharts = { js => 'https://cdn.jsdelivr.net/npm/ag-charts-community@9.0.2/dist/umd/ag-charts-community.min.js' } jQuery = { js => 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js' }, bootstrap = { css => 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.3/css/bootstrap.min.css' js => 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.3/js/bootstrap.bundle.min.js' }, bootstrapTable = { css => 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.22.2/bootstrap-table.min.css' js => 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.22.2/bootstrap-table.min.js' }, bootstrapTableStickyHeader = { css => 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.22.2/extensions/sticky-header/bootstrap-table-sticky-header.min.css' js => 'https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.22.2/extensions/sticky-header/bootstrap-table-sticky-header.min.js' }, leaflet = { css => 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.min.css' js => 'https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.min.js' }, }; PROCESS macros.tt2; -%] ================================================ FILE: build/src/disk.tt2 ================================================ [%- PROCESS header.tt2 -%]

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

[%- minDiskSize = 10; IF disk.name == 'pd-extreme'; minDiskSize = 500; END; IF disk.name == 'local-ssd'; minDiskSize = 375; END; -%]

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

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

[% FOREACH region IN regions %] [% IF region.monthGb %] [% ELSE %] [% END %] [% END %]
Region Location #Zones 1 GB 10 GB 375 GB 500 GB
[% region.name %] [% 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") %]??? ??? ??? ???
[% PROCESS footer.tt2 %] ================================================ FILE: build/src/diskpricing.tt2 ================================================ [%- PROCESS header.tt2 -%] [%- PROCESS regions_header.tt2 -%]

Persistent Disk Pricing in Google Cloud Regions

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

🗺️ Region Map ⏱️ Ping

[% FOREACH region IN disks_regions %] [% IF region.standard %] [% ELSE %] [% END %] [% IF region.balanced %] [% ELSE %] [% END %] [% IF region.ssd %] [% ELSE %] [% END %] [% IF region.extreme %] [% ELSE %] [% END %] [% IF region.local %] [% ELSE %] [% END %] [% END %]
Region Zones Standard Balanced SSD Extreme Local SSD
Name Location # 1 GB 10 GB 1 GB 10 GB 1 GB 10 GB 1 GB 500 GB 1 GB 375 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") %]- -
[% PROCESS footer.tt2 %] ================================================ FILE: build/src/disks.js ================================================ const options = { container: document.getElementById('myChart'), autoSize: true, title: { text: 'Performance by Disk Size', enabled: false }, data: [ { size: '10 GB', // HDD hdd_read: 0, hdd_write: 0, // SSD ssd_read: 4.8, ssd_write: 4.8 }, { size: '32 GB', // HDD hdd_read: 3, hdd_write: 3, // SSD ssd_read: 15, ssd_write: 15 }, { size: '64 GB', // HDD hdd_read: 7, hdd_write: 7, // SSD ssd_read: 30, ssd_write: 30 }, { size: '128 GB', // HDD hdd_read: 15, hdd_write: 15, // SSD ssd_read: 61, ssd_write: 61 }, { size: '256 GB', // HDD hdd_read: 30, hdd_write: 30, // SSD ssd_read: 122, ssd_write: 122 }, { size: '500 GB', // HDD hdd_read: 60, hdd_write: 60, // SSD ssd_read: 240, ssd_write: 240 }, { size: '1 TB', // HDD hdd_read: 120, hdd_write: 120, // SSD ssd_read: 480, ssd_write: 480 }, { size: '2 TB', // HDD hdd_read: 245, hdd_write: 245, // SSD ssd_read: 983, ssd_write: 983 }, { size: '4 TB', // HDD hdd_read: 480, hdd_write: 400, // SSD ssd_read: 1200, ssd_write: 1200 }, { size: '5 TB', // HDD hdd_read: 600, hdd_write: 400, // SSD ssd_read: 1200, ssd_write: 1200 }, { size: '8 TB', // HDD hdd_read: 983, hdd_write: 400, // SSD ssd_read: 1200, ssd_write: 1200 }, { size: '10 TB', // HDD hdd_read: 1200, hdd_write: 400, // SSD ssd_read: 1200, ssd_write: 1200 } ], series: [ { xKey: 'size', yKey: 'hdd_write', yName: 'Standard Write (MBps)', stroke: '#20c997', marker: { shape: 'square', fill: '#20c997', stroke: '#20c997', }, }, { xKey: 'size', yKey: 'hdd_read', yName: 'Standard Read (MBps)', stroke: '#198754', marker: { shape: 'square', fill: '#198754', stroke: '#198754', }, }, { xKey: 'size', yKey: 'ssd_write', yName: 'SSD Write (MBps)', stroke: '#6610f2', marker: { shape: 'circle', fill: '#6610f2', stroke: '#6610f2', }, }, { xKey: 'size', yKey: 'ssd_read', yName: 'SSD Read (MBps)', stroke: '#6f42c1', marker: { shape: 'circle', fill: '#6f42c1', stroke: '#6f42c1', }, }, ], axes: [ { type: 'category', position: 'bottom', title: { text: 'Disk Size', enabled: false, }, }, { type: 'number', position: 'left', title: { text: 'Sustained throughput (MBps)', enabled: false, }, label: { formatter: function (params) { return params.value + ' MBps'; }, }, }, ], legend: { enabled: true, position: 'bottom' }, }; agCharts.AgChart.create(options); ================================================ FILE: build/src/disks.tt2 ================================================ [%- PROCESS header.tt2 -%]

Google Compute Engine Persistent Disk Types

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

[%- FOREACH disk IN disks; minDiskSize = 10; IF disk.name == 'pd-extreme'; minDiskSize = 500; END; IF disk.name == 'local-ssd'; minDiskSize = 375; END; -%] [% IF minDiskSize %][% ELSE %][% END %] [% IF disk.avgMonth %] [% ELSE %] [% END %] [%- END -%]
Disk Type Region Costs (Avg. Region)
Name Description Min. Disk Size # 1 GB 10 GB 500 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") %]??? ??? ???

Performance by Disk Size

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

[% PROCESS footer.tt2 %] ================================================ FILE: build/src/download.tt2 ================================================ [%- PROCESS header.tt2 -%]

Download

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

Spreadsheet

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

Download CSV ([% csvFileSize %] MB)

Database

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

Download SQL ([% sqlFileSize %] MB)

Command Line

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

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

Example SQL output:

e2-highcpu-8|8.0|0.21785232
n2d-highcpu-8|8.0|0.274688
e2-standard-8|8.0|0.29508816
n1-highcpu-8|8.0|0.3119968
n2-highcpu-8|8.0|0.315728

Open Source

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

[%- PROCESS footer.tt2 -%] ================================================ FILE: build/src/favicon.tt2 ================================================ ================================================ FILE: build/src/footer.tt2 ================================================
================================================ FILE: build/src/gcosts.tt2 ================================================ [%- PROCESS header.tt2 -%]

Google Cloud Platform Pricing and Cost Calculator

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

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

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

1. Create YAML file

Screenshot: Create YAML file

2. Run gcosts CLI program

Screenshot: Run gcosts CLI program

3. Open CSV file

Screenshot: Open CSV file

Download

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

Linux macOS Windows

Awarded

This project was the winner of the Google Open Source Peer Bonus in 2022.

[%- PROCESS footer.tt2 -%] ================================================ FILE: build/src/gpu.tt2 ================================================ [%- PROCESS header.tt2 -%] [%- PROCESS instances_header.tt2 -%]

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

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

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

✅ Instance Picker with filter on GPUs

[%- PROCESS instances_tr.tt2; -%] [%- FOREACH instance IN instances; IF instance.acceleratorCount && instance.acceleratorCount > 0; -%] [% END; END; %]
Machine Type Regions Costs (Avg. Region)
Name vCPU Base Clock Memory GPUs Type # Hour Spot Month 1Y CUD 3Y CUD
[% instance.name %] [% instance.vCpus %][% badgeSharedCpu(instance) %] [% instance.cpuBaseClock %] [% instance.memoryGB %] [% instance.acceleratorCount %] [% instance.acceleratorType %] [% badgeCpuManufactur(instance) %] [% badgeSpot(instance) %] [% badgeSud(instance) %] [% badgeLocalSsd(instance) %] [% instance.regionCount %] [% instance.avgHour %] [% instance.avgHourSpot %] [% instance.avgMonth %] [% instance.avgMonth1yCud %] [% instance.avgMonth3yCud %]
[% PROCESS footer.tt2 %] ================================================ FILE: build/src/grid.tt2 ================================================ GCE Instance Picker [% PROCESS favicon.tt2 %]
================================================ FILE: build/src/hana.tt2 ================================================ [%- PROCESS header.tt2 -%] [%- PROCESS instances_header.tt2 -%]

Certified for SAP HANA on Google Cloud Platform

[%- countSAP = 0; FOREACH instance IN instances; IF instance.hana; countSAP = countSAP + 1; END; END -%]

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

✅ Instance Picker with filter on SAP HANA

[% FOREACH instance IN instances; IF instance.hana; %] [% END; END; %]
Machine Type Regions Costs (Avg. Region) OS with 3Y CUD
Name vCPU Base Clock Memory SAPS # Hour Month 1Y CUD 3Y CUD SLES for SAP RHEL for SAP
[% instance.name %] [% instance.vCpus %][% badgeSharedCpu(instance) %] [% instance.cpuBaseClock %] [% instance.memoryGB %] [% instance.saps %] [% badgeCpuManufactur(instance) %] [% badgeSpot(instance) %] [% badgeSud(instance) %] [% badgeLocalSsd(instance) %] [% instance.regionCount %] [% instance.avgHour %] [% instance.avgMonth %] [% instance.avgMonth1yCud %] [% instance.avgMonth3yCud %] [% instance.monthSlesSap3yCud %] [% instance.monthRhelSap3yCud %]
[% PROCESS footer.tt2 %] ================================================ FILE: build/src/header.tt2 ================================================ [% PROCESS meta.tt2; %] [% PROCESS favicon.tt2 %]
================================================ FILE: build/src/images.tt2 ================================================ [%- PROCESS header.tt2 -%]

Google Compute Engine Operating System Images

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

[% FOREACH project IN image_projects %]

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

Image project: [% project.name %]

[% FOREACH family IN image_famlies; IF family.project == project.name; %] [% END; END; %]
Image Family Latest Image Description Min. Disk Size Creation
[% family.name %] [% family.image %] [% badgeImageArch(family.architecture) %] [% IF family.description %][% family.description %][% ELSE %]-[% END %] [% family.diskSizeGb %] GB [% family.creation | replace('T.+$','') %]

Google Cloud CLI:

# Create VM instance with [% imageProjectName(project.name) %] operating system boot disk
# Name: 'vm-[% project.name %]'
# Machine type: 'e2-micro'
# Zone: 'us-central1-a'
gcloud compute instances create vm-[% project.name %] \
--machine-type='e2-micro' \
--zone='us-central1-a' \
--image-project='[% project.name %]' \
--image-family='ADD_IMAGE_FAMILY_HERE'
[% END %]
[% PROCESS footer.tt2 %] ================================================ FILE: build/src/img/favicon/README.txt ================================================ This favicon was generated using the following graphics from Twitter Twemoji: - Graphics Title: 1f4b8.svg - Graphics Author: Copyright 2020 Twitter, Inc and other contributors (https://github.com/twitter/twemoji) - Graphics Source: https://github.com/twitter/twemoji/blob/master/assets/svg/1f4b8.svg - Graphics License: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/) ================================================ FILE: build/src/img/favicon/site.webmanifest ================================================ {"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"} ================================================ FILE: build/src/imprint.tt2 ================================================ [%- PROCESS header.tt2 -%]

Imprint

🇩🇪 German law demands this.

Nils Knieling
Klabundeweg 14
22359 Hamburg
Deutschland

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

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

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

[%- PROCESS footer.tt2 -%] ================================================ FILE: build/src/index.tt2 ================================================ [%- PROCESS header.tt2 -%]

Google Compute Engine Machine Type Comparison

This webapp helps to find the optimal Google Compute Engine (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.

I was tired of switching between different Google documentations to get all the information to find the best Google Compute Engine machine. I have therefore merged all important information into one place. Hope it helps you too.

Machines

[% intel = 0; amd = 0; arm = 0; sap = 0; hana = 0; FOREACH instance IN instances; IF instance.intel; intel = intel + 1; END; IF instance.amd; amd = amd + 1; END; IF instance.arm; arm = arm + 1; END; IF instance.sap; sap = sap + 1; END; IF instance.hana; hana = hana + 1; END; END; %]

Here you can find an overview of all [% instances.size %] different Google Compute Engine machine types. You can also find the average costs per GCE machine type across all Google Cloud regions in this overview.

You have the choice between [% intel %] machine types with Intel CPU, [% amd %] CPU machine types with AMD CPU and [% arm %] CPU machine types with Arm-based processors. [% sap %] machine types are certified for SAP application and [% hana %] machine types are certified for SAP HANA on Google Cloud.

Disks

Here you can find an overview of [% disks.size %] different disk types for your instances.

Images

Here you can find an overview of many preconfigured public images that have compatible Linux, UNIX or Windows operating systems.

Regions

[% regions_with_low_co2 = 0; total_public_ip_addr = 0; FOREACH region IN regions; IF region.regionLowCo2; regions_with_low_co2 = regions_with_low_co2 + 1; END; IF region.regionPublicIpv4Addr; total_public_ip_addr = total_public_ip_addr + region.regionPublicIpv4Addr; END; END; %]

Here you can find an overview of all [% regions.size %] Google Cloud regions and the corresponding zones. A total of [% total_public_ip_addr / 1000000 FILTER format("%d") %] million public IPv4 addresses are assigned to all Google Cloud Platform regions. There is also a map view with all Google Cloud Platform regions. You can also find the available Google Compute Engine machine types per GCE machine series (CPU type and CPU plattform) in this overview. A cost overview of the persistent disk types in the regions can also be found in this section.

Of the [% regions.size %] regions, [% regions_with_low_co2 %] regions have a low carbon impact. This means that this regions have a Google CFE% of at least 75%, or, if CFE% information is not available, a grid carbon intensity of maximum 200 gCO2eq/kWh.

In total, you have the freedom to choose between [% instances_in_regions.size %] different combinations of Google Compute Engine machine types and Google Cloud regions. For each combination the cost per hour, month with sustained use discounts (SUD), month with 1 year commitment (CUD) and price per month with 3 year commitment (CUD) was calculated. The cost of paid "premium" operating system licenses, such as SUSE Linux Enterprise Server (SLES), Red Hat Enterprise Linux (RHEL) and Microsoft Windows Server, was also calculated.

Instance Picker

With the Instance Picker you can quickly and easily compare all possible Google Compute Engine machine types and instances in all Google Cloud Platform regions.

You can set filters for each column and sort them. Filters can be combined.

A good first filter is to set the preferred region. You can also filter by parts of the region. Example europe to filter all machine types in Europe.

Filter

You can filter and sort all fields in the Instance Picker.

Filter on region europe-west4 and CPU base clock frequency greater than 3 GHz: Screenshot: Filter

Filter on region europe-west4 and Memory greater than 30 GB but also less than 60 GB: Screenshot: Filter combined

Sort and more

Click header title to sort column: Screenshot: Sort colums

Click group header title icon to show more colums: Screenshot: Show more colums

Keyboard shortcuts

You can navigate the Instance Picker with your keyboard.

Press Ctrl + / to focus the vCPU filter.

Use the arrow keys ( ) to move focus up, down, left and right. Tab will move the focus horizontally until the last cell and then move on to the next row. Shift + Tab will move the focus horizontal backward until the first cell and then move back to the previous row.

Pressing the Space key on a cell will select the cells row, or deselect the row if already selected.

With the following keyboard shortcuts you can copy selected row from the table in CSV format to your clipboard:

  • Ctrl + c : Copy selected rows with shown column
  • Ctrl + x : Copy selected rows with all column

The grid header also supports full keyboard navigation:

  • Press Enter to toggle the sorting state of that column.
  • Press Ctrl + Enter to open the menu for the focused header.
  • When a menu is open, simply press Esc to close it and the focus will return to the header.

Resources of the Information

The information was obtained from the following different Google websites:

[% PROCESS footer.tt2 %] ================================================ FILE: build/src/instance.tt2 ================================================ [%- PROCESS header.tt2 -%]

Google Compute Engine Machine Type [% instance.name %]

[% IF instance.family %][% instance.family %][% END %] Google Compute Engine machine type [% instance.name %] with [% instance.vCpus%] vCPU and [% instance.memoryGB %] GB memory. [% IF instance.localSsd > 1 %]Bundled with [% instance.localSsd FILTER format("%.0f") %] GB local SSD.[% END %] [% IF instance.name.search('-lssd') %]Local SSD storage is required and automatically attached. Additional costs for Local SSD storage are charged.[% END %] [%- IF instance.sap || instance.hana -%] GCE machine type [% instance.name %] is certified for [% IF instance.sap %]SAP applications[% END %] [% IF instance.sap && instance.hana%]and[% END %] [% IF instance.hana %]SAP HANA[% END %] on Google Cloud Platform. [%- END -%] Available in [% regions.size %] Google Cloud region[% IF regions.size > 1 %]s[% END %]. [% notAllCpuPlatformsAvailable = 0; FOREACH region IN regions; IF region.availableCpuPlatformCount < instance.cpuPlatformCount; notAllCpuPlatformsAvailable = 1; END; END; %] [% IF notAllCpuPlatformsAvailable %]Not all CPU platforms are available in all regions.[% END %]

✅ Instance Picker with filter on machine type [% instance.name %] Compare machine type [% instance.name %]

Google Cloud VM [% instance.name %]

Technical facts about the Google Compute Engine machine type [% instance.name %].

[% IF instance.acceleratorCount %] [% END %]
Series [% instance.series %]
Family [% instance.family %]
vCPU [% instance.vCpus %][% badgeSharedCpu(instance) %]
Memory [% instance.memoryGB %] GB
CPU Manufactur [% badgeCpuManufactur(instance) %]
CPU Platform [% listCpuPlatform(instance) %]
CPU Base Frequency [% IF instance.cpuBaseClock > 0 %][% instance.cpuBaseClock %] GHz[% ELSE %]?[% END %]
CPU Turbo Frequency [% IF instance.cpuTurboClock > 0 %][% instance.cpuTurboClock %] GHz[% ELSE %]?[% END %]
CPU Max. Turbo Frequency [% IF instance.cpuSingleMaxTurboClock > 0 %][% instance.cpuSingleMaxTurboClock %] GHz[% ELSE %]?[% END %]
Accelerator (GPUs) [% instance.acceleratorCount %]
Accelerator Type [% instance.acceleratorType %]
EEMBC CoreMark Benchmark (?) [% IF instance.coremarkScore %][% instance.coremarkScore %][% ELSE %]-[% END %]
EEMBC CoreMark Standard Deviation [% IF instance.standardDeviation %][% instance.standardDeviation %] %[% ELSE %]-[% END %]
EEMBC CoreMark Sample Count [% IF instance.sampleCount %][% instance.sampleCount %][% ELSE %]-[% END %]
SAP Standard Benchmark (?) [% IF instance.saps %][% instance.saps %][% ELSE %]-[% END %]
Network Bandwidth [% instance.bandwidth %] Gbps
Network Tier 1 [% IF instance.tier1 %][% instance.tier1 %] Gbps[% ELSE %]-[% END %]
Max. Disk Size [% instance.diskSizeTiB %] TB
Max. Number of Disks [% instance.disks %]
Local SSD [% booleanLocalSsd(instance) %] [% bundledLocalSsd(instance) %]
SAP Application [% booleanSap(instance) %]
SAP HANA [% booleanHana(instance) %]
Spot Provisioning Mode (Spot VM) [% booleanSpot(instance) %]
Sustained Use Discount (SUD) [% booleanSud(instance) %]
GCE API Description [% instance.description %]

Costs (Pricing) for [% instance.name %]

Cost and pricing across all regions for Google Cloud VM [% instance.name %].

Price per Hour

[% IF instance.spot && instance.avgHourSpot > 0 %] [% END %]
Min. Avg. Max.
Standard price per hour [% instance.minHour %] [% instance.avgHour %] [% instance.maxHour %]
Spot provisioning model (Spot VM) [% instance.minHourSpot %] [% instance.avgHourSpot %] [% instance.maxHourSpot %]

Price per Month

[% IF instance.spot && instance.avgMonthSpot > 0 %] [% END %]
Min. Avg. Max.
Price per month[% IF instance.sud %] with sustained use discount (SUD)[% END %] [% instance.minMonth %] [% instance.avgMonth %] [% instance.maxMonth %]
Spot provisioning model (Spot VM) [% instance.minMonthSpot %] [% instance.avgMonthSpot %] [% instance.maxMonthSpot %]
1 year commitment (CUD) [% instance.minMonth1yCud %] [% instance.avgMonth1yCud %] [% instance.maxMonth1yCud %]
3 year commitment (CUD) [% instance.minMonth3yCud %] [% instance.avgMonth3yCud %] [% instance.maxMonth3yCud %]

Operating System Licenses Costs

Monthly costs for paid premium operating system licenses for Google Compute Engine machine type [% instance.name %].

Operating System Month 1Y CUD 3Y CUD
Microsoft Windows Server [% instance.monthWindows %]
SUSE Linux Enterprise Server [% instance.monthSles %]
Red Hat Enterprise Linux [% instance.monthRhel %] [% instance.monthRhel1yCud %] [% instance.monthRhel3yCud %]
SUSE Linux Enterprise Server for SAP [% instance.monthSlesSap %] [% instance.monthSlesSap1yCud %] [% instance.monthSlesSap3yCud %]
Red Hat Enterprise Linux for SAP [% instance.monthRhelSap %] [% instance.monthRhelSap1yCud %] [% instance.monthRhelSap3yCud %]

Price per Region

[% cost_hour_difference = instance.maxHour - instance.minHour; cost_hour_difference_percent = cost_hour_difference*100 / instance.maxHour %]

Costs and pricing for Google Compute Engine machine type [% instance.name %] in Google Cloud regions in which the VM is available. Between the most expensive and the cheapest region is a price difference of [% cost_hour_difference_percent FILTER format("%.0f") %]%.

[% IF instance.spot && instance.avgHourSpot > 0 %][% END %] [% FOREACH region IN regions %] [% IF instance.spot && instance.avgHourSpot > 0 %] [% END %] [% END %]
Region Location #Zones #Platf. HourSpotMonth 1Y CUD 3Y CUD
[% region.name %] [% IF region.regionLocation %][% region.regionLocation %][% ELSE %]?[% END %] [% iconLowCo2Region(region) %] [% IF region.zoneCount %][% region.zoneCount %][% ELSE %]?[% END %] [% IF region.availableCpuPlatformCount %][% region.availableCpuPlatformCount %][% ELSE %]?[% END %] [% region.hour %][% region.hourSpot %][% region.month %] [% region.month1yCud %] [% region.month3yCud %]
[% PROCESS footer.tt2 %] ================================================ FILE: build/src/instance_in_region.json ================================================ [% json %] ================================================ FILE: build/src/instance_in_region.tt2 ================================================ [%- PROCESS header.tt2 -%]

Google Compute Engine Machine Type [% instance.name %] in Region [% instance.region %] [% IF instance.regionLocation %] [% instance.regionLocation %][% END %] [% badgeLowCo2Region(instance) %]

[% IF instance.family %][% instance.family %][% END %] Google Compute Engine machine type [% instance.name %] with [% instance.vCpus%] vCPU and [% instance.memoryGB %] GB memory in Google Cloud region [% instance.region %] [% IF instance.regionLocationLong %]([% instance.regionLocationLong %])[% ELSIF instance.regionLocation %]([% instance.regionLocation %])[% END %]. [% IF instance.localSsd > 1 %]Bundled with [% instance.localSsd FILTER format("%.0f") %] GB local SSD.[% END %] [% IF instance.name.search('-lssd') %]Local SSD storage is required and automatically attached. Additional costs for Local SSD storage are charged.[% END %] [%- IF instance.sap || instance.hana -%] GCE machine type [% instance.name %] is certified for [% IF instance.sap %]SAP applications[% END %] [% IF instance.sap && instance.hana%]and[% END %] [% IF instance.hana %]SAP HANA[% END %] on Google Cloud Platform. [%- END -%] Available in [% instance.zoneCount %] zone[% IF instance.zoneCount > 1 %]s[% END %]. [% IF instance.availableCpuPlatformCount < instance.cpuPlatformCount %]Not all CPU platforms are available in region [% instance.region %][% IF instance.regionLocation %] ([% instance.regionLocation %])[% END %].[% END %] [% notAllCpuPlatformsAvailableInZones = 0; FOREACH cpuPlatform IN instance.availableCpuPlatform.split(',').sort; cpu = cpuPlatform.remove('\s'); %] [% FOREACH zone IN instance.zones.split(', ').sort; %] [% FOREACH z IN zones; IF z.name == zone; %] [% available = z.availableCpuPlatforms.remove('\s') %] [% IF available.search(cpu); notAllCpuPlatformsAvailableInZones = notAllCpuPlatformsAvailableInZones; ELSE; notAllCpuPlatformsAvailableInZones = notAllCpuPlatformsAvailableInZones + 1; END; %] [% END; END; %] [% END %] [%END %] [% IF notAllCpuPlatformsAvailableInZones %]Not all CPU platforms are available in all zones in region [% instance.region %][% IF instance.regionLocation %] ([% instance.regionLocation %])[% END %].[% END %]

✅ Instance Picker [% instance.name %] in [% instance.region %] Show [% instance.name %] Show [% instance.region %] Compare [% instance.name %]

Google Cloud VM [% instance.name %]

Technical facts about the Google Compute Engine machine type [% instance.name %] in Google Cloud Region [% instance.region %][% IF instance.regionLocation %] ([% instance.regionLocation %])[% END %].

[% IF instance.acceleratorCount %] [% END %]
Series [% instance.series %]
Family [% instance.family %]
vCPU [% instance.vCpus %][% badgeSharedCpu(instance) %]
Memory [% instance.memoryGB %] GB
CPU Manufactur [% badgeCpuManufactur(instance) %]
CPU Platform
    [% FOREACH cpuPlatform IN instance.cpuPlatform.split(',').sort; cpu = cpuPlatform.remove('\s'); available = instance.availableCpuPlatform.remove('\s'); %] [% IF available.search(cpu) %]
  • ✔️ [% cpuPlatform %]
  • [% ELSE %]
  • ❌ [% cpuPlatform %]
  • [% END %] [% END %]
CPU Base Frequency [% IF instance.cpuBaseClock > 0 %][% instance.cpuBaseClock %] GHz[% ELSE %]?[% END %]
CPU Turbo Frequency [% IF instance.cpuTurboClock > 0 %][% instance.cpuTurboClock %] GHz[% ELSE %]?[% END %]
CPU Max. Turbo Frequency [% IF instance.cpuSingleMaxTurboClock > 0 %][% instance.cpuSingleMaxTurboClock %] GHz[% ELSE %]?[% END %]
Accelerator (GPUs) [% instance.acceleratorCount %]
Accelerator Type [% instance.acceleratorType %]
EEMBC CoreMark Benchmark (?) [% IF instance.coremarkScore %][% instance.coremarkScore %][% ELSE %]-[% END %]
EEMBC CoreMark Standard Deviation [% IF instance.standardDeviation %][% instance.standardDeviation %] %[% ELSE %]-[% END %]
EEMBC CoreMark Sample Count [% IF instance.sampleCount %][% instance.sampleCount %][% ELSE %]-[% END %]
SAP Standard Benchmark (?) [% IF instance.saps %][% instance.saps %][% ELSE %]-[% END %]
Network Bandwidth [% instance.bandwidth %] Gbps
Network Tier 1 [% IF instance.tier1 %][% instance.tier1 %] Gbps[% ELSE %]-[% END %]
Max. Disk Size [% instance.diskSizeTiB %] TB
Max. Number of Disks [% instance.disks %]
Local SSD [% booleanLocalSsd(instance) %] [% bundledLocalSsd(instance) %]
SAP Application [% booleanSap(instance) %]
SAP HANA [% booleanHana(instance) %]
Spot Provisioning Mode (Spot VM) [% booleanSpot(instance) %]
Sustained Use Discount (SUD) [% booleanSud(instance) %]
GCE API Description [% instance.description %]
[% IF instance.zones %]

Zones in Region [% instance.region %]

Google Compute Engine machine type [% instance.name %] is available in the following zones within the Google Cloud region [% instance.region %][% IF instance.regionLocation %] ([% instance.regionLocation %])[% END %].

[% FOREACH zone IN instance.zones.split(', ').sort; %] [% END %]
Name CPU Platform
[% zone %]
    [% FOREACH cpuPlatform IN instance.availableCpuPlatform.split(',').sort; cpu = cpuPlatform.remove('\s'); %] [% FOREACH z IN zones; IF z.name == zone; available = z.availableCpuPlatforms.remove('\s'); END; END; %] [% IF available.search(cpu) %]
  • ✔️ [% cpuPlatform %]
  • [% ELSE %]
  • ❌ [% cpuPlatform %]
  • [% END %] [% END %]
[% END %]

Costs (Pricing) in Region [% instance.region %]

Costs and pricing for Google Compute Engine machine type [% instance.name %] in Google Cloud region [% instance.region %][% IF instance.regionLocation %] ([% instance.regionLocation %])[% END %].

Price per Hour

[% IF instance.spot && instance.hourSpot > 0 %] [% END %]
Standard price per hour [% instance.hour %]
Spot provisioning model (Spot VM) [% instance.hourSpot %]

Price per Month

[% IF instance.spot && instance.monthSpot > 0 %] [% END %]
Price per month[% IF instance.sud %] with sustained use discount (SUD)[% END %] [% instance.month %]
Spot provisioning model (Spot VM) [% instance.monthSpot %]
1 year commitment (CUD) [% instance.month1yCud %]
3 year commitment (CUD) [% instance.month3yCud %]

Operating System Licenses Costs

Monthly costs for paid premium operating system licenses for Google Compute Engine machine type [% instance.name %].

Operating System Month 1Y CUD 3Y CUD
Microsoft Windows Server [% instance.monthWindows %]
SUSE Linux Enterprise Server [% instance.monthSles %]
Red Hat Enterprise Linux [% instance.monthRhel %] [% instance.monthRhel1yCud %] [% instance.monthRhel3yCud %]
SUSE Linux Enterprise Server for SAP [% instance.monthSlesSap %] [% instance.monthSlesSap1yCud %] [% instance.monthSlesSap3yCud %]
Red Hat Enterprise Linux for SAP [% instance.monthRhelSap %] [% instance.monthRhelSap1yCud %] [% instance.monthRhelSap3yCud %]

Carbon Data for Region [% instance.region %]

Higher CFE% will emit lower carbon emissions.

Google CFE% [% IF instance.regionCfe %][% instance.regionCfe %] %[% ELSE %]?[% END %]
Grid carbon intensity (gCO2eq/kWh) [% IF instance.regionCo2Kwh %][% instance.regionCo2Kwh %][% ELSE %]?[% END %]
Google Cloud net operational GHG emissions 0
[% IF instance.zones %]

Google Cloud Command Line Interface CLI

Google Cloud Command Line Interface (CLI) snippets for Google Compute Engine machine type [% instance.name %] in Google Cloud Region [% instance.region %][% IF instance.regionLocation %] ([% instance.regionLocation %])[% END %].

[% firstZone = 0; FOREACH zone IN instance.zones.split(', ').sort; firstZone = firstZone + 1; %]

Create instance:

# Create Google Compute Engine virtual machine instance
# called '[% instance.name%]-[% zone %]'
# in the '[% zone %]' zone
# with the latest 'Ubuntu 22.04 LTS' image available.
[% # do not remove this line %]
[%- IF instance.sharedCpu < 1 && !instance.arm -%]
# To specify minimum CPU platform replace min-cpu-platform:
[% # do not remove this line %]
[%- FOREACH cpuPlatform IN instance.availableCpuPlatform.split(',').sort; cpu = cpuPlatform.remove('\s'); -%]
[%- FOREACH z IN zones; IF z.name == zone; available = z.availableCpuPlatforms.remove('\s'); END; END; -%]
[%- IF available.search(cpu) -%]
#    --min-cpu-platform='[% cpuPlatform.remove('^\s').remove('\s$') %]' \
[% # do not remove this line %]
[%- END; END; END -%]
gcloud compute instances create [% instance.name %]-[% zone %] \
--zone='[% zone %]' \
--machine-type='[% instance.name %]' \
--min-cpu-platform='AUTOMATIC' \
--boot-disk-type='pd-ssd' \
--image-project='ubuntu-os-cloud' \
--image-family=[% IF instance.arm %]'ubuntu-2204-lts-arm64'[% ELSE %]'ubuntu-2204-lts'[% END %]
[% END; END; %]

Boot disk types Operating system images

Google Cloud Pricing and Cost Calculator gcosts

Calculate estimated monthly costs of Google Cloud Platform products and resources via YAML files and gcosts Linux CLI program. Copy and paste the YAML to a new usage file [% instance.name %]-[% instance.region %].yml. More help can be found in the documentation of the gcosts CLI program.

# gcosts YAML usage file
# Help: https://bit.ly/gcosts-usage
# Machine type: [% site.url %]/[% instance.region %]/[% instance.name %].html
region: [% instance.region %]
instances:
  - name: [% instance.name %]-[% instance.region %]
    type: [% instance.name %]
    commitment: 0
    disks:
      - name: boot-[% instance.name %]-[% instance.region %]
        type: ssd
        data: 75
      - name: snapshot-[% instance.name %]-[% instance.region %]
        type: snapshot
        data: 10
[% PROCESS footer.tt2 %] ================================================ FILE: build/src/instances.tt2 ================================================ [%- PROCESS header.tt2 -%] [%- PROCESS instances_header.tt2 -%]

Google Compute Engine Machine Types

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

[%- PROCESS instances_tr.tt2; -%] [%- instanceTh() -%] [%- FOREACH instance IN instances; instanceTr(instance); END -%]
[% PROCESS footer.tt2 %] ================================================ FILE: build/src/instances_header.tt2 ================================================ ================================================ FILE: build/src/instances_tr.tt2 ================================================ [%- MACRO instanceTh BLOCK -%] Machine Type Regions Costs (Avg. Region) OS Name vCPU Base Clock Memory # Hour Spot Month 1Y CUD 3Y CUD SLES RHEL Windows [%- END -%] [%- MACRO instanceTr(instance) BLOCK -%] [% instance.name %] [% instance.vCpus %][% badgeSharedCpu(instance) %] [% instance.cpuBaseClock %] [% instance.memoryGB %] [% badgeCpuManufactur(instance) %] [% badgeGpu(instance) %] [% badgeSap(instance) %] [% badgeHana(instance) %] [% badgeSpot(instance) %] [% badgeSud(instance) %] [% badgeLocalSsd(instance) %] [% instance.regionCount %] [% instance.avgHour %] [% instance.avgHourSpot %] [% instance.avgMonth %] [% instance.avgMonth1yCud %] [% instance.avgMonth3yCud %] [% instance.monthSles %] [% instance.monthRhel %] [% instance.monthWindows %] [%- END -%] [%- MACRO instancePlatformTh BLOCK -%] Machine Type Regions Costs (Avg. Region) OS Name vCPU Base Clock Platform Memory # Hour Spot Month 1Y CUD 3Y CUD SLES RHEL Windows [%- END -%] [%- MACRO instancePlatformTr(instance) BLOCK -%] [% instance.name %] [% instance.vCpus %][% badgeSharedCpu(instance) %] [% instance.cpuBaseClock %] [% instance.cpuPlatform | replace('\[','') | replace('\]','') | replace('Intel','') | replace('AMD','') %] [% instance.memoryGB %] [% badgeGpu(instance) %] [% badgeSap(instance) %] [% badgeHana(instance) %] [% badgeSpot(instance) %] [% badgeSud(instance) %] [% badgeLocalSsd(instance) %] [% instance.regionCount %] [% instance.avgHour %] [% instance.avgHourSpot %] [% instance.avgMonth %] [% instance.avgMonth1yCud %] [% instance.avgMonth3yCud %] [% instance.monthSles %] [% instance.monthRhel %] [% instance.monthWindows %] [%- END -%] ================================================ FILE: build/src/intel.tt2 ================================================ [%- PROCESS header.tt2 -%] [%- PROCESS instances_header.tt2 -%]

Google Compute Engine Machine Types with Intel CPU Platform

[%- countIntel = 0; FOREACH instance IN instances; IF instance.intel; countIntel = countIntel + 1; END; END -%]

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

✅ Instance Picker with filter on CPU Platform

[%- PROCESS instances_tr.tt2; -%] [%- instancePlatformTh() -%] [%- FOREACH instance IN instances; IF instance.intel; instancePlatformTr(instance); END; END -%]
[% PROCESS footer.tt2 %] ================================================ FILE: build/src/macros.tt2 ================================================ [%- MACRO badgeSharedCpu(instance) BLOCK -%] [% IF instance.sharedCpu %] Shared[% END %] [%- END -%] [%- MACRO badgeCpuManufactur(instance) BLOCK -%] [% IF instance.intel %]Intel[% END %] [% IF instance.amd %]AMD[% END %] [% IF instance.arm %]Arm[% END %] [%- END -%] [%- MACRO badgeSud(instance) BLOCK -%] [% IF instance.sud %]SUD[% END %] [%- END -%] [%- MACRO badgeGpu(instance) BLOCK -%] [% IF instance.acceleratorCount && instance.acceleratorCount > 0; %]GPU[% END %] [%- END -%] [%- MACRO badgeLocalSsd(instance) BLOCK -%] [% IF instance.localSsd %]Local SSD[% END %] [%- END -%] [%- MACRO badgeSap(instance) BLOCK -%] [% IF instance.sap %]SAP[% END %] [%- END -%] [%- MACRO badgeHana(instance) BLOCK -%] [% IF instance.hana %]HANA[% END %] [%- END -%] [%- MACRO badgeSpot(instance) BLOCK -%] [% IF instance.spot %]Spot[% END %] [%- END -%] [%- MACRO badgeImageArch(architecture) BLOCK -%] [% IF architecture %][% architecture %][% END %] [%- END -%] [%- MACRO badgeLowCo2Region(region) BLOCK -%] [% IF region.regionLowCo2 %]🍃 Low CO2 [%- END -%] [%- END -%] [%- MACRO iconLowCo2Region(region) BLOCK -%] [% IF region.regionLowCo2 %]🍃 [%- END -%] [%- END -%] [%- MACRO booleanLocalSsd(instance) BLOCK -%] [% IF instance.localSsd %]✔️[% ELSE %]❌[% END %] [%- END -%] [%- MACRO bundledLocalSsd(instance) BLOCK -%] [% IF instance.localSsd > 1 %] Bundled with [% instance.localSsd FILTER format("%.0f") %] GB [% ELSIF instance.name.search('-lssd') %] Mandatory, additional costs! [% ELSE %] Optional [% END %] [%- END -%] [%- MACRO booleanSpot(instance) BLOCK -%] [% IF instance.spot %]✔️[% ELSE %]❌[% END %] [%- END -%] [%- MACRO booleanSud(instance) BLOCK -%] [% IF instance.sud %]✔️[% ELSE %]❌[% END %] [%- END -%] [%- MACRO booleanSap(instance) BLOCK -%] [% IF instance.sap %]✔️ Certified for SAP[% ELSE %]❌[% END %] [%- END -%] [%- MACRO booleanHana(instance) BLOCK -%] [% IF instance.hana %]✔️ Certified for SAP HANA[% ELSE %]❌[% END %] [%- END -%] [%- MACRO listCpuPlatform(instance) BLOCK -%]
    [% FOREACH cpuPlatform IN instance.cpuPlatform.split(',').sort %]
  • [% cpuPlatform %]
  • [% END %]
[%- END -%] [%- MACRO tableCompareText(a, b) BLOCK -%] [% IF a == b %]=[% ELSE %]≠[% END %] [%- END -%] [%- MACRO tableCompareNumber(a, b) BLOCK -%] [%- diff = b - a; IF b == a -%] = [%- ELSIF b > a -%] +[% diff FILTER format("%.2f") %] [%- ELSE -%] [% diff FILTER format("%.2f") %] [%- END; END; -%] [%- MACRO tableCompareBoolean(a, b) BLOCK -%] [% IF a == b %] = [%- ELSIF b > a -%] + [%- ELSE -%] - [%- END; END; -%] [%- MACRO tableCompareCosts(a, b) BLOCK -%] [%- difference = b - a; -%] [%- IF b == a -%] = [%- ELSIF b < a -%] [% difference FILTER format("%.4f") %] [%- ELSE -%] +[% difference FILTER format("%.4f") %] [%- END; END; -%] [%- MACRO imageProjectName(project) BLOCK -%] [%- IF project == 'almalinux-cloud' -%]AlmaLinux [%- ELSIF project == 'centos-cloud' -%]CentOS [%- ELSIF project == 'cloud-hpc-image-public' -%]HPC [%- ELSIF project == 'cos-cloud' -%]Container-Optimized OS [%- ELSIF project == 'debian-cloud' -%]Debian GNU/Linux [%- ELSIF project == 'deeplearning-platform-release' -%]Deep Learning [%- ELSIF project == 'fedora-cloud' -%]Fedora [%- ELSIF project == 'fedora-coreos-cloud' -%]Fedora CoreOS [%- ELSIF project == 'freebsd-org-cloud-dev' -%]FreeBSD [%- ELSIF project == 'ml-images' -%]Machine Learning [%- ELSIF project == 'opensuse-cloud' -%]openSUSE [%- ELSIF project == 'oracle-linux-cloud' -%]Oracle Linux [%- ELSIF project == 'rhel-cloud' -%]Red Hat Enterprise Linux [%- ELSIF project == 'rhel-sap-cloud' -%]Red Hat Enterprise Linux for SAP [%- ELSIF project == 'rocky-linux-accelerator-cloud' -%]Rocky Linux (NVIDIA) [%- ELSIF project == 'rocky-linux-cloud' -%]Rocky Linux [%- ELSIF project == 'suse-cloud' -%]SUSE Linux Enterprise Server [%- ELSIF project == 'suse-sap-cloud' -%]SUSE Linux Enterprise Server for SAP [%- ELSIF project == 'ubuntu-os-accelerator-images' -%]Ubuntu (NVIDIA) [%- ELSIF project == 'ubuntu-os-cloud' -%]Ubuntu [%- ELSIF project == 'ubuntu-os-pro-cloud' -%]Ubuntu Pro [%- ELSIF project == 'windows-cloud' -%]Microsoft Windows Server [%- ELSIF project == 'windows-sql-cloud' -%]Microsoft SQL Server [%- ELSE -%][% project %] [%- END; END; -%] [%- MACRO countryFlag(code) BLOCK -%] [%- IF code == '??' -%]🏳️ [%- ELSIF code == 'AU' -%]🇦🇺 [%- ELSIF code == 'BE' -%]🇧🇪 [%- ELSIF code == 'BR' -%]🇧🇷 [%- ELSIF code == 'CA' -%]🇨🇦 [%- ELSIF code == 'CH' -%]🇨🇭 [%- ELSIF code == 'CL' -%]🇨🇱 [%- ELSIF code == 'DE' -%]🇩🇪 [%- ELSIF code == 'ES' -%]🇪🇸 [%- ELSIF code == 'FI' -%]🇫🇮 [%- ELSIF code == 'FR' -%]🇫🇷 [%- ELSIF code == 'GB' -%]🇬🇧 [%- ELSIF code == 'HK' -%]🇭🇰 [%- ELSIF code == 'ID' -%]🇮🇩 [%- ELSIF code == 'IL' -%]🇮🇱 [%- ELSIF code == 'IN' -%]🇮🇳 [%- ELSIF code == 'IT' -%]🇮🇹 [%- ELSIF code == 'JP' -%]🇯🇵 [%- ELSIF code == 'KR' -%]🇰🇷 [%- ELSIF code == 'MX' -%]🇲🇽 [%- ELSIF code == 'NL' -%]🇳🇱 [%- ELSIF code == 'PL' -%]🇵🇱 [%- ELSIF code == 'QA' -%]🇶🇦 [%- ELSIF code == 'SA' -%]🇸🇦 [%- ELSIF code == 'SE' -%]🇸🇪 [%- ELSIF code == 'SG' -%]🇸🇬 [%- ELSIF code == 'TH' -%]🇹🇭 [%- ELSIF code == 'TW' -%]🇹🇼 [%- ELSIF code == 'US' -%]🇺🇸 [%- ELSIF code == 'ZA' -%]🇿🇦 [%- ELSE -%]🏴 ??? [%- END; END; -%] [%- MACRO countryName(code) BLOCK -%] [%- IF code == '??' -%]??? [%- ELSIF code == 'AU' -%]Australia [%- ELSIF code == 'BE' -%]Belgium [%- ELSIF code == 'BR' -%]Brazil [%- ELSIF code == 'CA' -%]Canada [%- ELSIF code == 'CH' -%]Switzerland [%- ELSIF code == 'CL' -%]Chile [%- ELSIF code == 'DE' -%]Germany [%- ELSIF code == 'ES' -%]Spain [%- ELSIF code == 'FI' -%]Finland [%- ELSIF code == 'FR' -%]France [%- ELSIF code == 'GB' -%]United Kingdom [%- ELSIF code == 'HK' -%]Hong Kong SAR China [%- ELSIF code == 'ID' -%]Indonesia [%- ELSIF code == 'IL' -%]Israel [%- ELSIF code == 'IN' -%]India [%- ELSIF code == 'IT' -%]Italy [%- ELSIF code == 'JP' -%]Japan [%- ELSIF code == 'KR' -%]South Korea [%- ELSIF code == 'MX' -%]Mexico [%- ELSIF code == 'NL' -%]Netherlands [%- ELSIF code == 'PL' -%]Poland [%- ELSIF code == 'QA' -%]Qatar [%- ELSIF code == 'SA' -%]Saudi Arabia [%- ELSIF code == 'SE' -%]Sweden [%- ELSIF code == 'SG' -%]Singapore [%- ELSIF code == 'TH' -%]Thailand [%- ELSIF code == 'TW' -%]Taiwan [%- ELSIF code == 'US' -%]United States [%- ELSIF code == 'ZA' -%]South Africa [%- ELSE -%]??? [%- END; END; -%] ================================================ FILE: build/src/main.js ================================================ /* * Copyright 2022-2024 Nils Knieling. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * FILTERS */ const filterParamsNumber = { filterOptions: ['equals', 'greaterThan', 'greaterThanOrEqual', 'lessThan', 'lessThanOrEqual'], defaultOption: 'greaterThanOrEqual', debounceMs: 100, }; const filterLowerParamsNumber = { filterOptions: ['equals', 'greaterThan', 'greaterThanOrEqual', 'lessThan', 'lessThanOrEqual'], defaultOption: 'lessThanOrEqual', debounceMs: 100, }; const filterParamsText = { filterOptions: ['equals', 'notEqual', 'contains', 'notContains', 'startsWith', 'endsWith'], defaultOption: 'contains', debounceMs: 100, }; const filterParamsBoolean = { filterOptions: ['equals'], defaultOption: 'equals', maxNumConditions: 1, debounceMs: 0, }; /* * FORMATTERS */ function booleanFormatter(params) { return (params.value >= 1) ? '✅ (1)' : '❌ (0)'; } function lowCo2Formatter(params) { return (params.value >= 1) ? '🍃 (1)' : '❌ (0)'; } function nullFormatter(params) { return (params.value >= 0.01) ? params.value : '?'; } /* * GRID */ const gridOptions = { columnDefs: [ // groupId: 0 { headerName: 'Machine Type', children: [ { headerName: 'Name', field: "name", cellRenderer: params => { return ''+ params.value + ''; }, tooltipValueGetter: params => { return 'Machine type '+ params.value +' ('+ params.data.vCpus + ' vCPUs, '+ params.data.memoryGB + ' GB, '+ params.data.bandwidth + ' Gbps) in region '+ params.data.region; }, pinned: 'left', //rowDrag: true, checkboxSelection: true, width: 180, }, ] }, // groupId: 1 { headerName: 'Region', children: [ { headerName: 'Name', field: "region", tooltipField: 'region', width: 120, }, { headerName: 'Location', field: "regionLocation", columnGroupShow: 'open', tooltipField: 'regionLocationLong', width: 120 }, { headerName: 'Country', field: "regionLocationCountryCode", headerTooltip: 'ISO 3166-1 alpha-2 country code', columnGroupShow: 'open', width: 90 }, { headerName: 'Low CO2', field: "regionLowCo2", columnGroupShow: 'open', filterParams: filterParamsBoolean, valueFormatter: lowCo2Formatter, width: 90 }, { headerName: 'CFE%', headerTooltip: 'Google CFE%: Average percentage of carbon free energy consumed in a particular location on an hourly basis', field: "regionCfe", columnGroupShow: 'open', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, valueFormatter: nullFormatter, width: 90 }, { headerName: 'gCO2eq/kWh', headerTooltip: 'Grid carbon intensity (gCO2eq/kWh): Average lifecycle gross emissions per unit of energy from the grid', field: "regionCo2Kwh", columnGroupShow: 'open', filter: 'agNumberColumnFilter', filterParams: filterLowerParamsNumber, valueFormatter: nullFormatter, width: 120 }, ] }, // groupId: 2 { headerName: 'Zones', children: [ { headerName: '#Zones', field: "zoneCount", filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, cellClass: params => { if (params.value <= 1) { return 'warning' } }, width: 90, headerTooltip: 'Available in zones', }, { headerName: 'Names', field: "zones", columnGroupShow: 'open', tooltipField: 'zones', width: 180, headerTooltip: 'Available in zone names', }, ] }, // groupId: 3 // groupId is used in setColumnGroupState for inital filter { headerName: 'Prozessor', children: [ { headerName: 'vCPUs', field: "vCpus", filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, cellClass: params => { if (params.data.sharedCpu >= 1) { return 'sharedCpu' } }, headerTooltip: 'A vCPU represents a single logical CPU thread', width: 90, }, { headerName: 'Frequency', field: "cpuBaseClock", filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, headerTooltip: 'CPU base clock frequency', width: 120, cellClass: 'frequency', }, { headerName: 'Turbo Frequency', field: "cpuTurboClock", columnGroupShow: 'open', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, headerTooltip: 'CPU all-core turbo frequency / effective frequency', width: 120, cellClass: 'frequency', }, { headerName: 'Max. Turbo Frequency', field: "cpuSingleMaxTurboClock", columnGroupShow: 'open', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, headerTooltip: 'CPU single-core max turbo frequency / max boost frequency', width: 120, cellClass: 'frequency', }, { headerName: 'Shared', field: 'sharedCpu', columnGroupShow: 'open', filterParams: filterParamsBoolean, valueFormatter: booleanFormatter, headerTooltip: 'Fractional vCPU (1, 0) [Each vCPU can burst up to 100% of CPU time, for short periods, before returning to the time limitations]', width: 90 }, { headerName: 'Intel', field: 'intel', columnGroupShow: 'open', filterParams: filterParamsBoolean, valueFormatter: booleanFormatter, headerTooltip: 'Intel CPU processors (1, 0)', width: 90 }, { headerName: 'AMD', field: 'amd', columnGroupShow: 'open', filterParams: filterParamsBoolean, valueFormatter: booleanFormatter, headerTooltip: 'AMD CPU processors (1, 0)', width: 90 }, { headerName: 'Arm', field: 'arm', columnGroupShow: 'open', filterParams: filterParamsBoolean, valueFormatter: booleanFormatter, headerTooltip: 'Arm-based CPU processors (1, 0)', width: 90 }, { headerName: '#Available', field: 'availableCpuPlatformCount', columnGroupShow: 'open', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, headerTooltip: 'Available CPU platforms for machine type in regions', width: 90 }, { headerName: 'Available CPU Platform', field: 'availableCpuPlatform', columnGroupShow: 'open', headerTooltip: 'Available CPU flatform for machine type in region', tooltipField: 'availableCpuPlatform' }, { headerName: '#Div', field: 'notAvailableCpuPlatformCount', columnGroupShow: 'open', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, cellClass: params => { if (params.value >= 1) { return 'warning' } }, headerTooltip: 'Not available CPU platforms for machine type in regions', width: 90 }, { headerName: '#Platform', field: 'cpuPlatformCount', columnGroupShow: 'open', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, headerTooltip: 'Available CPU platforms for machine type in regions', width: 90 }, { headerName: 'CPU Platform', field: 'cpuPlatform', columnGroupShow: 'open', headerTooltip: 'Available CPU platform for machine type', tooltipField: 'cpuPlatform' }, ] }, // groupId: 4 { headerName: 'Benchmark', children: [ { headerName: 'CoreMark', field: "coremarkScore", filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, headerTooltip: 'EEMBC CoreMark Benchmark (please see www.eembc.org/coremark)', width: 120 }, { headerName: 'StdDev%', field: "standardDeviation", columnGroupShow: 'open', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, headerTooltip: 'EEMBC CoreMark Standard Deviation (%)', width: 120 }, { headerName: '#Samples', field: "sampleCount", columnGroupShow: 'open', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, headerTooltip: 'EEMBC CoreMark Sample Count', width: 120 }, { headerName: 'SAPS', field: 'saps', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, columnGroupShow: 'open', headerTooltip: 'SAP Standard Benchmark (please see SAP Note 1612283 and 2456432)', width: 90 } ] }, // groupId: 5 { headerName: 'Memory', children: [ { headerName: 'RAM', field: "memoryGB", cellClass: 'memory', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, headerTooltip: 'Random-access memory (GB)', width: 120, }, ] }, // groupId: 6 { headerName: 'Network', children: [ { headerName: 'Bandwidth', field: "bandwidth", cellClass: 'bandwidth', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, headerTooltip: 'Maximum egress bandwidth (Gbps) cannot exceed the number given', width: 120, }, { headerName: 'Tier 1', field: "tier1", cellClass: 'bandwidth', columnGroupShow: 'open', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, headerTooltip: 'High-bandwidth (Gbps) networking for larger machine types', width: 120 }, ] }, // groupId: 7 { headerName: 'Storage', children: [ { headerName: 'Disk Size', field: "diskSizeTiB", cellClass: 'diskSize', width: 100, filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, headerTooltip: 'Max. total persistent disk size (TB) [Disk usage is charged separately from machine type pricing!]' }, { headerName: '#Disks', field: "disks", columnGroupShow: 'open', width: 90, filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, headerTooltip: 'Max. number of persistent disks (PDs) [Disk usage is charged separately from machine type pricing!]' }, { headerName: 'Local SSD', field: "localSsd", columnGroupShow: 'open', filterParams: filterParamsBoolean, valueFormatter: booleanFormatter, width: 90, headerTooltip: 'VM supports local solid-state drive (SSD) block storage' }, ] }, // groupId: 8 { headerName: '$ Hour', children: [ { headerName: 'Hour', field: "hour", width: 90, cellClass: 'currency', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, // Default sorting on the hour column sort: 'asc', headerTooltip: 'Costs per hour' }, { headerName: 'Spot', field: 'hourSpot', width: 90, cellClass: 'currency', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, headerTooltip: 'Costs per hour spot provisioning model (Spot VM)' }, { headerName: 'CoreMark/$h', field: "coremarkHour", width: 120, filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, valueFormatter: nullFormatter, columnGroupShow: 'open', headerTooltip: 'EEMBC CoreMark Benchmark / costs per hour' }, { headerName: 'SAPS/$h', field: "sapsHour", width: 110, filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, valueFormatter: nullFormatter, columnGroupShow: 'open', headerTooltip: 'SAP Standard Benchmark / costs per hour' } ] }, // groupId: 9 { headerName: '$ Month', children: [ { headerName: 'Month', field: "month", width: 120, cellClass: 'currency', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, headerTooltip: 'Costs per month' }, { headerName: 'SUD', field: "sud", filterParams: filterParamsBoolean, valueFormatter: booleanFormatter, width: 90, columnGroupShow: 'open', headerTooltip: 'Instance with SUD (sustained use discounts are automatic discounts for running specific Compute Engine resources)' }, { headerName: '1Y CUD', field: "month1yCud", width: 120, cellClass: 'currency', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, columnGroupShow: 'open', headerTooltip: 'Costs per month with 1 year commitment (CUD)' }, { headerName: '3Y CUD', field: "month3yCud", width: 120, cellClass: 'currency', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, columnGroupShow: 'open', headerTooltip: 'Costs per month with 3 year commitment (CUD)' }, { headerName: 'Spot', field: 'monthSpot', width: 120, cellClass: 'currency', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, columnGroupShow: 'open', headerTooltip: 'Costs per month spot provisioning model (Spot VM)' } ] }, // groupId: 10 { headerName: 'Licenses', children: [ { headerName: 'SLES', field: 'monthSles', width: 100, cellClass: 'currency', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, headerTooltip: 'SUSE Linux Enterprise Server (cost per month)' }, { headerName: 'RHEL', field: 'monthRhel', width: 100, cellClass: 'currency', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, columnGroupShow: 'open', headerTooltip: 'Red Hat Enterprise Linux (cost per month)' }, { headerName: 'RHEL w. 1Y CUD', field: 'monthRhel1yCud', width: 120, cellClass: 'currency', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, columnGroupShow: 'open', headerTooltip: 'Red Hat Enterprise Linux with 1 year CUD (cost per month)' }, { headerName: 'RHEL w. 3Y CUD', field: 'monthRhel3yCud', width: 120, cellClass: 'currency', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, columnGroupShow: 'open', headerTooltip: 'Red Hat Enterprise Linux with 3 year CUD (cost per month)' }, { headerName: 'Windows', field: 'monthWindows', width: 120, cellClass: 'currency', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, columnGroupShow: 'open', headerTooltip: 'Microsoft Windows Server (cost per month)' }, { headerName: 'SLES for SAP', field: 'monthSlesSap', width: 120, cellClass: 'currency', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, columnGroupShow: 'open', headerTooltip: 'SUSE Linux Enterprise Server for SAP (cost per month)' }, { headerName: 'SLES for SAP w. 1Y CUD', field: 'monthSlesSap1yCud', width: 120, cellClass: 'currency', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, columnGroupShow: 'open', headerTooltip: 'SUSE Linux Enterprise Server for SAP with 1 year CUD (cost per month)' }, { headerName: 'SLES for SAP w. 3Y CUD', field: 'monthSlesSap3yCud', width: 120, cellClass: 'currency', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, columnGroupShow: 'open', headerTooltip: 'SUSE Linux Enterprise Server for SAP with 3 year CUD (cost per month)' }, { headerName: 'RHEL for SAP', field: 'monthRhelSap', width: 120, cellClass: 'currency', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, columnGroupShow: 'open', headerTooltip: 'Red Hat Enterprise Linux for SAP (cost per month)' }, { headerName: 'RHEL for SAP w. 1Y CUD', field: 'monthRhelSap1yCud', width: 120, cellClass: 'currency', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, columnGroupShow: 'open', headerTooltip: 'Red Hat Enterprise Linux for SAP with 1 year CUD (cost per month)' }, { headerName: 'RHEL for SAP w. 3Y CUD', field: 'monthRhelSap3yCud', width: 120, cellClass: 'currency', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, columnGroupShow: 'open', headerTooltip: 'Red Hat Enterprise Linux for SAP with 3 year CUD (cost per month)' }, ] }, // groupId: 11 // groupId is used in setColumnGroupState for inital filter { headerName: 'More... (SAP, GPU)', children: [ { headerName: 'Family', field: "family", width: 180, tooltipField: 'family', headerTooltip: 'A curated set of processor and hardware configurations optimized for specific workloads' }, { headerName: 'Spot', field: "spot", filterParams: filterParamsBoolean, valueFormatter: booleanFormatter, width: 90, columnGroupShow: 'open', headerTooltip: 'Instance supports spot provisioning mode (Spot VM)' }, { headerName: 'SAP', field: "sap", filterParams: filterParamsBoolean, valueFormatter: booleanFormatter, width: 80, columnGroupShow: 'open', headerTooltip: 'Certified for SAP applications on Google Cloud' }, { headerName: 'HANA', field: "hana", filterParams: filterParamsBoolean, valueFormatter: booleanFormatter, width: 90, columnGroupShow: 'open', headerTooltip: 'Certified for SAP HANA on Google Cloud' }, { headerName: 'Series', field: "series", width: 110, columnGroupShow: 'open', headerTooltip: 'Machine families are further classified by series and generation' }, { headerName: 'GPUs', field: "acceleratorCount", columnGroupShow: 'open', filter: 'agNumberColumnFilter', filterParams: filterParamsNumber, width: 100 }, { headerName: 'GPU Type', field: "acceleratorType", columnGroupShow: 'open' } ] } ], // Defaults defaultColDef: { resizable: true, sortable: true, minWidth: 90, maxWidth: 400, //width: 110, filter: 'agTextColumnFilter', filterParams: filterParamsText, floatingFilter: true, //editable: true, }, groupHideOpenParents: true, tooltipShowDelay: 0, debounceVerticalScrollbar: true, ensureDomOrder: true, suppressColumnVirtualisation: true, rowBuffer: 60, rowSelection: 'multiple', rowMultiSelectWithClick: true, //rowDragManaged: true, //rowDragMultiRow: true, pagination: true, paginationPageSize: 50, //domLayout: 'autoHeight', }; // lookup the container we want the Grid to use const eGridDiv = document.querySelector('#myGrid'); // create the grid passing in the div to use together with the columns & data we want to use const gridApi = agGrid.createGrid(eGridDiv, gridOptions); // fetch the row data to use and one ready provide it to the Grid via the Grid API fetch('instance_in_region.json?[% timestamp %]') .then(response => response.json()) .then(data => { gridApi.setGridOption('rowData', data) } ); /* * URL FILTER */ // URL params for initial filter const queryString = window.location.search; const urlParams = new URLSearchParams(queryString); const urlRegion = urlParams.get('region') || ''; const urlName = urlParams.get('name') || ''; const urlGPU = urlParams.get('gpu') || ''; const urlSAP = urlParams.get('sap') || ''; const urlHANA = urlParams.get('hana') || ''; const urlPlatform = urlParams.get('platform') || ''; const urlARM = urlParams.get('arm') || ''; // fist time data is rendered into the grid gridApi.setGridOption('onFirstDataRendered', function () { console.log('firstDataRendered'); // Initial filter with URL params let filterName = urlName.replace(/[^\w\d\-]/g,""); let filterRegion = urlRegion.replace(/[^\w\d\-]/g,""); let filterPlatform = urlPlatform.replace(/[^\w\d]/g,""); let filterGPU = (urlGPU >= 1) ? '1' : ''; let filterSAP = (urlSAP >= 1) ? '1' : ''; let filterHANA = (urlHANA >= 1) ? '1' : ''; let filterARM = (urlARM >= 1) ? '1' : ''; // Set filter var hardcodedFilter = { name: { type: 'equals', filter: filterName, }, region: { type: 'equals', filter: filterRegion, }, availableCpuPlatform: { type: 'contains', filter: filterPlatform, }, acceleratorCount: { type: 'greaterThanOrEqual', filter: filterGPU, }, sap: { type: 'equals', filter: filterSAP, }, hana: { type: 'equals', filter: filterHANA, }, arm: { type: 'equals', filter: filterARM, }, }; // Open groups var hardcodedGroupState = []; if (filterPlatform || filterARM ) { hardcodedGroupState.push({ groupId: '3', open: true }); } if (filterGPU || filterSAP || filterHANA) { hardcodedGroupState.push({ groupId: '11', open: true }); } // wait 500ms, because maybe the DOM isn't completely ready yet setTimeout(function(){ gridApi.setColumnGroupState(hardcodedGroupState); gridApi.setFilterModel(hardcodedFilter); }, 500); }); /* * KEYBOARD */ document.addEventListener('keydown', function(event) { // Copy selected rows with shown column if ((event.ctrlKey || event.metaKey) && event.key === 'c') { navigator.clipboard.writeText(gridApi.getDataAsCsv({ skipColumnGroupHeaders: true, skipColumnHeaders: true, allColumns: false, onlySelected: true, })); } // Copy selected rows with all column if ((event.ctrlKey || event.metaKey) && event.key === 'x') { navigator.clipboard.writeText(gridApi.getDataAsCsv({ skipColumnGroupHeaders: true, skipColumnHeaders: true, allColumns: true, onlySelected: true, })); } if ((event.ctrlKey || event.metaKey) && event.key === '/') { document.querySelector('[aria-label="vCPUs Filter Input"]').focus(); } }); ================================================ FILE: build/src/map.tt2 ================================================ Google Cloud Platform Region Map [% PROCESS favicon.tt2 %]
================================================ FILE: build/src/meta.tt2 ================================================ [%- # title = Recommended title length is between 50 and 60 characters. # description = Recommendation today is to keep your page description between 110 and 160 characters. # og:title = 40 characters for mobile and 60 for desktop is roughly the sweet spot. # og:description = Facebook recommends 2–4 sentences, but that often truncates. -%] [%- IF template.name == 'index.tt2' -%] Google Cloud Compute Engine Machine Type Comparison [%- ELSIF template.name == 'instances.tt2' -%] GCE Machine Types in Google Cloud Platform [%- ELSIF template.name == 'intel.tt2' -%] Machine Types with Intel CPU in Google Cloud Platform [%- ELSIF template.name == 'amd.tt2' -%] Machine Types with AMD CPU in Google Cloud Platform [%- ELSIF template.name == 'arm.tt2' -%] Machine Types with Arm-based CPU in Google Cloud Platform [%- ELSIF template.name == 'gpu.tt2' -%] Machine Types with GPU in Google Cloud Platform [%- ELSIF template.name == 'sap.tt2' -%] Certified machine types for SAP on Google Cloud Platform [%- ELSIF template.name == 'hana.tt2' -%] Certified machine types for HANA on Google Cloud Platform [%- ELSIF template.name == 'disks.tt2' -%] GCE Disk Types in Google Cloud Platform [%- ELSIF template.name == 'disk.tt2' -%] [% disk.name %] - Google Cloud Compute Disk Type [%- ELSIF template.name == 'regions.tt2' -%] Google Cloud Platform Regions with GCE Machines [%- ELSIF template.name == 'platforms.tt2' -%] Compute Engine CPU Platforms in Google Cloud Regions [%- ELSIF template.name == 'diskpricing.tt2' -%] Persistent Disk Pricing in Google Cloud Regions [%- ELSIF template.name == 'instance.tt2' -%] [% instance.name %] - Google Cloud Compute Machine [%- ELSIF template.name == 'comparison.tt2' -%] [% instance_a.name %] / [% instance_b.name %] - Google Cloud [%- ELSIF template.name == 'vs.tt2'-%] [% instance_a.name %] - GCE Machine Type Comparison [%- ELSIF template.name == 'region.tt2'-%] [% region.name %] - Google Cloud Platform Region [%- ELSIF template.name == 'instance_in_region.tt2'-%] [% instance.name %] in [% instance.region %] - Google Cloud [%- ELSIF template.name == 'images.tt2' -%] Operating System Images - Google Cloud Platform [%- ELSIF template.name == 'download.tt2' -%] Download Google Compute Engine Machine Types [%- ELSIF template.name == 'gcosts.tt2' -%] Google Cloud Pricing and Cost Calculator [%- ELSIF template.name == 'imprint.tt2'-%] Imprint - gcloud-compute.com [%- ELSIF template.name == '404.tt2'-%] 404 - Page Not Found [%- ELSE -%] Google Cloud Platform GCE Machine Type Comparison [%- END -%] ================================================ FILE: build/src/platforms.tt2 ================================================ [%- PROCESS header.tt2 -%] [%- PROCESS regions_header.tt2 -%]

Available CPU Platforms in Google Cloud Regions

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

🗺️ Region Map ⏱️ Ping

[% FOREACH region IN regions %] [% IF region.intelGraniteRapids %][% ELSE %][% END %] [% IF region.intelEmeraldRapids %][% ELSE %][% END %] [% IF region.intelSapphireRapids %][% ELSE %][% END %] [% IF region.intelIceLake %][% ELSE %][% END %] [% IF region.intelCascadeLake %][% ELSE %][% END %] [% IF region.intelSkylake %][% ELSE %][% END %] [% IF region.amdTurin %][% ELSE %][% END %] [% IF region.amdGenoa %][% ELSE %][% END %] [% IF region.amdMilan %][% ELSE %][% END %] [% IF region.amdRome %][% ELSE %][% END %] [% IF region.armAmpereAltra %][% ELSE %][% END %] [% IF region.armGoogleAxion %][% ELSE %][% END %] [% END %]
Region Zones Intel AMD Arm (Ampere, Google)
Name Location Country # Granite Emerald Sapphire Ice Cascade Skylake Turin Genoa Milan Rome Altra Axion
[% region.name %] [% IF region.regionLocation %][% region.regionLocation %][% ELSE %]?[% END %] [% badgeLowCo2Region(region) %] [% IF region.regionLocationCountryCode %] [% countryFlag(region.regionLocationCountryCode) %] [% countryName(region.regionLocationCountryCode) %] [% ELSE %] ? [% END %] [% 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
[% PROCESS footer.tt2 %] ================================================ FILE: build/src/popin-min.js ================================================ var e=document.createElement('div'); e.id='i59UOEcRSLY1gwtC'; e.style.display='none'; document.body.appendChild(e); ================================================ FILE: build/src/region.tt2 ================================================ [%- PROCESS header.tt2 -%]

Google Cloud Region [% region.name %] [% IF region.regionLocation %] [% region.regionLocation %][% END %] [% badgeLowCo2Region(region) %]

Out of a total of [% instances.size %] Google Compute Engine machine types, [% instances_in_region.size %] machine types are available in Google Cloud region [% region.name %] ([% countryFlag(region.regionLocationCountryCode) %] [% IF region.regionLocationLong %][% region.regionLocationLong %][% ELSIF region.regionLocation %][% region.regionLocation %][% END %]).

✅ Instance Picker with filter on region [% region.name %] [% IF region.regionLat && region.regionLng %]🗺️ Show region [% region.name %] on Google Maps[% END %]

Persistent Disk Types

Costs and pricing for Google Compute disk types in Google Cloud region [% region.name %][% IF region.regionLocation %] ([% region.regionLocation %])[% END %].

[% FOREACH disk IN disks_in_region; minDiskSize = 10; IF disk.name == 'pd-extreme'; minDiskSize = 500; END; IF disk.name == 'local-ssd'; minDiskSize = 375; END; %] [% IF disk.monthGb %] [% ELSE %] [% END %] [% END %]
Name Description 1 GB Min. Disk Size Min. Month
[% disk.name %] [% disk.description %][% disk.monthGb %] [% minDiskSize %] GB [% disk.monthGb*minDiskSize FILTER format("%.2f") %]??? [% minDiskSize %] GB ???

Carbon Data

Higher CFE% will emit lower carbon emissions.

Google CFE% [% IF region.regionCfe %][% region.regionCfe %] %[% ELSE %]?[% END %]
Grid carbon intensity (gCO2eq/kWh) [% IF region.regionCo2Kwh %][% region.regionCo2Kwh %][% ELSE %]?[% END %]
Google Cloud net operational GHG emissions 0

Machine Types in [% region.name %]

Costs and pricing for Google Compute Engine machine types in Google Cloud region [% region.name %][% IF region.regionLocation %] ([% region.regionLocation %])[% END %].

[% FOREACH instance IN instances_in_region %] [% END %]
Machine Type Zones Costs OS
Name vCPU Base Clock Memory #Platf. # Hour Spot Month 1Y CUD 3Y CUD SLES RHEL Windows
[% instance.name %] [% instance.vCpus %][% badgeSharedCpu(instance) %] [% instance.cpuBaseClock %] [% instance.memoryGB %] [% badgeCpuManufactur(instance) %] [% badgeGpu(instance) %] [% badgeSap(instance) %] [% badgeHana(instance) %] [% badgeSpot(instance) %] [% badgeSud(instance) %] [% badgeLocalSsd(instance) %] [% IF instance.availableCpuPlatformCount %][% instance.availableCpuPlatformCount %][% ELSE %]?[% END %] [% instance.zoneCount %] [% instance.hour %] [% instance.hourSpot %] [% instance.month %] [% instance.month1yCud %] [% instance.month3yCud %] [% instance.monthSles %] [% instance.monthRhel %] [% instance.monthWindows %]
[%- id = region.id - 1 prev = id - 1 next = id + 1 -%] [% PROCESS footer.tt2 %] ================================================ FILE: build/src/regions.tt2 ================================================ [%- PROCESS header.tt2 -%] [%- PROCESS regions_header.tt2 -%]

Google Cloud Platform Regions

[% total_public_ip_addr = 0; FOREACH region IN regions; IF region.regionPublicIpv4Addr; total_public_ip_addr = total_public_ip_addr + region.regionPublicIpv4Addr; END; END; %]

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

🗺️ Region Map ⏱️ Ping

[% FOREACH region IN regions %] [% IF region.generalCount %][% ELSE %][% END %] [% IF region.computeCount %][% ELSE %][% END %] [% IF region.memoryCount %][% ELSE %][% END %] [% IF region.acceleratorCount %][% ELSE %][% END %] [% IF region.storageCount %][% ELSE %][% END %] [% IF region.sap %][% ELSE %][% END %] [% IF region.hana %][% ELSE %][% END %] [% END %]
Region IP Addr. Zones Machine Family SAP Costs (e2-standard-8) Carbon
Name Location Country # % # General Compute Memory GPU Storage App. HANA Hour Month CFE% gCO2eq/kWh
[% region.name %] [% IF region.regionLocation %][% region.regionLocation %][% ELSE %]?[% END %] [% badgeLowCo2Region(region) %] [% IF region.regionLocationCountryCode %] [% countryFlag(region.regionLocationCountryCode) %] [% countryName(region.regionLocationCountryCode) %] [% ELSE %] ? [% END %] [% IF region.regionPublicIpv4Addr %][% region.regionPublicIpv4Addr FILTER format("%d") %][% ELSE %]?[% END %] [% IF region.regionPublicIpv4Addr %][% region.regionPublicIpv4Addr / total_public_ip_addr * 100 FILTER format("%.2f") %][% ELSE %]?[% END %] [% region.zoneCount %] [% region.generalCount %]0[% region.computeCount %]0[% region.memoryCount %]0[% region.acceleratorCount %]0[% region.storageCount %]0[% region.sap %]0[% region.hana %]0 [% region.e2Standard8Hour %] [% region.e2Standard8Month %] [% IF region.regionCfe %][% region.regionCfe %][% ELSE %]?[% END %] [% IF region.regionCo2Kwh %][% region.regionCo2Kwh %][% ELSE %]?[% END %]
[% PROCESS footer.tt2 %] ================================================ FILE: build/src/regions_header.tt2 ================================================ ================================================ FILE: build/src/robots.txt ================================================ User-agent: * Disallow: /img/ Disallow: /index.html Disallow: /imprint.html Disallow: /grid.html Disallow: /map.html Disallow: /*.js Disallow: /*.csv Disallow: /*.sql Disallow: /*.gz Disallow: /*.json Disallow: /404.html Disallow: /cdn-cgi/ Disallow: /comparison/ [% FOREACH region IN regions; IF region.name %]Disallow: /[% region.name %]/ [% END; END; %] ================================================ FILE: build/src/sap.tt2 ================================================ [%- PROCESS header.tt2 -%] [%- PROCESS instances_header.tt2 -%]

Certified for SAP Application on Google Cloud Platform

[%- countSAP = 0; FOREACH instance IN instances; IF instance.sap; countSAP = countSAP + 1; END; END -%]

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

✅ Instance Picker with filter on SAP

[% FOREACH instance IN instances; IF instance.sap; %] [% END; END; %]
Machine Type Regions Costs (Avg. Region) OS
Name vCPU Base Clock Memory SAPS # Hour Month 1Y CUD 3Y CUD SLES for SAP RHEL for SAP Windows
[% instance.name %] [% instance.vCpus %][% badgeSharedCpu(instance) %] [% instance.cpuBaseClock %] [% instance.memoryGB %] [% instance.saps %] [% badgeCpuManufactur(instance) %] [% badgeHana(instance) %] [% badgeSpot(instance) %] [% badgeSud(instance) %] [% badgeLocalSsd(instance) %] [% instance.regionCount %] [% instance.avgHour %] [% instance.avgMonth %] [% instance.avgMonth1yCud %] [% instance.avgMonth3yCud %] [% instance.monthSlesSap %] [% instance.monthRhelSap %] [% instance.monthWindows %]
[% PROCESS footer.tt2 %] ================================================ FILE: build/src/sitemap.tt2 ================================================ [% site.url %]/ [% FOREACH file IN files %][% site.url %]/[% file %] [% END %] ================================================ FILE: build/src/vs.tt2 ================================================ [%- PROCESS header.tt2 -%]

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

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

[% FOREACH instance IN instances %] [% IF instance_a.name == instance.name %] [% ELSE %] [% tableCompareNumber(instance_a.vCpus || 0, instance.vCpus || 0) %] [% tableCompareNumber(instance_a.memoryGB || 0, instance.memoryGB || 0) %] [% tableCompareCosts(instance_a.avgHour || 0, instance.avgHour || 0) %] [% tableCompareCosts(instance_a.avgHourSpot || 0, instance.avgHourSpot || 0) %] [% tableCompareCosts(instance_a.avgMonth || 0, instance.avgMonth || 0) %] [% END; END; %]
Name vCPU Memory Avg. costs per hour Avg. costs per Spot VM hour Avg. costs per month
[% instance.name %] [% instance.vCpus %][% badgeSharedCpu(instance) %] [% instance.memoryGB %] [% badgeCpuManufactur(instance) %] [% badgeGpu(instance) %] [% badgeSap(instance) %] [% badgeHana(instance) %] [% badgeSpot(instance) %] [% badgeLocalSsd(instance) %] [% instance.avgHour %] [% instance.avgHourSpot %] [% instance.avgMonth %] [% badgeSud(instance) %]
[% instance.name %] [% instance.vCpus %][% badgeSharedCpu(instance) %] [% instance.memoryGB %] [% badgeCpuManufactur(instance) %] [% badgeGpu(instance) %] [% badgeSap(instance) %] [% badgeHana(instance) %] [% badgeSpot(instance) %] [% badgeLocalSsd(instance) %] [% instance.avgHour %] [% instance.avgHourSpot %] [% instance.avgMonth %] [% badgeSud(instance) %]
[% PROCESS footer.tt2 %] ================================================ FILE: instances/README.md ================================================ # Google Compute Engine Here you can find the SQL files that add the different information from the Google websites. The information is in addition to the data of the Google Cloud Compute API. Feel free to make changes if something is wrong or you want to expand it. The SQL files are read during the [build](../build/) process. ## Machine Types * [Series](./series/) * [A2](./series/a2.sql) * [A3](./series/a2.sql) * [C2](./series/c2.sql) * [C2D](./series/c2d.sql) * [C3](./series/c3.sql) * [C3D](./series/c3d.sql) * [C4](./series/c4.sql) * [C4A](./series/c4a.sql) * [C4D](./series/c4d.sql) * [E2](./series/e2.sql) * [G2](./series/g2.sql) * [M1](./series/m1.sql) * [M2](./series/m2.sql) * [M3](./series/m3.sql) * [M4](./series/m4.sql) * [N1](./series/n1.sql) * [N2](./series/n2.sql) * [N2D](./series/n2d.sql) * [N4](./series/n4.sql) * [N4A](./series/n4a.sql) * [N4D](./series/n4d.sql) * [T2D](./series/t2d.sql) * [T2A](./series/t2a.sql) * [Z3](./series/z3.sql) * [CPU Platform](./series/cpu/) * [Frequency (GHz)](./series/cpu/frequency.sql) * [EEMBC CoreMark Benchmark](./series/cpu/coremark.sql) * [SAP](./series/sap/) * [SAP certified machine types](./series/sap/sap.sql) * [SAP HANA certified machine types](./series/sap/hana.sql) ## Costs The cost per machine type in region and licenses are added with the [gcosts](https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator) program. ## Resources of the Information ================================================ FILE: instances/clean_up.sql ================================================ /* * Delete not yet official 100% released machine types */ DELETE FROM machinetypes WHERE name LIKE 'ct3-%'; DELETE FROM machinetypes WHERE name LIKE 'ct3p-%'; DELETE FROM machinetypes WHERE name LIKE 'ct4p-%'; DELETE FROM machinetypes WHERE name LIKE 'ct5l-%'; DELETE FROM machinetypes WHERE name LIKE 'ct5lp-%'; DELETE FROM machinetypes WHERE name LIKE 'ct5p-%'; DELETE FROM machinetypes WHERE name LIKE 'ct6e-%'; DELETE FROM machinetypes WHERE name LIKE 'x4-%'; /* * Delete not yet official 100% finished regions */ DELETE FROM machinetypes WHERE zone LIKE 'us-west8-%'; DELETE FROM disktypes WHERE zone LIKE 'us-west8-%'; /* * Remove disconnected data centers */ /* us-central2 */ DELETE FROM machinetypes WHERE zone LIKE 'us-central2-%'; DELETE FROM disktypes WHERE zone LIKE 'us-central2-%'; /* us-east2 */ DELETE FROM machinetypes WHERE zone LIKE 'us-east2-%'; DELETE FROM disktypes WHERE zone LIKE 'us-east2-%'; /* us-east7 */ DELETE FROM machinetypes WHERE zone LIKE 'us-east7-%'; DELETE FROM disktypes WHERE zone LIKE 'us-east7-%'; /* europe-west5 */ DELETE FROM machinetypes WHERE zone LIKE 'europe-west5-%'; DELETE FROM disktypes WHERE zone LIKE 'europe-west5-%'; ================================================ FILE: instances/series/a2.sql ================================================ /* A2 Accelerator-optimized high-gpu */ /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ /* https://cloud.google.com/compute/docs/accelerator-optimized-machines#a2_vms */ UPDATE instances SET series = 'a2', family = 'Accelerator-optimized', cpuPlatform = 'Cascade Lake', localSsd = '1', spot = '1' WHERE name LIKE 'a2-%'; UPDATE instances SET bandwidth = '24' WHERE name LIKE 'a2-%-1g'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'a2-%-2g'; UPDATE instances SET bandwidth = '50' WHERE name LIKE 'a2-%-4g'; UPDATE instances SET bandwidth = '100' WHERE name LIKE 'a2-%-8g'; UPDATE instances SET bandwidth = '100' WHERE name LIKE 'a2-%-16g'; UPDATE instances SET localSsd = '375' WHERE name LIKE 'a2-ultragpu-1g'; UPDATE instances SET localSsd = '750' WHERE name LIKE 'a2-ultragpu-2g'; UPDATE instances SET localSsd = '1500' WHERE name LIKE 'a2-ultragpu-4g'; UPDATE instances SET localSsd = '3000' WHERE name LIKE 'a2-ultragpu-8g'; ================================================ FILE: instances/series/a3.sql ================================================ /* A3 Accelerator-optimized machine family */ /* https://cloud.google.com/compute/docs/accelerator-optimized-machines#a3-vms */ UPDATE instances SET series = 'a3', family = 'Accelerator-optimized', cpuPlatform = 'Sapphire Rapids', localSsd = '1', bandwidth = '200', spot = '1' WHERE name LIKE 'a3-%'; UPDATE instances SET localSsd = '6000' WHERE name LIKE 'a3-%-8g'; UPDATE instances SET bandwidth = '800' WHERE name LIKE 'a3-highgpu-8g'; UPDATE instances SET bandwidth = '1600' WHERE name LIKE 'a3-megagpu-8g'; ================================================ FILE: instances/series/c2.sql ================================================ /* C2 Compute-optimized */ /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ /* https://cloud.google.com/compute/docs/compute-optimized-machines#c2_machine_types */ UPDATE instances SET series = 'c2', family = 'Compute-optimized', cpuPlatform = 'Cascade Lake', localSsd = '1', sud = '1', spot = '1' WHERE name LIKE 'c2-%'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'c2-%-4'; UPDATE instances SET bandwidth = '16' WHERE name LIKE 'c2-%-8'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'c2-%-16'; UPDATE instances SET bandwidth = '32', tier1 = '50' WHERE name LIKE 'c2-%-30'; UPDATE instances SET bandwidth = '32', tier1 = '100' WHERE name LIKE 'c2-%-60'; ================================================ FILE: instances/series/c2d.sql ================================================ /* C2D Compute-optimized */ /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ /* https://cloud.google.com/compute/docs/compute-optimized-machines#c2d-standard */ UPDATE instances SET series = 'c2d', family = 'Compute-optimized', cpuPlatform = 'Milan', localSsd = '1', bandwidth = '32', spot = '1' WHERE name LIKE 'c2d-%'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'c2d-%-2'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'c2d-%-4'; UPDATE instances SET bandwidth = '16' WHERE name LIKE 'c2d-%-8'; UPDATE instances SET tier1 = '50' WHERE name LIKE 'c2d-%-32'; UPDATE instances SET tier1 = '50' WHERE name LIKE 'c2d-%-56'; UPDATE instances SET tier1 = '100' WHERE name LIKE 'c2d-%-112'; ================================================ FILE: instances/series/c3.sql ================================================ /* C3 Compute-optimized */ /* https://cloud.google.com/compute/docs/general-purpose-machines#c3-standard_1 */ UPDATE instances SET series = 'c3', family = 'General-purpose', cpuPlatform = 'Sapphire Rapids', localSsd = '0', bandwidth = '32', spot = '1' WHERE name LIKE 'c3-%'; UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c3-%-4%'; UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c3-%-8%'; UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c3-%-22%'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'c3-%-44%'; UPDATE instances SET bandwidth = '62' WHERE name LIKE 'c3-%-88%'; UPDATE instances SET bandwidth = '100' WHERE name LIKE 'c3-%-176%'; UPDATE instances SET bandwidth = '100' WHERE name LIKE 'c3-%-192-metal%'; UPDATE instances SET tier1 = '50' WHERE name LIKE 'c3-%-44%'; UPDATE instances SET tier1 = '100' WHERE name LIKE 'c3-%-88%'; UPDATE instances SET tier1 = '200' WHERE name LIKE 'c3-%-176%'; UPDATE instances SET tier1 = '200' WHERE name LIKE 'c3-%-192-metal%'; UPDATE instances SET localSsd = '1' WHERE name LIKE 'c3-%-lssd'; ================================================ FILE: instances/series/c3d.sql ================================================ /* C3 Compute-optimized */ /* https://cloud.google.com/compute/docs/general-purpose-machines#c3-standard_1 */ UPDATE instances SET series = 'c3d', family = 'General-purpose', cpuPlatform = 'Genoa', localSsd = '0', bandwidth = '20', spot = '1' WHERE name LIKE 'c3d-%'; UPDATE instances SET bandwidth = '40' WHERE name LIKE 'c3d-%-60%'; UPDATE instances SET bandwidth = '60' WHERE name LIKE 'c3d-%-90%'; UPDATE instances SET bandwidth = '100' WHERE name LIKE 'c3d-%-180%'; UPDATE instances SET bandwidth = '100' WHERE name LIKE 'c3d-%-360%'; UPDATE instances SET tier1 = '50' WHERE name LIKE 'c3d-%-30%'; UPDATE instances SET tier1 = '75' WHERE name LIKE 'c3d-%-60%'; UPDATE instances SET tier1 = '100' WHERE name LIKE 'c3d-%-90%'; UPDATE instances SET tier1 = '150' WHERE name LIKE 'c3d-%-180%'; UPDATE instances SET tier1 = '200' WHERE name LIKE 'c3d-%-360%'; UPDATE instances SET localSsd = '1' WHERE name LIKE 'c3d-%-lssd'; ================================================ FILE: instances/series/c4.sql ================================================ /* C4 General-purpose */ /* https://cloud.google.com/compute/docs/general-purpose-machines#c4_series */ UPDATE instances SET series = 'c4', family = 'General-purpose', cpuPlatform = 'Emerald Rapids, Granite Rapids', localSsd = '0', sud = '0', spot = '1' WHERE name LIKE 'c4-%'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'c4-%-2%'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'c4-%-4%'; UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c4-%-8%'; UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c4-%-16%'; UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c4-%-24%'; UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c4-%-32%'; UPDATE instances SET bandwidth = '34' WHERE name LIKE 'c4-%-48%'; UPDATE instances SET bandwidth = '67' WHERE name LIKE 'c4-%-96%'; UPDATE instances SET bandwidth = '100' WHERE name LIKE 'c4-%-144%'; UPDATE instances SET bandwidth = '100' WHERE name LIKE 'c4-%-192%'; UPDATE instances SET bandwidth = '100' WHERE name LIKE 'c4-%-288%'; UPDATE instances SET tier1 = '50' WHERE name LIKE 'c4-%-48%'; UPDATE instances SET tier1 = '100' WHERE name LIKE 'c4-%-96%'; UPDATE instances SET tier1 = '150' WHERE name LIKE 'c4-%-144%'; UPDATE instances SET tier1 = '200' WHERE name LIKE 'c4-%-192%'; UPDATE instances SET tier1 = '200' WHERE name LIKE 'c4-%-288%'; UPDATE instances SET localSsd = '1' WHERE name LIKE 'c4-%-lssd'; UPDATE instances SET localSsd = '1' WHERE name LIKE 'c4-%-lssd-metal'; ================================================ FILE: instances/series/c4a.sql ================================================ /* C4A General-purpose */ /* https://cloud.google.com/compute/docs/general-purpose-machines#c4a_series */ UPDATE instances SET series = 'c4a', family = 'General-purpose', cpuPlatform = 'Google Axion', localSsd = '0', sud = '0', spot = '1' WHERE name LIKE 'c4a-%'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'c4a-%-1%'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'c4a-%-2%'; UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c4a-%-4%'; UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c4a-%-8%'; UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c4a-%-16%'; UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c4a-%-32%'; UPDATE instances SET bandwidth = '34' WHERE name LIKE 'c4a-%-48%'; UPDATE instances SET bandwidth = '45' WHERE name LIKE 'c4a-%-64%'; UPDATE instances SET bandwidth = '50' WHERE name LIKE 'c4a-%-72%'; UPDATE instances SET tier1 = '50' WHERE name LIKE 'c4a-%-32%'; UPDATE instances SET tier1 = '50' WHERE name LIKE 'c4a-%-48%'; UPDATE instances SET tier1 = '75' WHERE name LIKE 'c4a-%-64%'; UPDATE instances SET tier1 = '100' WHERE name LIKE 'c4a-%-72%'; UPDATE instances SET localSsd = '1' WHERE name LIKE 'c4a-%-lssd'; ================================================ FILE: instances/series/c4d.sql ================================================ /* C4D General-purpose */ /* https://cloud.google.com/compute/docs/general-purpose-machines#c4d_machine_types */ UPDATE instances SET series = 'c4d', family = 'General-purpose', cpuPlatform = 'Turin', localSsd = '0', sud = '0', spot = '1' WHERE name LIKE 'c4d-%'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'c4d-%-2%'; UPDATE instances SET bandwidth = '20' WHERE name LIKE 'c4d-%-4%'; UPDATE instances SET bandwidth = '20' WHERE name LIKE 'c4d-%-8%'; UPDATE instances SET bandwidth = '20' WHERE name LIKE 'c4d-%-16%'; UPDATE instances SET bandwidth = '23' WHERE name LIKE 'c4d-%-32%'; UPDATE instances SET bandwidth = '34' WHERE name LIKE 'c4d-%-48%'; UPDATE instances SET bandwidth = '45' WHERE name LIKE 'c4d-%-64%'; UPDATE instances SET bandwidth = '67' WHERE name LIKE 'c4d-%-96%'; UPDATE instances SET bandwidth = '100' WHERE name LIKE 'c4d-%-192%'; UPDATE instances SET bandwidth = '100' WHERE name LIKE 'c4d-%-384%'; UPDATE instances SET tier1 = '50' WHERE name LIKE 'c4d-%-48%'; UPDATE instances SET tier1 = '75' WHERE name LIKE 'c4d-%-64%'; UPDATE instances SET tier1 = '100' WHERE name LIKE 'c4d-%-96%'; UPDATE instances SET tier1 = '150' WHERE name LIKE 'c4d-%-192%'; UPDATE instances SET tier1 = '200' WHERE name LIKE 'c4d-%-384%'; UPDATE instances SET localSsd = '1' WHERE name LIKE 'c4d-%-lssd'; ================================================ FILE: instances/series/cpu/README.md ================================================ # CPU Platforms * Google documentation: * Wikipedia * Intel: * AMD: * AMPERE: * WikiChip * Intel: * AMD: * AMPERE: Performance benchmarks are created with [PerfKitBenchmarker](https://github.com/GoogleCloudPlatform/PerfKitBenchmarker) on Compute Engine VM instances. * Google documentation: * Wikipedia: More help with resource mappings from on-premises hardware to Google Cloud: ## Coremark Benchmark Copy benchmarks from website and paste as unformatted text (Crtl+Shift+V) to spreadsheet (`coremark.ods`) and export as CSV (`coremark.csv`). Run `coremark.pl` to convert CSV to SQL: ```shell perl coremark.pl > coremark.sql ``` ## Intel Intel Xeon processor family ### Sandy Bridge * Code named: Sandy Bridge-EP (E5-46xx) * Release date: 2012 ### Ivy Bridge * Code named: Ivy Bridge-EP (E5-46xx v2) * Release date: 2014 ### Haswell * Code name: Haswell-EP (E5-46xx v3) * Release date: 2015 ### Broadwell * Code name: Broadwell (E3/E5-1xxx/E5-2xxx v4) * Release date: 2015 ### Skylake * Code name: Skylake-SP * Release date: 2017 ### Cascade Lake * Code name: Cascade Lake-SP * Release date: 2019 ### Ice Lake * Code name: Ice Lake-SP * Release date: 2021 ### Sapphire Rapids * Code name: Sapphire Rapids * Release date: 2023 ### Emerald Rapids * Code name: Emerald Rapids * Release date: 2023 * [Wikipedia](https://en.wikipedia.org/wiki/Emerald_Rapids) ### Granite Rapids * Code name: Granite Rapids * Release date: 2024 * [Wikipedia](https://en.wikipedia.org/wiki/Granite_Rapids) ## AMD AMD Zen based Epyc microarchitecture ### Rome * Generation 2nd * Release date: 2019 ### Milan * Generation 3rd * Release date: 2021 ### Milan X * Generation 3rd * Release date: 2022 ### Genoa * Generation 4rd * Release date: 2022 ## Arm ### Ampere Altra * SKU: Q64-30 * Cores: 64 * Frequency: 3.0 GHz * TDP: 180 W * Release date: 2020 ================================================ FILE: instances/series/cpu/coremark.csv ================================================ MACHINE_TYPE;CPU;vCores;COREMARK_SCORE;STANDARD_DEVIATION;SAMPLE_COUNT n2-standard-2 ;Ice Lake ;2;34,735 ;0.53 ;3672 n2-standard-4 ;Ice Lake ;4;66,884 ;0.61 ;2336 n2-standard-8 ;Ice Lake ;8;138,567 ;0.67 ;1592 n2-standard-16 ;Ice Lake ;16;277,010 ;0.72 ;616 n2-standard-32 ;Ice Lake ;32;553,662 ;0.77 ;312 n2-standard-48 ;Ice Lake ;48;824,915 ;1.18 ;216 n2-standard-64 ;Ice Lake ;64;1,091,008 ;1.34 ;168 n2-standard-80 ;Ice Lake ;80;1,365,998 ;1.53 ;128 n2-standard-96 ;Ice Lake ;96;1,651,980 ;0.93 ;112 n2-standard-128 ;Ice Lake ;128;2,169,248 ;2.33 ;88 ;;;;; n2-highmem-2 ;Ice Lake ;2;34,695 ;0.82 ;3688 n2-highmem-4 ;Ice Lake ;4;66,798 ;0.60 ;2344 n2-highmem-8 ;Ice Lake ;8;138,406 ;0.79 ;1192 n2-highmem-16 ;Ice Lake ;16;276,327 ;0.91 ;624 n2-highmem-32 ;Ice Lake ;32;550,448 ;1.23 ;320 n2-highmem-48 ;Ice Lake ;48;814,034 ;1.88 ;208 n2-highmem-64 ;Ice Lake ;64;1,097,943 ;1.34 ;160 n2-highmem-80 ;Ice Lake ;80;1,361,752 ;1.97 ;128 n2-highmem-96 ;Ice Lake ;96;1,643,949 ;1.10 ;112 n2-highmem-128 ;Ice Lake ;128;2,191,510 ;0.81 ;88 ;;;;; n2-highcpu-2 ;Ice Lake ;2;34,740 ;0.53 ;3688 n2-highcpu-4 ;Ice Lake ;4;66,908 ;0.64 ;2328 n2-highcpu-8 ;Ice Lake ;8;138,600 ;0.75 ;1208 n2-highcpu-16 ;Ice Lake ;16;276,855 ;0.71 ;632 n2-highcpu-32 ;Ice Lake ;32;550,940 ;1.60 ;312 n2-highcpu-48 ;Ice Lake ;48;822,890 ;1.82 ;216 n2-highcpu-64 ;Ice Lake ;64;1,100,249 ;1.18 ;160 n2-highcpu-80 ;Ice Lake ;80;1,377,373 ;1.08 ;128 ;;;;; t2a-standard-1 ;Ampere ;1;23,509 ;0.29 ;5240 t2a-standard-2 ;Ampere ;2;47,054 ;0.18 ;1846 t2a-standard-4 ;Ampere ;4;94,096 ;0.20 ;1176 t2a-standard-8 ;Ampere ;8;188,206 ;0.11 ;1168 t2a-standard-16 ;Ampere ;16;375,477 ;0.15 ;308 t2a-standard-32 ;Ampere ;32;748,166 ;0.11 ;160 t2a-standard-48 ;Ampere ;48;1,118,158 ;0.17 ;680 ;;;;; t2d-standard-1 ;Milan ;1;29,363 ;1.43 ;5264 t2d-standard-2 ;Milan ;2;59,889 ;1.06 ;1840 t2d-standard-4 ;Milan ;4;119,587 ;0.98 ;1176 t2d-standard-8 ;Milan ;8;238,534 ;1.06 ;596 t2d-standard-16 ;Milan ;16;475,405 ;1.45 ;308 t2d-standard-32 ;Milan ;32;945,524 ;1.88 ;160 t2d-standard-48 ;Milan ;48;1,395,082 ;2.13 ;108 t2d-standard-60 ;Milan ;60;1,667,024 ;1.00 ;88 ;;;;; n2d-standard-2 ;Milan ;2;41,092 ;0.94 ;3704 n2d-standard-4 ;Milan ;4;80,098 ;1.29 ;2344 n2d-standard-8 ;Milan ;8;163,858 ;1.01 ;1256 n2d-standard-16 ;Milan ;16;327,484 ;0.93 ;664 n2d-standard-32 ;Milan ;32;651,986 ;1.39 ;312 n2d-standard-48 ;Milan ;48;967,312 ;3.54 ;280 n2d-standard-64 ;Milan ;64;1,162,499 ;5.05 ;160 n2d-standard-80 ;Milan ;80;1,425,708 ;4.12 ;128 n2d-standard-96 ;Milan ;96;1,768,996 ;4.32 ;112 n2d-standard-128 ;Milan ;128;2,305,562 ;4.48 ;144 n2d-standard-224 ;Milan ;224;3,835,775 ;1.46 ;104 ;;;;; n2d-highmem-2 ;Milan ;2;41,073 ;1.04 ;3682 n2d-highmem-4 ;Milan ;4;80,065 ;1.00 ;2344 n2d-highmem-8 ;Milan ;8;163,486 ;1.36 ;1208 n2d-highmem-16 ;Milan ;16;327,341 ;1.29 ;632 n2d-highmem-32 ;Milan ;32;652,572 ;1.59 ;312 n2d-highmem-48 ;Milan ;48;975,016 ;2.19 ;216 n2d-highmem-64 ;Milan ;64;1,198,883 ;3.25 ;160 n2d-highmem-80 ;Milan ;80;1,484,925 ;2.95 ;128 n2d-highmem-96 ;Milan ;96;1,794,083 ;4.69 ;112 ;;;;; n2d-highcpu-2 ;Milan ;2;41,112 ;0.76 ;3696 n2d-highcpu-4 ;Milan ;4;80,173 ;0.93 ;2352 n2d-highcpu-8 ;Milan ;8;163,935 ;0.83 ;1192 n2d-highcpu-16 ;Milan ;16;327,122 ;1.22 ;628 n2d-highcpu-32 ;Milan ;32;654,523 ;0.82 ;320 n2d-highcpu-48 ;Milan ;48;973,067 ;2.52 ;216 n2d-highcpu-64 ;Milan ;64;1,174,712 ;4.22 ;160 n2d-highcpu-80 ;Milan ;80;1,478,174 ;3.51 ;128 n2d-highcpu-96 ;Milan ;96;1,801,312 ;4.94 ;112 ;;;;; e2-standard-2 ;Intel ;2;26,255 ;1.94 ;712 e2-standard-4 ;Intel ;4;52,043 ;0.53 ;464 e2-standard-8 ;Intel ;8;103,957 ;0.65 ;80 e2-standard-16 ;Intel ;16;208,075 ;0.83 ;72 e2-standard-32 ;Intel ;32;417,535 ;0.74 ;48 ;;;;; e2-highmem-2 ;Skylake ;2;26,243 ;1.20 ;696 e2-highmem-4 ;Skylake ;4;51,736 ;0.88 ;472 e2-highmem-8 ;Skylake ;8;104,083 ;0.63 ;128 e2-highmem-16 ;Skylake ;16;208,433 ;0.72 ;56 ;;;;; e2-highcpu-2 ;Skylake ;2;26,092 ;1.39 ;592 e2-highcpu-4 ;Skylake ;4;51,937 ;0.64 ;360 e2-highcpu-8 ;Skylake ;8;104,080 ;0.65 ;128 e2-highcpu-16 ;Skylake ;16;207,561 ;0.77 ;88 e2-highcpu-32 ;Skylake ;32;416,599 ;0.86 ;32 ;;;;; e2-micro ;Skylake ;2;3,238 ;3.57 ;18,499 e2-small ;Skylake ;2;6,745 ;4.32 ;18,614 e2-medium ;Skylake ;2;14,529 ;6.35 ;18,423 ;;;;; m2-megamem-416 ;Cascade Lake ;416;6,193,999 ;2.50 ;1097 m2-hypermem-416 ;Cascade Lake ;416;6,192,759 ;2.61 ;1107 m2-ultramem-416 ;Cascade Lake ;416;6,205,665 ;2.04 ;1100 m2-ultramem-208 ;Cascade Lake ;208;3,124,387 ;0.71 ;1141 ;;;;; m1-megamem-96 ;Skylake ;96;1,223,742 ;0.35 ;2264 m1-ultramem-40 ;Broadwell ;40;516,435 ;0.27 ;2272 m1-ultramem-80 ;Broadwell ;80;1,010,128 ;0.41 ;2280 m1-ultramem-160 ;Broadwell ;160;2,015,006 ;0.56 ;2280 ;;;;; c2-standard-4 ;Cascade Lake ;4;73,269 ;0.65 ;1180 c2-standard-8 ;Cascade Lake ;8;146,712 ;0.69 ;596 c2-standard-16 ;Cascade Lake ;16;292,366 ;0.73 ;312 c2-standard-30 ;Cascade Lake ;30;531,709 ;1.31 ;168 c2-standard-60 ;Cascade Lake ;60;1,060,101 ;1.14 ;84 ;;;;; c2d-standard-2 ;Milan ;2;44,674 ;0.74 ;1832 c2d-standard-4 ;Milan ;4;86,943 ;0.79 ;1176 c2d-standard-8 ;Milan ;8;177,921 ;0.70 ;600 c2d-standard-16 ;Milan ;16;354,249 ;0.88 ;312 c2d-standard-32 ;Milan ;32;709,399 ;0.59 ;160 c2d-standard-56 ;Milan ;56;1,244,451 ;0.48 ;92 c2d-standard-112 ;Milan ;112;2,299,545 ;0.58 ;40 ;;;;; c2d-highmem-2 ;Milan ;2;44,649 ;0.88 ;1848 c2d-highmem-4 ;Milan ;4;86,956 ;0.81 ;1176 c2d-highmem-8 ;Milan ;8;177,882 ;0.77 ;596 c2d-highmem-16 ;Milan ;16;354,656 ;0.89 ;317 c2d-highmem-32 ;Milan ;32;709,754 ;0.63 ;160 c2d-highmem-56 ;Milan ;56;1,242,783 ;0.43 ;92 c2d-highmem-112 ;Milan ;112;2,294,226 ;0.78 ;40 ;;;;; c2d-highcpu-2 ;Milan ;2;44,678 ;0.74 ;1844 c2d-highcpu-4 ;Milan ;4;86,953 ;0.72 ;1176 c2d-highcpu-8 ;Milan ;8;177,774 ;0.81 ;596 c2d-highcpu-16 ;Milan ;16;354,771 ;0.79 ;308 c2d-highcpu-32 ;Milan ;32;710,036 ;0.62 ;160 c2d-highcpu-56 ;Milan ;56;1,244,008 ;0.56 ;92 c2d-highcpu-112 ;Milan ;112;2,299,260 ;0.37 ;40 ;;;;; n1-standard-1 ;Skylake ;1;20,060 ;0.78 ;10434 n1-standard-2 ;Skylake ;2;26,293 ;0.72 ;3696 n1-standard-4 ;Skylake ;4;52,091 ;0.74 ;2368 n1-standard-8 ;Skylake ;8;104,161 ;0.56 ;1200 n1-standard-16 ;Skylake ;16;208,193 ;0.58 ;624 n1-standard-32 ;Skylake ;32;414,412 ;1.54 ;320 n1-standard-64 ;Skylake ;64;812,905 ;3.64 ;160 n1-standard-96 ;Skylake ;96;1,231,358 ;0.49 ;112 ;;;;; n1-highmem-2 ;Skylake ;2;26,293 ;0.65 ;3688 n1-highmem-4 ;Skylake ;4;52,095 ;0.66 ;2344 n1-highmem-8 ;Skylake ;8;104,145 ;0.84 ;1200 n1-highmem-16 ;Skylake ;16;208,446 ;0.55 ;616 n1-highmem-32 ;Skylake ;32;415,396 ;0.75 ;320 n1-highmem-64 ;Skylake ;64;817,050 ;0.88 ;160 n1-highmem-96 ;Skylake ;96;1,233,066 ;0.53 ;112 ;;;;; n1-highcpu-2 ;Skylake ;2;26,348 ;0.58 ;3696 n1-highcpu-4 ;Skylake ;4;52,108 ;0.58 ;2352 n1-highcpu-8 ;Skylake ;8;104,238 ;0.60 ;1192 n1-highcpu-16 ;Skylake ;16;207,968 ;0.60 ;640 n1-highcpu-32 ;Skylake ;32;414,526 ;1.27 ;320 n1-highcpu-64 ;Skylake ;64;815,329 ;0.86 ;160 n1-highcpu-96 ;Skylake ;96;1,232,561 ;0.30 ;112 ;;;;; f1-micro ;Skylake ;1;3,949 ;3.24 ;2318 g1-small ;Skylake ;1;10,191 ;2.94 ;2256 ;;;;; a2-highgpu-1g;Cascade Lake ;12;171,520 ;0.45 ;4 a2-highgpu-2g;Cascade Lake ;24;359,881 ;0.33 ;4 a2-highgpu-4g;Cascade Lake ;48;646,934 ;0.27 ;4 a2-highgpu-8g ;Cascade Lake ;96 ;1,269,327 ;0.76 ;8 ;;;;; a2-megagpu-16g;Cascade Lake ;96 ;1,258,852 ;6.56 ;172 ;;;;; n4-standard-2 ;Emerald Rapids ;2;44,377 ;0.26 ;80 n4-standard-4 ;Emerald Rapids ;4;86,569 ;0.61 ;84 n4-standard-8 ;Emerald Rapids ;8;177,655 ;0.29 ;88 n4-standard-16 ;Emerald Rapids ;16;354,249 ;0.29 ;81 n4-standard-32 ;Emerald Rapids ;32;706,433 ;0.28 ;80 n4-standard-48 ;Emerald Rapids ;48;1,057,781 ;2.09 ;84 n4-standard-64 ;Emerald Rapids ;64;1,351,294 ;2.44 ;84 n4-standard-80 ;Emerald Rapids ;80;1,626,413 ;3.18 ;84 ;;;;; n4-highcpu-2 ;Emerald Rapids ;2;44,397 ;0.26 ;80 n4-highcpu-4 ;Emerald Rapids ;4;86,649 ;0.58 ;80 n4-highcpu-8 ;Emerald Rapids ;8;177,628 ;0.29 ;87 n4-highcpu-16 ;Emerald Rapids ;16;354,814 ;0.29 ;84 n4-highcpu-32 ;Emerald Rapids ;32;707,229 ;0.30 ;80 n4-highcpu-48 ;Emerald Rapids ;48;1,058,224 ;0.19 ;88 n4-highcpu-64 ;Emerald Rapids ;64;1,351,265 ;1.23 ;80 n4-highcpu-80 ;Emerald Rapids ;80;1,651,766 ;0.87 ;84 ;;;;; n4-highmem-2 ;Emerald Rapids ;2;44,371 ;2.22 ;84 n4-highmem-4 ;Emerald Rapids ;4;86,305 ;0.89 ;80 n4-highmem-8 ;Emerald Rapids ;8;177,336 ;3.06 ;80 n4-highmem-16 ;Emerald Rapids ;16;354,343 ;3.61 ;84 n4-highmem-32 ;Emerald Rapids ;32;704,876 ;2.13 ;84 n4-highmem-48 ;Emerald Rapids ;48;1,027,463 ;2.89 ;80 n4-highmem-64 ;Emerald Rapids ;64;1,256,257 ;3.45 ;84 n4-highmem-80 ;Emerald Rapids ;80;1,536,069 ;2.82 ;80 ;;;;; c3d-standard-4 ;Genoa ;4;94,572 ;0.78 ;1732 c3d-standard-8 ;Genoa ;8;192,584 ;0.72 ;1168 c3d-standard-16 ;Genoa ;16;384,420 ;0.97 ;884 c3d-standard-30 ;Genoa ;30;681,460 ;0.94 ;752 c3d-standard-60 ;Genoa ;60;1,360,072 ;1.18 ;659 c3d-standard-90 ;Genoa ;90;2,138,141 ;1.18 ;616 c3d-standard-180 ;Genoa ;180;3,905,736 ;1.83 ;552 c3d-standard-360 ;Genoa ;360;8,026,988 ;0.88 ;60 ;;;;; c3d-highcpu-4 ;Genoa ;4;94,611 ;0.46 ;1168 c3d-highcpu-8 ;Genoa ;8;192,661 ;0.51 ;592 c3d-highcpu-16 ;Genoa ;16;384,658 ;0.75 ;304 c3d-highcpu-30 ;Genoa ;30;682,826 ;0.48 ;168 c3d-highcpu-60 ;Genoa ;60;1,363,944 ;0.47 ;84 c3d-highcpu-90 ;Genoa ;90;2,149,508 ;0.30 ;64 c3d-highcpu-180 ;Genoa ;180;3,940,383 ;1.44 ;28 c3d-highcpu-360 ;Genoa ;360;7,977,725 ;1.41 ;16 ;;;;; c3d-highmem-4 ;Genoa ;4;94,477 ;0.49 ;304 c3d-highmem-8 ;Genoa ;8;192,283 ;0.66 ;164 c3d-highmem-16 ;Genoa ;16;384,623 ;0.67 ;88 c3d-highmem-30 ;Genoa ;30;681,272 ;0.85 ;44 c3d-highmem-60 ;Genoa ;60;1,364,173 ;0.55 ;24 c3d-highmem-90 ;Genoa ;90;2,143,972 ;0.57 ;16 c3d-highmem-180 ;Genoa ;180;3,958,388 ;1.13 ;8 c3d-highmem-360 ;Genoa ;360;8,069,686 ;0.17 ;4 ;;;;; c3-standard-4 ;Sapphire Rapids ;4;80,609 ;0.39 ;1180 c3-standard-8 ;Sapphire Rapids ;8;160,341 ;0.32 ;1116 c3-standard-22 ;Sapphire Rapids ;22;440,662 ;0.34 ;252 c3-standard-44 ;Sapphire Rapids ;44;878,867 ;0.80 ;612 c3-standard-88 ;Sapphire Rapids ;88;1,691,035 ;1.18 ;528 c3-standard-176 ;Sapphire Rapids ;176;3,377,967 ;0.91 ;484 ;;;;; c3-highcpu-4 ;Sapphire Rapids ;4;80,641 ;0.47 ;1176 c3-highcpu-8 ;Sapphire Rapids ;8;160,329 ;0.48 ;600 c3-highcpu-22 ;Sapphire Rapids ;22;441,164 ;0.29 ;224 c3-highcpu-44 ;Sapphire Rapids ;44;880,832 ;0.87 ;112 c3-highcpu-88 ;Sapphire Rapids ;88;1,696,613 ;1.07 ;56 c3-highcpu-176 ;Sapphire Rapids ;176;3,388,373 ;0.62 ;28 ;;;;; c3-highmem-4 ;Sapphire Rapids ;4;80,742 ;0.44 ;1200 c3-highmem-8 ;Sapphire Rapids ;8;160,478 ;0.29 ;612 c3-highmem-22 ;Sapphire Rapids ;22;441,229 ;0.21 ;252 c3-highmem-44 ;Sapphire Rapids ;44;877,637 ;1.12 ;136 c3-highmem-88 ;Sapphire Rapids ;88;1,689,147 ;1.48 ;72 c3-highmem-176 ;Sapphire Rapids ;176;3,347,332 ;1.44 ;56 ;;;;; m3-ultramem-32;Ice Lake ;32;556,066 ;0.22 ;1020 m3-ultramem-64;Ice Lake ;64;1,101,308 ;0.73 ;1144 m3-ultramem-128;Ice Lake ;128;2,190,379 ;0.62 ;1128 ;;;;; m3-megamem-64;Ice Lake ;64;1,094,465 ;0.98 ;1132 m3-megamem-128;Ice Lake ;128;2,182,236 ;0.89 ;1144 ;;;;; z3-highmem-88 ;Sapphire Rapids ;88;1,691,169 ;1.02 ;84 z3-highmem-176 ;Sapphire Rapids ;176;3,373,295 ;0.97 ;88 ;;;;; g2-standard-4 ;Cascade Lake ;4;56,273 ;0.66 ;88 g2-standard-8 ;Cascade Lake ;8;111,997 ;0.64 ;48 g2-standard-12 ;Cascade Lake ;12;167,604 ;0.52 ;36 g2-standard-16 ;Cascade Lake ;16;223,514 ;0.51 ;28 g2-standard-24 ;Cascade Lake ;24;334,411 ;0.53 ;20 g2-standard-32 ;Cascade Lake ;32;446,322 ;0.64 ;16 g2-standard-48 ;Cascade Lake ;48;656,106 ;2.97 ;12 g2-standard-96 ;Cascade Lake ;96;1,249,876 ;0.20 ;8 ================================================ FILE: instances/series/cpu/coremark.pl ================================================ #!/usr/bin/env perl # Copyright 2022 Nils Knieling. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. use strict; use DBI; my $dbh = DBI->connect("dbi:CSV:", undef, undef, { f_ext => ".csv/r", csv_sep_char => ";", csv_class => "Text::CSV_XS", RaiseError => 1, }) or die "ERROR: Cannot connect $DBI::errstr\n"; my $sth = $dbh->prepare("SELECT MACHINE_TYPE, COREMARK_SCORE, STANDARD_DEVIATION, SAMPLE_COUNT FROM coremark"); $sth->execute(); $sth->bind_columns(\my ($name, $coremarkScore, $standardDeviation, $sampleCount)); print "/*\n"; print " * GENERATED WITH coremark.pl\n"; print " * Please see: https://github.com/Cyclenerd/google-cloud-compute-machine-types/blob/master/instances/series/cpu/README.md\n"; print " */\n"; while ($sth->fetch) { if ($name) { $name =~ s/^\s//; $name =~ s/\s$//; $coremarkScore =~ s/,//g; $coremarkScore =~ s/\s//g; $sampleCount =~ s/,//g; $sampleCount =~ s/\s//g; print "UPDATE instances SET coremarkScore = '$coremarkScore', standardDeviation = '$standardDeviation', sampleCount = '$sampleCount' WHERE name LIKE '$name';\n"; } } $dbh->disconnect; ================================================ FILE: instances/series/cpu/coremark.sql ================================================ /* * GENERATED WITH coremark.pl * Please see: https://github.com/Cyclenerd/google-cloud-compute-machine-types/blob/master/instances/series/cpu/README.md */ UPDATE instances SET coremarkScore = '34735', standardDeviation = '0.53 ', sampleCount = '3672' WHERE name LIKE 'n2-standard-2'; UPDATE instances SET coremarkScore = '66884', standardDeviation = '0.61 ', sampleCount = '2336' WHERE name LIKE 'n2-standard-4'; UPDATE instances SET coremarkScore = '138567', standardDeviation = '0.67 ', sampleCount = '1592' WHERE name LIKE 'n2-standard-8'; UPDATE instances SET coremarkScore = '277010', standardDeviation = '0.72 ', sampleCount = '616' WHERE name LIKE 'n2-standard-16'; UPDATE instances SET coremarkScore = '553662', standardDeviation = '0.77 ', sampleCount = '312' WHERE name LIKE 'n2-standard-32'; UPDATE instances SET coremarkScore = '824915', standardDeviation = '1.18 ', sampleCount = '216' WHERE name LIKE 'n2-standard-48'; UPDATE instances SET coremarkScore = '1091008', standardDeviation = '1.34 ', sampleCount = '168' WHERE name LIKE 'n2-standard-64'; UPDATE instances SET coremarkScore = '1365998', standardDeviation = '1.53 ', sampleCount = '128' WHERE name LIKE 'n2-standard-80'; UPDATE instances SET coremarkScore = '1651980', standardDeviation = '0.93 ', sampleCount = '112' WHERE name LIKE 'n2-standard-96'; UPDATE instances SET coremarkScore = '2169248', standardDeviation = '2.33 ', sampleCount = '88' WHERE name LIKE 'n2-standard-128'; UPDATE instances SET coremarkScore = '34695', standardDeviation = '0.82 ', sampleCount = '3688' WHERE name LIKE 'n2-highmem-2'; UPDATE instances SET coremarkScore = '66798', standardDeviation = '0.60 ', sampleCount = '2344' WHERE name LIKE 'n2-highmem-4'; UPDATE instances SET coremarkScore = '138406', standardDeviation = '0.79 ', sampleCount = '1192' WHERE name LIKE 'n2-highmem-8'; UPDATE instances SET coremarkScore = '276327', standardDeviation = '0.91 ', sampleCount = '624' WHERE name LIKE 'n2-highmem-16'; UPDATE instances SET coremarkScore = '550448', standardDeviation = '1.23 ', sampleCount = '320' WHERE name LIKE 'n2-highmem-32'; UPDATE instances SET coremarkScore = '814034', standardDeviation = '1.88 ', sampleCount = '208' WHERE name LIKE 'n2-highmem-48'; UPDATE instances SET coremarkScore = '1097943', standardDeviation = '1.34 ', sampleCount = '160' WHERE name LIKE 'n2-highmem-64'; UPDATE instances SET coremarkScore = '1361752', standardDeviation = '1.97 ', sampleCount = '128' WHERE name LIKE 'n2-highmem-80'; UPDATE instances SET coremarkScore = '1643949', standardDeviation = '1.10 ', sampleCount = '112' WHERE name LIKE 'n2-highmem-96'; UPDATE instances SET coremarkScore = '2191510', standardDeviation = '0.81 ', sampleCount = '88' WHERE name LIKE 'n2-highmem-128'; UPDATE instances SET coremarkScore = '34740', standardDeviation = '0.53 ', sampleCount = '3688' WHERE name LIKE 'n2-highcpu-2'; UPDATE instances SET coremarkScore = '66908', standardDeviation = '0.64 ', sampleCount = '2328' WHERE name LIKE 'n2-highcpu-4'; UPDATE instances SET coremarkScore = '138600', standardDeviation = '0.75 ', sampleCount = '1208' WHERE name LIKE 'n2-highcpu-8'; UPDATE instances SET coremarkScore = '276855', standardDeviation = '0.71 ', sampleCount = '632' WHERE name LIKE 'n2-highcpu-16'; UPDATE instances SET coremarkScore = '550940', standardDeviation = '1.60 ', sampleCount = '312' WHERE name LIKE 'n2-highcpu-32'; UPDATE instances SET coremarkScore = '822890', standardDeviation = '1.82 ', sampleCount = '216' WHERE name LIKE 'n2-highcpu-48'; UPDATE instances SET coremarkScore = '1100249', standardDeviation = '1.18 ', sampleCount = '160' WHERE name LIKE 'n2-highcpu-64'; UPDATE instances SET coremarkScore = '1377373', standardDeviation = '1.08 ', sampleCount = '128' WHERE name LIKE 'n2-highcpu-80'; UPDATE instances SET coremarkScore = '23509', standardDeviation = '0.29 ', sampleCount = '5240' WHERE name LIKE 't2a-standard-1'; UPDATE instances SET coremarkScore = '47054', standardDeviation = '0.18 ', sampleCount = '1846' WHERE name LIKE 't2a-standard-2'; UPDATE instances SET coremarkScore = '94096', standardDeviation = '0.20 ', sampleCount = '1176' WHERE name LIKE 't2a-standard-4'; UPDATE instances SET coremarkScore = '188206', standardDeviation = '0.11 ', sampleCount = '1168' WHERE name LIKE 't2a-standard-8'; UPDATE instances SET coremarkScore = '375477', standardDeviation = '0.15 ', sampleCount = '308' WHERE name LIKE 't2a-standard-16'; UPDATE instances SET coremarkScore = '748166', standardDeviation = '0.11 ', sampleCount = '160' WHERE name LIKE 't2a-standard-32'; UPDATE instances SET coremarkScore = '1118158', standardDeviation = '0.17 ', sampleCount = '680' WHERE name LIKE 't2a-standard-48'; UPDATE instances SET coremarkScore = '29363', standardDeviation = '1.43 ', sampleCount = '5264' WHERE name LIKE 't2d-standard-1'; UPDATE instances SET coremarkScore = '59889', standardDeviation = '1.06 ', sampleCount = '1840' WHERE name LIKE 't2d-standard-2'; UPDATE instances SET coremarkScore = '119587', standardDeviation = '0.98 ', sampleCount = '1176' WHERE name LIKE 't2d-standard-4'; UPDATE instances SET coremarkScore = '238534', standardDeviation = '1.06 ', sampleCount = '596' WHERE name LIKE 't2d-standard-8'; UPDATE instances SET coremarkScore = '475405', standardDeviation = '1.45 ', sampleCount = '308' WHERE name LIKE 't2d-standard-16'; UPDATE instances SET coremarkScore = '945524', standardDeviation = '1.88 ', sampleCount = '160' WHERE name LIKE 't2d-standard-32'; UPDATE instances SET coremarkScore = '1395082', standardDeviation = '2.13 ', sampleCount = '108' WHERE name LIKE 't2d-standard-48'; UPDATE instances SET coremarkScore = '1667024', standardDeviation = '1.00 ', sampleCount = '88' WHERE name LIKE 't2d-standard-60'; UPDATE instances SET coremarkScore = '41092', standardDeviation = '0.94 ', sampleCount = '3704' WHERE name LIKE 'n2d-standard-2'; UPDATE instances SET coremarkScore = '80098', standardDeviation = '1.29 ', sampleCount = '2344' WHERE name LIKE 'n2d-standard-4'; UPDATE instances SET coremarkScore = '163858', standardDeviation = '1.01 ', sampleCount = '1256' WHERE name LIKE 'n2d-standard-8'; UPDATE instances SET coremarkScore = '327484', standardDeviation = '0.93 ', sampleCount = '664' WHERE name LIKE 'n2d-standard-16'; UPDATE instances SET coremarkScore = '651986', standardDeviation = '1.39 ', sampleCount = '312' WHERE name LIKE 'n2d-standard-32'; UPDATE instances SET coremarkScore = '967312', standardDeviation = '3.54 ', sampleCount = '280' WHERE name LIKE 'n2d-standard-48'; UPDATE instances SET coremarkScore = '1162499', standardDeviation = '5.05 ', sampleCount = '160' WHERE name LIKE 'n2d-standard-64'; UPDATE instances SET coremarkScore = '1425708', standardDeviation = '4.12 ', sampleCount = '128' WHERE name LIKE 'n2d-standard-80'; UPDATE instances SET coremarkScore = '1768996', standardDeviation = '4.32 ', sampleCount = '112' WHERE name LIKE 'n2d-standard-96'; UPDATE instances SET coremarkScore = '2305562', standardDeviation = '4.48 ', sampleCount = '144' WHERE name LIKE 'n2d-standard-128'; UPDATE instances SET coremarkScore = '3835775', standardDeviation = '1.46 ', sampleCount = '104' WHERE name LIKE 'n2d-standard-224'; UPDATE instances SET coremarkScore = '41073', standardDeviation = '1.04 ', sampleCount = '3682' WHERE name LIKE 'n2d-highmem-2'; UPDATE instances SET coremarkScore = '80065', standardDeviation = '1.00 ', sampleCount = '2344' WHERE name LIKE 'n2d-highmem-4'; UPDATE instances SET coremarkScore = '163486', standardDeviation = '1.36 ', sampleCount = '1208' WHERE name LIKE 'n2d-highmem-8'; UPDATE instances SET coremarkScore = '327341', standardDeviation = '1.29 ', sampleCount = '632' WHERE name LIKE 'n2d-highmem-16'; UPDATE instances SET coremarkScore = '652572', standardDeviation = '1.59 ', sampleCount = '312' WHERE name LIKE 'n2d-highmem-32'; UPDATE instances SET coremarkScore = '975016', standardDeviation = '2.19 ', sampleCount = '216' WHERE name LIKE 'n2d-highmem-48'; UPDATE instances SET coremarkScore = '1198883', standardDeviation = '3.25 ', sampleCount = '160' WHERE name LIKE 'n2d-highmem-64'; UPDATE instances SET coremarkScore = '1484925', standardDeviation = '2.95 ', sampleCount = '128' WHERE name LIKE 'n2d-highmem-80'; UPDATE instances SET coremarkScore = '1794083', standardDeviation = '4.69 ', sampleCount = '112' WHERE name LIKE 'n2d-highmem-96'; UPDATE instances SET coremarkScore = '41112', standardDeviation = '0.76 ', sampleCount = '3696' WHERE name LIKE 'n2d-highcpu-2'; UPDATE instances SET coremarkScore = '80173', standardDeviation = '0.93 ', sampleCount = '2352' WHERE name LIKE 'n2d-highcpu-4'; UPDATE instances SET coremarkScore = '163935', standardDeviation = '0.83 ', sampleCount = '1192' WHERE name LIKE 'n2d-highcpu-8'; UPDATE instances SET coremarkScore = '327122', standardDeviation = '1.22 ', sampleCount = '628' WHERE name LIKE 'n2d-highcpu-16'; UPDATE instances SET coremarkScore = '654523', standardDeviation = '0.82 ', sampleCount = '320' WHERE name LIKE 'n2d-highcpu-32'; UPDATE instances SET coremarkScore = '973067', standardDeviation = '2.52 ', sampleCount = '216' WHERE name LIKE 'n2d-highcpu-48'; UPDATE instances SET coremarkScore = '1174712', standardDeviation = '4.22 ', sampleCount = '160' WHERE name LIKE 'n2d-highcpu-64'; UPDATE instances SET coremarkScore = '1478174', standardDeviation = '3.51 ', sampleCount = '128' WHERE name LIKE 'n2d-highcpu-80'; UPDATE instances SET coremarkScore = '1801312', standardDeviation = '4.94 ', sampleCount = '112' WHERE name LIKE 'n2d-highcpu-96'; UPDATE instances SET coremarkScore = '26255', standardDeviation = '1.94 ', sampleCount = '712' WHERE name LIKE 'e2-standard-2'; UPDATE instances SET coremarkScore = '52043', standardDeviation = '0.53 ', sampleCount = '464' WHERE name LIKE 'e2-standard-4'; UPDATE instances SET coremarkScore = '103957', standardDeviation = '0.65 ', sampleCount = '80' WHERE name LIKE 'e2-standard-8'; UPDATE instances SET coremarkScore = '208075', standardDeviation = '0.83 ', sampleCount = '72' WHERE name LIKE 'e2-standard-16'; UPDATE instances SET coremarkScore = '417535', standardDeviation = '0.74 ', sampleCount = '48' WHERE name LIKE 'e2-standard-32'; UPDATE instances SET coremarkScore = '26243', standardDeviation = '1.20 ', sampleCount = '696' WHERE name LIKE 'e2-highmem-2'; UPDATE instances SET coremarkScore = '51736', standardDeviation = '0.88 ', sampleCount = '472' WHERE name LIKE 'e2-highmem-4'; UPDATE instances SET coremarkScore = '104083', standardDeviation = '0.63 ', sampleCount = '128' WHERE name LIKE 'e2-highmem-8'; UPDATE instances SET coremarkScore = '208433', standardDeviation = '0.72 ', sampleCount = '56' WHERE name LIKE 'e2-highmem-16'; UPDATE instances SET coremarkScore = '26092', standardDeviation = '1.39 ', sampleCount = '592' WHERE name LIKE 'e2-highcpu-2'; UPDATE instances SET coremarkScore = '51937', standardDeviation = '0.64 ', sampleCount = '360' WHERE name LIKE 'e2-highcpu-4'; UPDATE instances SET coremarkScore = '104080', standardDeviation = '0.65 ', sampleCount = '128' WHERE name LIKE 'e2-highcpu-8'; UPDATE instances SET coremarkScore = '207561', standardDeviation = '0.77 ', sampleCount = '88' WHERE name LIKE 'e2-highcpu-16'; UPDATE instances SET coremarkScore = '416599', standardDeviation = '0.86 ', sampleCount = '32' WHERE name LIKE 'e2-highcpu-32'; UPDATE instances SET coremarkScore = '3238', standardDeviation = '3.57 ', sampleCount = '18499' WHERE name LIKE 'e2-micro'; UPDATE instances SET coremarkScore = '6745', standardDeviation = '4.32 ', sampleCount = '18614' WHERE name LIKE 'e2-small'; UPDATE instances SET coremarkScore = '14529', standardDeviation = '6.35 ', sampleCount = '18423' WHERE name LIKE 'e2-medium'; UPDATE instances SET coremarkScore = '6193999', standardDeviation = '2.50 ', sampleCount = '1097' WHERE name LIKE 'm2-megamem-416'; UPDATE instances SET coremarkScore = '6192759', standardDeviation = '2.61 ', sampleCount = '1107' WHERE name LIKE 'm2-hypermem-416'; UPDATE instances SET coremarkScore = '6205665', standardDeviation = '2.04 ', sampleCount = '1100' WHERE name LIKE 'm2-ultramem-416'; UPDATE instances SET coremarkScore = '3124387', standardDeviation = '0.71 ', sampleCount = '1141' WHERE name LIKE 'm2-ultramem-208'; UPDATE instances SET coremarkScore = '1223742', standardDeviation = '0.35 ', sampleCount = '2264' WHERE name LIKE 'm1-megamem-96'; UPDATE instances SET coremarkScore = '516435', standardDeviation = '0.27 ', sampleCount = '2272' WHERE name LIKE 'm1-ultramem-40'; UPDATE instances SET coremarkScore = '1010128', standardDeviation = '0.41 ', sampleCount = '2280' WHERE name LIKE 'm1-ultramem-80'; UPDATE instances SET coremarkScore = '2015006', standardDeviation = '0.56 ', sampleCount = '2280' WHERE name LIKE 'm1-ultramem-160'; UPDATE instances SET coremarkScore = '73269', standardDeviation = '0.65 ', sampleCount = '1180' WHERE name LIKE 'c2-standard-4'; UPDATE instances SET coremarkScore = '146712', standardDeviation = '0.69 ', sampleCount = '596' WHERE name LIKE 'c2-standard-8'; UPDATE instances SET coremarkScore = '292366', standardDeviation = '0.73 ', sampleCount = '312' WHERE name LIKE 'c2-standard-16'; UPDATE instances SET coremarkScore = '531709', standardDeviation = '1.31 ', sampleCount = '168' WHERE name LIKE 'c2-standard-30'; UPDATE instances SET coremarkScore = '1060101', standardDeviation = '1.14 ', sampleCount = '84' WHERE name LIKE 'c2-standard-60'; UPDATE instances SET coremarkScore = '44674', standardDeviation = '0.74 ', sampleCount = '1832' WHERE name LIKE 'c2d-standard-2'; UPDATE instances SET coremarkScore = '86943', standardDeviation = '0.79 ', sampleCount = '1176' WHERE name LIKE 'c2d-standard-4'; UPDATE instances SET coremarkScore = '177921', standardDeviation = '0.70 ', sampleCount = '600' WHERE name LIKE 'c2d-standard-8'; UPDATE instances SET coremarkScore = '354249', standardDeviation = '0.88 ', sampleCount = '312' WHERE name LIKE 'c2d-standard-16'; UPDATE instances SET coremarkScore = '709399', standardDeviation = '0.59 ', sampleCount = '160' WHERE name LIKE 'c2d-standard-32'; UPDATE instances SET coremarkScore = '1244451', standardDeviation = '0.48 ', sampleCount = '92' WHERE name LIKE 'c2d-standard-56'; UPDATE instances SET coremarkScore = '2299545', standardDeviation = '0.58 ', sampleCount = '40' WHERE name LIKE 'c2d-standard-112'; UPDATE instances SET coremarkScore = '44649', standardDeviation = '0.88 ', sampleCount = '1848' WHERE name LIKE 'c2d-highmem-2'; UPDATE instances SET coremarkScore = '86956', standardDeviation = '0.81 ', sampleCount = '1176' WHERE name LIKE 'c2d-highmem-4'; UPDATE instances SET coremarkScore = '177882', standardDeviation = '0.77 ', sampleCount = '596' WHERE name LIKE 'c2d-highmem-8'; UPDATE instances SET coremarkScore = '354656', standardDeviation = '0.89 ', sampleCount = '317' WHERE name LIKE 'c2d-highmem-16'; UPDATE instances SET coremarkScore = '709754', standardDeviation = '0.63 ', sampleCount = '160' WHERE name LIKE 'c2d-highmem-32'; UPDATE instances SET coremarkScore = '1242783', standardDeviation = '0.43 ', sampleCount = '92' WHERE name LIKE 'c2d-highmem-56'; UPDATE instances SET coremarkScore = '2294226', standardDeviation = '0.78 ', sampleCount = '40' WHERE name LIKE 'c2d-highmem-112'; UPDATE instances SET coremarkScore = '44678', standardDeviation = '0.74 ', sampleCount = '1844' WHERE name LIKE 'c2d-highcpu-2'; UPDATE instances SET coremarkScore = '86953', standardDeviation = '0.72 ', sampleCount = '1176' WHERE name LIKE 'c2d-highcpu-4'; UPDATE instances SET coremarkScore = '177774', standardDeviation = '0.81 ', sampleCount = '596' WHERE name LIKE 'c2d-highcpu-8'; UPDATE instances SET coremarkScore = '354771', standardDeviation = '0.79 ', sampleCount = '308' WHERE name LIKE 'c2d-highcpu-16'; UPDATE instances SET coremarkScore = '710036', standardDeviation = '0.62 ', sampleCount = '160' WHERE name LIKE 'c2d-highcpu-32'; UPDATE instances SET coremarkScore = '1244008', standardDeviation = '0.56 ', sampleCount = '92' WHERE name LIKE 'c2d-highcpu-56'; UPDATE instances SET coremarkScore = '2299260', standardDeviation = '0.37 ', sampleCount = '40' WHERE name LIKE 'c2d-highcpu-112'; UPDATE instances SET coremarkScore = '20060', standardDeviation = '0.78 ', sampleCount = '10434' WHERE name LIKE 'n1-standard-1'; UPDATE instances SET coremarkScore = '26293', standardDeviation = '0.72 ', sampleCount = '3696' WHERE name LIKE 'n1-standard-2'; UPDATE instances SET coremarkScore = '52091', standardDeviation = '0.74 ', sampleCount = '2368' WHERE name LIKE 'n1-standard-4'; UPDATE instances SET coremarkScore = '104161', standardDeviation = '0.56 ', sampleCount = '1200' WHERE name LIKE 'n1-standard-8'; UPDATE instances SET coremarkScore = '208193', standardDeviation = '0.58 ', sampleCount = '624' WHERE name LIKE 'n1-standard-16'; UPDATE instances SET coremarkScore = '414412', standardDeviation = '1.54 ', sampleCount = '320' WHERE name LIKE 'n1-standard-32'; UPDATE instances SET coremarkScore = '812905', standardDeviation = '3.64 ', sampleCount = '160' WHERE name LIKE 'n1-standard-64'; UPDATE instances SET coremarkScore = '1231358', standardDeviation = '0.49 ', sampleCount = '112' WHERE name LIKE 'n1-standard-96'; UPDATE instances SET coremarkScore = '26293', standardDeviation = '0.65 ', sampleCount = '3688' WHERE name LIKE 'n1-highmem-2'; UPDATE instances SET coremarkScore = '52095', standardDeviation = '0.66 ', sampleCount = '2344' WHERE name LIKE 'n1-highmem-4'; UPDATE instances SET coremarkScore = '104145', standardDeviation = '0.84 ', sampleCount = '1200' WHERE name LIKE 'n1-highmem-8'; UPDATE instances SET coremarkScore = '208446', standardDeviation = '0.55 ', sampleCount = '616' WHERE name LIKE 'n1-highmem-16'; UPDATE instances SET coremarkScore = '415396', standardDeviation = '0.75 ', sampleCount = '320' WHERE name LIKE 'n1-highmem-32'; UPDATE instances SET coremarkScore = '817050', standardDeviation = '0.88 ', sampleCount = '160' WHERE name LIKE 'n1-highmem-64'; UPDATE instances SET coremarkScore = '1233066', standardDeviation = '0.53 ', sampleCount = '112' WHERE name LIKE 'n1-highmem-96'; UPDATE instances SET coremarkScore = '26348', standardDeviation = '0.58 ', sampleCount = '3696' WHERE name LIKE 'n1-highcpu-2'; UPDATE instances SET coremarkScore = '52108', standardDeviation = '0.58 ', sampleCount = '2352' WHERE name LIKE 'n1-highcpu-4'; UPDATE instances SET coremarkScore = '104238', standardDeviation = '0.60 ', sampleCount = '1192' WHERE name LIKE 'n1-highcpu-8'; UPDATE instances SET coremarkScore = '207968', standardDeviation = '0.60 ', sampleCount = '640' WHERE name LIKE 'n1-highcpu-16'; UPDATE instances SET coremarkScore = '414526', standardDeviation = '1.27 ', sampleCount = '320' WHERE name LIKE 'n1-highcpu-32'; UPDATE instances SET coremarkScore = '815329', standardDeviation = '0.86 ', sampleCount = '160' WHERE name LIKE 'n1-highcpu-64'; UPDATE instances SET coremarkScore = '1232561', standardDeviation = '0.30 ', sampleCount = '112' WHERE name LIKE 'n1-highcpu-96'; UPDATE instances SET coremarkScore = '3949', standardDeviation = '3.24 ', sampleCount = '2318' WHERE name LIKE 'f1-micro'; UPDATE instances SET coremarkScore = '10191', standardDeviation = '2.94 ', sampleCount = '2256' WHERE name LIKE 'g1-small'; UPDATE instances SET coremarkScore = '171520', standardDeviation = '0.45 ', sampleCount = '4' WHERE name LIKE 'a2-highgpu-1g'; UPDATE instances SET coremarkScore = '359881', standardDeviation = '0.33 ', sampleCount = '4' WHERE name LIKE 'a2-highgpu-2g'; UPDATE instances SET coremarkScore = '646934', standardDeviation = '0.27 ', sampleCount = '4' WHERE name LIKE 'a2-highgpu-4g'; UPDATE instances SET coremarkScore = '1269327', standardDeviation = '0.76 ', sampleCount = '8' WHERE name LIKE 'a2-highgpu-8g'; UPDATE instances SET coremarkScore = '1258852', standardDeviation = '6.56 ', sampleCount = '172' WHERE name LIKE 'a2-megagpu-16g'; UPDATE instances SET coremarkScore = '44377', standardDeviation = '0.26 ', sampleCount = '80' WHERE name LIKE 'n4-standard-2'; UPDATE instances SET coremarkScore = '86569', standardDeviation = '0.61 ', sampleCount = '84' WHERE name LIKE 'n4-standard-4'; UPDATE instances SET coremarkScore = '177655', standardDeviation = '0.29 ', sampleCount = '88' WHERE name LIKE 'n4-standard-8'; UPDATE instances SET coremarkScore = '354249', standardDeviation = '0.29 ', sampleCount = '81' WHERE name LIKE 'n4-standard-16'; UPDATE instances SET coremarkScore = '706433', standardDeviation = '0.28 ', sampleCount = '80' WHERE name LIKE 'n4-standard-32'; UPDATE instances SET coremarkScore = '1057781', standardDeviation = '2.09 ', sampleCount = '84' WHERE name LIKE 'n4-standard-48'; UPDATE instances SET coremarkScore = '1351294', standardDeviation = '2.44 ', sampleCount = '84' WHERE name LIKE 'n4-standard-64'; UPDATE instances SET coremarkScore = '1626413', standardDeviation = '3.18 ', sampleCount = '84' WHERE name LIKE 'n4-standard-80'; UPDATE instances SET coremarkScore = '44397', standardDeviation = '0.26 ', sampleCount = '80' WHERE name LIKE 'n4-highcpu-2'; UPDATE instances SET coremarkScore = '86649', standardDeviation = '0.58 ', sampleCount = '80' WHERE name LIKE 'n4-highcpu-4'; UPDATE instances SET coremarkScore = '177628', standardDeviation = '0.29 ', sampleCount = '87' WHERE name LIKE 'n4-highcpu-8'; UPDATE instances SET coremarkScore = '354814', standardDeviation = '0.29 ', sampleCount = '84' WHERE name LIKE 'n4-highcpu-16'; UPDATE instances SET coremarkScore = '707229', standardDeviation = '0.30 ', sampleCount = '80' WHERE name LIKE 'n4-highcpu-32'; UPDATE instances SET coremarkScore = '1058224', standardDeviation = '0.19 ', sampleCount = '88' WHERE name LIKE 'n4-highcpu-48'; UPDATE instances SET coremarkScore = '1351265', standardDeviation = '1.23 ', sampleCount = '80' WHERE name LIKE 'n4-highcpu-64'; UPDATE instances SET coremarkScore = '1651766', standardDeviation = '0.87 ', sampleCount = '84' WHERE name LIKE 'n4-highcpu-80'; UPDATE instances SET coremarkScore = '44371', standardDeviation = '2.22 ', sampleCount = '84' WHERE name LIKE 'n4-highmem-2'; UPDATE instances SET coremarkScore = '86305', standardDeviation = '0.89 ', sampleCount = '80' WHERE name LIKE 'n4-highmem-4'; UPDATE instances SET coremarkScore = '177336', standardDeviation = '3.06 ', sampleCount = '80' WHERE name LIKE 'n4-highmem-8'; UPDATE instances SET coremarkScore = '354343', standardDeviation = '3.61 ', sampleCount = '84' WHERE name LIKE 'n4-highmem-16'; UPDATE instances SET coremarkScore = '704876', standardDeviation = '2.13 ', sampleCount = '84' WHERE name LIKE 'n4-highmem-32'; UPDATE instances SET coremarkScore = '1027463', standardDeviation = '2.89 ', sampleCount = '80' WHERE name LIKE 'n4-highmem-48'; UPDATE instances SET coremarkScore = '1256257', standardDeviation = '3.45 ', sampleCount = '84' WHERE name LIKE 'n4-highmem-64'; UPDATE instances SET coremarkScore = '1536069', standardDeviation = '2.82 ', sampleCount = '80' WHERE name LIKE 'n4-highmem-80'; UPDATE instances SET coremarkScore = '94572', standardDeviation = '0.78 ', sampleCount = '1732' WHERE name LIKE 'c3d-standard-4'; UPDATE instances SET coremarkScore = '192584', standardDeviation = '0.72 ', sampleCount = '1168' WHERE name LIKE 'c3d-standard-8'; UPDATE instances SET coremarkScore = '384420', standardDeviation = '0.97 ', sampleCount = '884' WHERE name LIKE 'c3d-standard-16'; UPDATE instances SET coremarkScore = '681460', standardDeviation = '0.94 ', sampleCount = '752' WHERE name LIKE 'c3d-standard-30'; UPDATE instances SET coremarkScore = '1360072', standardDeviation = '1.18 ', sampleCount = '659' WHERE name LIKE 'c3d-standard-60'; UPDATE instances SET coremarkScore = '2138141', standardDeviation = '1.18 ', sampleCount = '616' WHERE name LIKE 'c3d-standard-90'; UPDATE instances SET coremarkScore = '3905736', standardDeviation = '1.83 ', sampleCount = '552' WHERE name LIKE 'c3d-standard-180'; UPDATE instances SET coremarkScore = '8026988', standardDeviation = '0.88 ', sampleCount = '60' WHERE name LIKE 'c3d-standard-360'; UPDATE instances SET coremarkScore = '94611', standardDeviation = '0.46 ', sampleCount = '1168' WHERE name LIKE 'c3d-highcpu-4'; UPDATE instances SET coremarkScore = '192661', standardDeviation = '0.51 ', sampleCount = '592' WHERE name LIKE 'c3d-highcpu-8'; UPDATE instances SET coremarkScore = '384658', standardDeviation = '0.75 ', sampleCount = '304' WHERE name LIKE 'c3d-highcpu-16'; UPDATE instances SET coremarkScore = '682826', standardDeviation = '0.48 ', sampleCount = '168' WHERE name LIKE 'c3d-highcpu-30'; UPDATE instances SET coremarkScore = '1363944', standardDeviation = '0.47 ', sampleCount = '84' WHERE name LIKE 'c3d-highcpu-60'; UPDATE instances SET coremarkScore = '2149508', standardDeviation = '0.30 ', sampleCount = '64' WHERE name LIKE 'c3d-highcpu-90'; UPDATE instances SET coremarkScore = '3940383', standardDeviation = '1.44 ', sampleCount = '28' WHERE name LIKE 'c3d-highcpu-180'; UPDATE instances SET coremarkScore = '7977725', standardDeviation = '1.41 ', sampleCount = '16' WHERE name LIKE 'c3d-highcpu-360'; UPDATE instances SET coremarkScore = '94477', standardDeviation = '0.49 ', sampleCount = '304' WHERE name LIKE 'c3d-highmem-4'; UPDATE instances SET coremarkScore = '192283', standardDeviation = '0.66 ', sampleCount = '164' WHERE name LIKE 'c3d-highmem-8'; UPDATE instances SET coremarkScore = '384623', standardDeviation = '0.67 ', sampleCount = '88' WHERE name LIKE 'c3d-highmem-16'; UPDATE instances SET coremarkScore = '681272', standardDeviation = '0.85 ', sampleCount = '44' WHERE name LIKE 'c3d-highmem-30'; UPDATE instances SET coremarkScore = '1364173', standardDeviation = '0.55 ', sampleCount = '24' WHERE name LIKE 'c3d-highmem-60'; UPDATE instances SET coremarkScore = '2143972', standardDeviation = '0.57 ', sampleCount = '16' WHERE name LIKE 'c3d-highmem-90'; UPDATE instances SET coremarkScore = '3958388', standardDeviation = '1.13 ', sampleCount = '8' WHERE name LIKE 'c3d-highmem-180'; UPDATE instances SET coremarkScore = '8069686', standardDeviation = '0.17 ', sampleCount = '4' WHERE name LIKE 'c3d-highmem-360'; UPDATE instances SET coremarkScore = '80609', standardDeviation = '0.39 ', sampleCount = '1180' WHERE name LIKE 'c3-standard-4'; UPDATE instances SET coremarkScore = '160341', standardDeviation = '0.32 ', sampleCount = '1116' WHERE name LIKE 'c3-standard-8'; UPDATE instances SET coremarkScore = '440662', standardDeviation = '0.34 ', sampleCount = '252' WHERE name LIKE 'c3-standard-22'; UPDATE instances SET coremarkScore = '878867', standardDeviation = '0.80 ', sampleCount = '612' WHERE name LIKE 'c3-standard-44'; UPDATE instances SET coremarkScore = '1691035', standardDeviation = '1.18 ', sampleCount = '528' WHERE name LIKE 'c3-standard-88'; UPDATE instances SET coremarkScore = '3377967', standardDeviation = '0.91 ', sampleCount = '484' WHERE name LIKE 'c3-standard-176'; UPDATE instances SET coremarkScore = '80641', standardDeviation = '0.47 ', sampleCount = '1176' WHERE name LIKE 'c3-highcpu-4'; UPDATE instances SET coremarkScore = '160329', standardDeviation = '0.48 ', sampleCount = '600' WHERE name LIKE 'c3-highcpu-8'; UPDATE instances SET coremarkScore = '441164', standardDeviation = '0.29 ', sampleCount = '224' WHERE name LIKE 'c3-highcpu-22'; UPDATE instances SET coremarkScore = '880832', standardDeviation = '0.87 ', sampleCount = '112' WHERE name LIKE 'c3-highcpu-44'; UPDATE instances SET coremarkScore = '1696613', standardDeviation = '1.07 ', sampleCount = '56' WHERE name LIKE 'c3-highcpu-88'; UPDATE instances SET coremarkScore = '3388373', standardDeviation = '0.62 ', sampleCount = '28' WHERE name LIKE 'c3-highcpu-176'; UPDATE instances SET coremarkScore = '80742', standardDeviation = '0.44 ', sampleCount = '1200' WHERE name LIKE 'c3-highmem-4'; UPDATE instances SET coremarkScore = '160478', standardDeviation = '0.29 ', sampleCount = '612' WHERE name LIKE 'c3-highmem-8'; UPDATE instances SET coremarkScore = '441229', standardDeviation = '0.21 ', sampleCount = '252' WHERE name LIKE 'c3-highmem-22'; UPDATE instances SET coremarkScore = '877637', standardDeviation = '1.12 ', sampleCount = '136' WHERE name LIKE 'c3-highmem-44'; UPDATE instances SET coremarkScore = '1689147', standardDeviation = '1.48 ', sampleCount = '72' WHERE name LIKE 'c3-highmem-88'; UPDATE instances SET coremarkScore = '3347332', standardDeviation = '1.44 ', sampleCount = '56' WHERE name LIKE 'c3-highmem-176'; UPDATE instances SET coremarkScore = '556066', standardDeviation = '0.22 ', sampleCount = '1020' WHERE name LIKE 'm3-ultramem-32'; UPDATE instances SET coremarkScore = '1101308', standardDeviation = '0.73 ', sampleCount = '1144' WHERE name LIKE 'm3-ultramem-64'; UPDATE instances SET coremarkScore = '2190379', standardDeviation = '0.62 ', sampleCount = '1128' WHERE name LIKE 'm3-ultramem-128'; UPDATE instances SET coremarkScore = '1094465', standardDeviation = '0.98 ', sampleCount = '1132' WHERE name LIKE 'm3-megamem-64'; UPDATE instances SET coremarkScore = '2182236', standardDeviation = '0.89 ', sampleCount = '1144' WHERE name LIKE 'm3-megamem-128'; UPDATE instances SET coremarkScore = '1691169', standardDeviation = '1.02 ', sampleCount = '84' WHERE name LIKE 'z3-highmem-88'; UPDATE instances SET coremarkScore = '3373295', standardDeviation = '0.97 ', sampleCount = '88' WHERE name LIKE 'z3-highmem-176'; UPDATE instances SET coremarkScore = '56273', standardDeviation = '0.66 ', sampleCount = '88' WHERE name LIKE 'g2-standard-4'; UPDATE instances SET coremarkScore = '111997', standardDeviation = '0.64 ', sampleCount = '48' WHERE name LIKE 'g2-standard-8'; UPDATE instances SET coremarkScore = '167604', standardDeviation = '0.52 ', sampleCount = '36' WHERE name LIKE 'g2-standard-12'; UPDATE instances SET coremarkScore = '223514', standardDeviation = '0.51 ', sampleCount = '28' WHERE name LIKE 'g2-standard-16'; UPDATE instances SET coremarkScore = '334411', standardDeviation = '0.53 ', sampleCount = '20' WHERE name LIKE 'g2-standard-24'; UPDATE instances SET coremarkScore = '446322', standardDeviation = '0.64 ', sampleCount = '16' WHERE name LIKE 'g2-standard-32'; UPDATE instances SET coremarkScore = '656106', standardDeviation = '2.97 ', sampleCount = '12' WHERE name LIKE 'g2-standard-48'; UPDATE instances SET coremarkScore = '1249876', standardDeviation = '0.20 ', sampleCount = '8' WHERE name LIKE 'g2-standard-96'; ================================================ FILE: instances/series/cpu/frequency.sql ================================================ /* Intel */ /* https://cloud.google.com/compute/docs/cpu-platforms#intel_processors */ /* Intel Xeon E5 (Sandy Bridge) */ UPDATE instances SET cpuBaseClock = '2.6', cpuTurboClock = '3.2', cpuSingleMaxTurboClock = '3.6' WHERE availableCpuPlatform LIKE '%Sandy%' AND series LIKE 'n1'; /* Intel Xeon E5 v2 (Ivy Bridge) */ UPDATE instances SET cpuBaseClock = '2.5', cpuTurboClock = '3.1', cpuSingleMaxTurboClock = '3.5' WHERE availableCpuPlatform LIKE '%Ivy%' AND series LIKE 'n1'; /* Intel Xeon E5 v3 (Haswell) */ UPDATE instances SET cpuBaseClock = '2.3', cpuTurboClock = '2.8', cpuSingleMaxTurboClock = '3.8' WHERE availableCpuPlatform LIKE '%Haswell%' AND series LIKE 'n1'; /* Intel Xeon E5 (Broadwell E5) */ UPDATE instances SET cpuBaseClock = '2.2', cpuTurboClock = '2.8', cpuSingleMaxTurboClock = '3.7' WHERE availableCpuPlatform LIKE '%Broadwell%' AND series LIKE 'n1'; UPDATE instances SET cpuBaseClock = '2.2', cpuTurboClock = '2.8', cpuSingleMaxTurboClock = '3.7' WHERE availableCpuPlatform LIKE '%Broadwell%' AND series LIKE 'e2'; /* Intel Xeon E7 (Broadwell E7) */ UPDATE instances SET cpuBaseClock = '2.2', cpuTurboClock = '2.6', cpuSingleMaxTurboClock = '3.3' WHERE availableCpuPlatform LIKE '%Broadwell%' AND series LIKE 'm1'; /* Intel Xeon Scalable Processor (Skylake) 1st Generation */ UPDATE instances SET cpuBaseClock = '2.0', cpuTurboClock = '2.7', cpuSingleMaxTurboClock = '3.5' WHERE availableCpuPlatform LIKE '%Skylake%' AND series LIKE 'n1'; UPDATE instances SET cpuBaseClock = '2.0', cpuTurboClock = '2.7', cpuSingleMaxTurboClock = '3.5' WHERE availableCpuPlatform LIKE '%Skylake%' AND series LIKE 'e2'; UPDATE instances SET cpuBaseClock = '2.0', cpuTurboClock = '2.7', cpuSingleMaxTurboClock = '3.5' WHERE availableCpuPlatform LIKE '%Skylake%' AND series LIKE 'm1'; /* Intel Xeon Scalable Processor (Cascade Lake) 2nd Generation */ UPDATE instances SET cpuBaseClock = '2.8', cpuTurboClock = '3.4', cpuSingleMaxTurboClock = '3.9' WHERE availableCpuPlatform LIKE '%Cascade Lake%' AND series LIKE 'n2'; UPDATE instances SET cpuBaseClock = '3.1', cpuTurboClock = '3.8', cpuSingleMaxTurboClock = '3.9' WHERE availableCpuPlatform LIKE '%Cascade Lake%' AND series LIKE 'c2'; UPDATE instances SET cpuBaseClock = '2.5', cpuTurboClock = '3.4', cpuSingleMaxTurboClock = '4.0' WHERE availableCpuPlatform LIKE '%Cascade Lake%' AND series LIKE 'm2'; UPDATE instances SET cpuBaseClock = '2.2', cpuTurboClock = '2.9', cpuSingleMaxTurboClock = '3.7' WHERE availableCpuPlatform LIKE '%Cascade Lake%' AND series LIKE 'a2'; UPDATE instances SET cpuBaseClock = '2.2', cpuTurboClock = '2.9', cpuSingleMaxTurboClock = '3.7' WHERE availableCpuPlatform LIKE '%Cascade Lake%' AND series LIKE 'g2'; /* Intel Xeon Scalable Processor (Ice Lake) 3rd Generation */ UPDATE instances SET cpuBaseClock = '2.6', cpuTurboClock = '3.4', cpuSingleMaxTurboClock = '3.5' WHERE availableCpuPlatform LIKE '%Ice Lake%' AND series LIKE 'n2'; UPDATE instances SET cpuBaseClock = '3.1', cpuTurboClock = '3.8', cpuSingleMaxTurboClock = '3.9' WHERE availableCpuPlatform LIKE '%Ice Lake%' AND series LIKE 'c2'; UPDATE instances SET cpuBaseClock = '2.6', cpuTurboClock = '3.4', cpuSingleMaxTurboClock = '3.5' WHERE availableCpuPlatform LIKE '%Ice Lake%' AND series LIKE 'm3'; /* Intel Xeon Scalable Processor (Sapphire Rapids) 4rd Generation */ UPDATE instances SET cpuBaseClock = '1.9', cpuTurboClock = '3.0', cpuSingleMaxTurboClock = '3.3' WHERE availableCpuPlatform LIKE '%Sapphire Rapids%' AND series LIKE 'a3'; UPDATE instances SET cpuBaseClock = '1.9', cpuTurboClock = '3.0', cpuSingleMaxTurboClock = '3.3' WHERE availableCpuPlatform LIKE '%Sapphire Rapids%' AND series LIKE 'c3'; UPDATE instances SET cpuBaseClock = '1.9', cpuTurboClock = '3.0', cpuSingleMaxTurboClock = '3.3' WHERE availableCpuPlatform LIKE '%Sapphire Rapids%' AND series LIKE 'h3'; UPDATE instances SET cpuBaseClock = '1.9', cpuTurboClock = '3.0', cpuSingleMaxTurboClock = '3.3' WHERE availableCpuPlatform LIKE '%Sapphire Rapids%' AND series LIKE 'z3'; /* Intel Xeon Scalable Processor (Emerald Rapids) 5th Generation */ UPDATE instances SET cpuBaseClock = '2.3', cpuTurboClock = '3.1', cpuSingleMaxTurboClock = '4.0' WHERE availableCpuPlatform LIKE '%Emerald Rapids%' AND series LIKE 'c4'; UPDATE instances SET cpuBaseClock = '2.1', cpuTurboClock = '2.9', cpuSingleMaxTurboClock = '4.0' WHERE availableCpuPlatform LIKE '%Emerald Rapids%' AND series LIKE 'a4'; UPDATE instances SET cpuBaseClock = '2.1', cpuTurboClock = '2.9', cpuSingleMaxTurboClock = '4.0' WHERE availableCpuPlatform LIKE '%Emerald Rapids%' AND series LIKE 'm4'; UPDATE instances SET cpuBaseClock = '2.1', cpuTurboClock = '2.9', cpuSingleMaxTurboClock = '3.3' WHERE availableCpuPlatform LIKE '%Emerald Rapids%' AND series LIKE 'n4'; /* Intel Xeon Scalable Processor (Granite Rapids) 6th Generation */ UPDATE instances SET cpuBaseClock = '2.8', cpuTurboClock = '3.9', cpuSingleMaxTurboClock = '4.2' WHERE availableCpuPlatform LIKE '%Granite Rapids%' AND series LIKE 'c4'; /* AMD */ /* https://cloud.google.com/compute/docs/cpu-platforms#amd_processors */ /* AMD EPYC Rome 2nd Generation */ UPDATE instances SET cpuBaseClock = '2.25', cpuTurboClock = '2.7', cpuSingleMaxTurboClock = '3.3' WHERE availableCpuPlatform LIKE '%Rome%'; /* AMD EPYC Milan 3rd Generation */ UPDATE instances SET cpuBaseClock = '2.45', cpuTurboClock = '2.8', cpuSingleMaxTurboClock = '3.5' WHERE availableCpuPlatform LIKE '%Milan%'; /* AMD EPYC Genoa 4rd Generation */ UPDATE instances SET cpuBaseClock = '2.6', cpuTurboClock = '3.45', cpuSingleMaxTurboClock = '3.7' WHERE availableCpuPlatform LIKE '%Genoa%'; /* AMD EPYC Turin 5th Generation */ UPDATE instances SET cpuBaseClock = '2.7', cpuTurboClock = '3.5', cpuSingleMaxTurboClock = '4.1' WHERE availableCpuPlatform LIKE '%Turin%'; /* Arm */ /* https://cloud.google.com/compute/docs/cpu-platforms#arm_processors */ /* Ampere Altra Q64-30 */ /* https://amperecomputing.com/briefs/ampere-altra-family-product-brief */ UPDATE instances SET cpuBaseClock = '3.0', cpuTurboClock = '3.0', cpuSingleMaxTurboClock = '3.0' WHERE availableCpuPlatform LIKE '%Ampere Altra%'; /* Google Axion Processors */ /* https://gist.github.com/Cyclenerd/57ffee632dcb3d7e537fbcdc9779cb50 */ UPDATE instances SET cpuBaseClock = '3.0', cpuTurboClock = '3.0', cpuSingleMaxTurboClock = '3.0' WHERE availableCpuPlatform LIKE '%Google Axion%'; ================================================ FILE: instances/series/e2.sql ================================================ /* E2 General-purpose */ /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ /* https://cloud.google.com/compute/docs/general-purpose-machines#e2_machine_types */ UPDATE instances SET series = 'e2', family = 'General-purpose', cpuPlatform = 'Skylake, Broadwell, Haswell, Rome', spot = '1' WHERE name LIKE 'e2-%'; UPDATE instances SET bandwidth = '4' WHERE name LIKE 'e2-%-2'; UPDATE instances SET bandwidth = '8' WHERE name LIKE 'e2-%-4'; UPDATE instances SET bandwidth = '16' WHERE name LIKE 'e2-%-8'; UPDATE instances SET bandwidth = '16' WHERE name LIKE 'e2-%-16'; UPDATE instances SET bandwidth = '16' WHERE name LIKE 'e2-%-32'; /* E2 shared-core */ /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ /* https://cloud.google.com/compute/docs/general-purpose-machines#e2_machine_types */ UPDATE instances SET bandwidth = '1' WHERE name LIKE 'e2-micro'; UPDATE instances SET bandwidth = '2' WHERE name LIKE 'e2-small'; UPDATE instances SET bandwidth = '2' WHERE name LIKE 'e2-medium'; ================================================ FILE: instances/series/g2.sql ================================================ /* G2 Accelerator-optimized machines */ /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ /* https://cloud.google.com/compute/docs/accelerator-optimized-machines#g2-vms */ UPDATE instances SET series = 'g2', family = 'Accelerator-optimized', cpuPlatform = 'Cascade Lake', localSsd = '1', spot = '1' WHERE name LIKE 'g2-%'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'g2-standard-4'; UPDATE instances SET bandwidth = '16' WHERE name LIKE 'g2-standard-8'; UPDATE instances SET bandwidth = '16' WHERE name LIKE 'g2-standard-12'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'g2-standard-16'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'g2-standard-24'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'g2-standard-32'; UPDATE instances SET bandwidth = '50' WHERE name LIKE 'g2-standard-48'; UPDATE instances SET bandwidth = '100' WHERE name LIKE 'g2-standard-96'; ================================================ FILE: instances/series/gpu/gpu_names.sql ================================================ /* * Replace graphics processing units (GPUs) type names * https://cloud.google.com/compute/docs/gpus#gpus-list */ UPDATE instances SET acceleratorType = 'NVIDIA L4 vWS' WHERE acceleratorType LIKE 'nvidia-l4-vws'; UPDATE instances SET acceleratorType = 'NVIDIA L4' WHERE acceleratorType LIKE 'nvidia-l4'; UPDATE instances SET acceleratorType = 'NVIDIA A100 40GB' WHERE acceleratorType LIKE 'nvidia-tesla-a100'; UPDATE instances SET acceleratorType = 'NVIDIA A100 80GB' WHERE acceleratorType LIKE 'nvidia-a100-80gb'; UPDATE instances SET acceleratorType = 'NVIDIA T4 vWS' WHERE acceleratorType LIKE 'nvidia-tesla-t4-vws'; UPDATE instances SET acceleratorType = 'NVIDIA T4' WHERE acceleratorType LIKE 'nvidia-tesla-t4'; UPDATE instances SET acceleratorType = 'NVIDIA P4 vWS' WHERE acceleratorType LIKE 'nvidia-tesla-p4-vws'; UPDATE instances SET acceleratorType = 'NVIDIA P4' WHERE acceleratorType LIKE 'nvidia-tesla-p4'; UPDATE instances SET acceleratorType = 'NVIDIA V100' WHERE acceleratorType LIKE 'nvidia-tesla-v100'; UPDATE instances SET acceleratorType = 'NVIDIA P100 vWS' WHERE acceleratorType LIKE 'nvidia-tesla-p100-vws'; UPDATE instances SET acceleratorType = 'NVIDIA P100' WHERE acceleratorType LIKE 'nvidia-tesla-p100'; UPDATE instances SET acceleratorType = 'NVIDIA H100 80GB' WHERE acceleratorType LIKE 'nvidia-h100-80gb'; UPDATE instances SET acceleratorType = 'NVIDIA H100 80GB Mega' WHERE acceleratorType LIKE 'nvidia-h100-mega-80gb'; UPDATE instances SET acceleratorType = 'NVIDIA K80 (EOL!)' WHERE acceleratorType LIKE 'nvidia-tesla-k80'; ================================================ FILE: instances/series/h3.sql ================================================ /* H3 Compute-optimized */ /* https://cloud.google.com/compute/docs/compute-optimized-machines#h3_series */ UPDATE instances SET series = 'h3', family = 'Compute-optimized', cpuPlatform = 'Sapphire Rapids', localSsd = '0', bandwidth = '200', spot = '0' WHERE name LIKE 'h3-%'; ================================================ FILE: instances/series/m1.sql ================================================ /* M1 Memory-optimized megamem */ /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ /* https://cloud.google.com/compute/docs/memory-optimized-machines#m1_machine_types */ UPDATE instances SET series = 'm1', family = 'Memory-optimized', cpuPlatform = 'Skylake', localSsd = '1', bandwidth = '32', sud = '1', spot = '1' WHERE name LIKE 'm1-megamem-%'; /* M1 Memory-optimized ultramem */ /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ /* https://cloud.google.com/compute/docs/memory-optimized-machines#m1_machine_types */ UPDATE instances SET series = 'm1', family = 'Memory-optimized', cpuPlatform = 'Broadwell', bandwidth = '32', sud = '1', spot = '1' WHERE name LIKE 'm1-ultramem-%'; ================================================ FILE: instances/series/m2.sql ================================================ /* M2 Memory-optimized ultramem */ /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ /* https://cloud.google.com/compute/docs/memory-optimized-machines#m2_machine_types */ UPDATE instances SET series = 'm2', family = 'Memory-optimized', cpuPlatform = 'Cascade Lake', bandwidth = '32', sud = '1' WHERE name LIKE 'm2-%'; ================================================ FILE: instances/series/m3.sql ================================================ /* M3 Memory-optimized */ /* https://cloud.google.com/compute/docs/memory-optimized-machines#m3_machine_types */ UPDATE instances SET series = 'm3', family = 'Memory-optimized', cpuPlatform = 'Ice Lake', localSsd = '1', bandwidth = '32', sud = '0', spot = '1' WHERE name LIKE 'm3-%'; UPDATE instances SET tier1 = '50' WHERE name LIKE 'm3-%-64'; UPDATE instances SET tier1 = '100' WHERE name LIKE 'm3-%-128'; ================================================ FILE: instances/series/m4.sql ================================================ /* M3 Memory-optimized */ /* https://cloud.google.com/compute/docs/memory-optimized-machines#m4_series */ UPDATE instances SET series = 'm4', family = 'Memory-optimized', cpuPlatform = 'Emerald Rapids', localSsd = '0', bandwidth = '32', tier1 = '50', sud = '0', spot = '0' WHERE name LIKE 'm4-%'; UPDATE instances SET bandwidth = '32', tier1 = '50' WHERE name LIKE 'm4-%-56'; UPDATE instances SET bandwidth = '50', tier1 = '100' WHERE name LIKE 'm4-%-112'; UPDATE instances SET bandwidth = '100', tier1 = '200' WHERE name LIKE 'm4-%-224'; ================================================ FILE: instances/series/n1.sql ================================================ /* N1 General-purpose */ /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ /* https://cloud.google.com/compute/docs/general-purpose-machines#n1_machines */ UPDATE instances SET series = 'n1', family = 'General-purpose', cpuPlatform = 'Skylake, Broadwell, Haswell, Sandy Bridge, Ivy Bridge', localSsd = '1', sud = '1', spot = '1' WHERE name LIKE 'n1-%'; UPDATE instances SET bandwidth = '2' WHERE name LIKE 'n1-%-1'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n1-%-2'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n1-%-4'; UPDATE instances SET bandwidth = '16' WHERE name LIKE 'n1-%-8'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n1-%-16'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n1-%-32'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n1-%-64'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n1-%-96'; /* N1 shared-core */ /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ /* https://cloud.google.com/compute/docs/general-purpose-machines#n1_machines */ UPDATE instances SET series = 'n1', family = 'General-purpose', cpuPlatform = 'Skylake, Broadwell, Haswell, Sandy Bridge, Ivy Bridge', bandwidth = '1', sud = '1', spot = '1' WHERE name LIKE 'g1-%' OR name LIKE 'f1-%'; ================================================ FILE: instances/series/n2.sql ================================================ /* N2 General-purpose */ /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ /* https://cloud.google.com/compute/docs/general-purpose-machines#n2_machines */ UPDATE instances SET series = 'n2', family = 'General-purpose', cpuPlatform = 'Cascade Lake, Ice Lake', localSsd = '1', sud = '1', spot = '1' WHERE name LIKE 'n2-%'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n2-%-2'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n2-%-4'; UPDATE instances SET bandwidth = '16' WHERE name LIKE 'n2-%-8'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n2-%-16'; UPDATE instances SET bandwidth = '32', tier1 = '50' WHERE name LIKE 'n2-%-32'; UPDATE instances SET bandwidth = '32', tier1 = '50' WHERE name LIKE 'n2-%-48'; UPDATE instances SET bandwidth = '32', tier1 = '75' WHERE name LIKE 'n2-%-64'; UPDATE instances SET bandwidth = '32', tier1 = '100' WHERE name LIKE 'n2-%-80'; UPDATE instances SET bandwidth = '32', tier1 = '100' WHERE name LIKE 'n2-%-96'; UPDATE instances SET bandwidth = '32', tier1 = '100' WHERE name LIKE 'n2-%-128'; ================================================ FILE: instances/series/n2d.sql ================================================ /* N2D General-purpose */ /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ /* https://cloud.google.com/compute/docs/general-purpose-machines#n2d_machines */ UPDATE instances SET series = 'n2d', family = 'General-purpose', cpuPlatform = 'Rome, Milan', localSsd = '1', sud = '1', spot = '1' WHERE name LIKE 'n2d-%'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n2d-%-2'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n2d-%-4'; UPDATE instances SET bandwidth = '16' WHERE name LIKE 'n2d-%-8'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n2d-%-16'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n2d-%-32'; UPDATE instances SET bandwidth = '32', tier1 = '50' WHERE name LIKE 'n2d-%-48'; UPDATE instances SET bandwidth = '32', tier1 = '50' WHERE name LIKE 'n2d-%-64'; UPDATE instances SET bandwidth = '32', tier1 = '50' WHERE name LIKE 'n2d-%-80'; UPDATE instances SET bandwidth = '32', tier1 = '100' WHERE name LIKE 'n2d-%-96'; UPDATE instances SET bandwidth = '32', tier1 = '100' WHERE name LIKE 'n2d-%-128'; UPDATE instances SET bandwidth = '32', tier1 = '100' WHERE name LIKE 'n2d-%-224'; ================================================ FILE: instances/series/n4.sql ================================================ /* N4 General-purpose */ /* https://cloud.google.com/compute/docs/general-purpose-machines#n4_series */ UPDATE instances SET series = 'n4', family = 'General-purpose', cpuPlatform = 'Emerald Rapids', localSsd = '0', sud = '0', spot = '1' WHERE name LIKE 'n4-%'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n4-%-2'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n4-%-4'; UPDATE instances SET bandwidth = '16' WHERE name LIKE 'n4-%-8'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n4-%-16'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n4-%-32'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n4-%-48'; UPDATE instances SET bandwidth = '45' WHERE name LIKE 'n4-%-64'; UPDATE instances SET bandwidth = '50' WHERE name LIKE 'n4-%-80'; ================================================ FILE: instances/series/n4a.sql ================================================ /* N4A General-purpose */ /* https://docs.cloud.google.com/compute/docs/general-purpose-machines?hl=en#n4a_series */ UPDATE instances SET series = 'n4a', family = 'General-purpose', cpuPlatform = 'Google Axion', localSsd = '0', sud = '0', spot = '1' WHERE name LIKE 'n4a-%'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n4a-%-1'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n4a-%-2'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n4a-%-4'; UPDATE instances SET bandwidth = '16' WHERE name LIKE 'n4a-%-8'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n4a-%-16'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n4a-%-32'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n4a-%-48'; UPDATE instances SET bandwidth = '50' WHERE name LIKE 'n4a-%-64'; ================================================ FILE: instances/series/n4d.sql ================================================ /* N4 General-purpose */ /* https://cloud.google.com/compute/docs/general-purpose-machines#n4_series */ UPDATE instances SET series = 'n4d', family = 'General-purpose', cpuPlatform = 'Turin', localSsd = '0', sud = '0', spot = '1' WHERE name LIKE 'n4d-%'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n4d-%-2'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 'n4d-%-4'; UPDATE instances SET bandwidth = '16' WHERE name LIKE 'n4d-%-8'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n4d-%-16'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n4d-%-32'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'n4d-%-48'; UPDATE instances SET bandwidth = '45' WHERE name LIKE 'n4d-%-64'; UPDATE instances SET bandwidth = '50' WHERE name LIKE 'n4d-%-80'; UPDATE instances SET bandwidth = '50' WHERE name LIKE 'n4d-%-96'; ================================================ FILE: instances/series/sap/hana.sql ================================================ /* SAP HANA certified machine types */ /* https://cloud.google.com/solutions/sap/docs/certifications-sap-hana#hana-cert-table-vms */ UPDATE instances SET hana = '1' WHERE name LIKE 'c3-highmem-88'; UPDATE instances SET hana = '1' WHERE name LIKE 'c3-standard-44'; UPDATE instances SET hana = '1' WHERE name LIKE 'c3-highmem-44'; UPDATE instances SET hana = '1' WHERE name LIKE 'c3-highmem-88'; UPDATE instances SET hana = '1' WHERE name LIKE 'c3-highmem-176'; UPDATE instances SET hana = '1' WHERE name LIKE 'c3-highmem-192-metal'; UPDATE instances SET hana = '1' WHERE name LIKE 'c4-highmem-32'; UPDATE instances SET hana = '1' WHERE name LIKE 'c4-highmem-48'; UPDATE instances SET hana = '1' WHERE name LIKE 'c4-highmem-96'; UPDATE instances SET hana = '1' WHERE name LIKE 'c4-highmem-192'; UPDATE instances SET hana = '1' WHERE name LIKE 'n1-highmem-32'; UPDATE instances SET hana = '1' WHERE name LIKE 'n1-highmem-64'; UPDATE instances SET hana = '1' WHERE name LIKE 'n1-highmem-96'; UPDATE instances SET hana = '1' WHERE name LIKE 'n2-highmem-32'; UPDATE instances SET hana = '1' WHERE name LIKE 'n2-highmem-48'; UPDATE instances SET hana = '1' WHERE name LIKE 'n2-highmem-64'; UPDATE instances SET hana = '1' WHERE name LIKE 'n2-highmem-80'; UPDATE instances SET hana = '1' WHERE name LIKE 'n2-highmem-96'; UPDATE instances SET hana = '1' WHERE name LIKE 'n2-highmem-128'; UPDATE instances SET hana = '1' WHERE name LIKE 'm1-%'; UPDATE instances SET hana = '1' WHERE name LIKE 'm2-%'; UPDATE instances SET hana = '1' WHERE name LIKE 'm3-%'; UPDATE instances SET hana = '1' WHERE name LIKE 'm4-%'; ================================================ FILE: instances/series/sap/sap.sql ================================================ /* SAP certified machine types */ /* https://cloud.google.com/solutions/sap/docs/certifications-sap-apps#sap-certified-vms */ /* https://launchpad.support.sap.com/#/notes/2456432 */ /* C2 */ /* Intel Cascade Lake */ UPDATE instances SET sap = '1', saps = '6040' WHERE name LIKE 'c2-standard-4' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '12080' WHERE name LIKE 'c2-standard-8' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '24160' WHERE name LIKE 'c2-standard-16' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '45300' WHERE name LIKE 'c2-standard-30' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '90600' WHERE name LIKE 'c2-standard-60' AND availableCpuPlatform LIKE '%Cascade Lake%'; /* C3 */ /* Intel Sapphire Rapids */ UPDATE instances SET sap = '1', saps = '7835' WHERE name LIKE 'c3-standard-4' AND availableCpuPlatform LIKE '%Sapphire Rapids%'; UPDATE instances SET sap = '1', saps = '15670' WHERE name LIKE 'c3-standard-8' AND availableCpuPlatform LIKE '%Sapphire Rapids%'; UPDATE instances SET sap = '1', saps = '41720' WHERE name LIKE 'c3-standard-22' AND availableCpuPlatform LIKE '%Sapphire Rapids%'; UPDATE instances SET sap = '1', saps = '140200' WHERE name LIKE 'c3-standard-88' AND availableCpuPlatform LIKE '%Sapphire Rapids%'; UPDATE instances SET sap = '1', saps = '270320' WHERE name LIKE 'c3-standard-176' AND availableCpuPlatform LIKE '%Sapphire Rapids%'; UPDATE instances SET sap = '1', saps = '7840' WHERE name LIKE 'c3-highmem-4' AND availableCpuPlatform LIKE '%Sapphire Rapids%'; UPDATE instances SET sap = '1', saps = '15680' WHERE name LIKE 'c3-highmem-8' AND availableCpuPlatform LIKE '%Sapphire Rapids%'; UPDATE instances SET sap = '1', saps = '41580' WHERE name LIKE 'c3-highmem-22' AND availableCpuPlatform LIKE '%Sapphire Rapids%'; UPDATE instances SET sap = '1', saps = '76150' WHERE name LIKE 'c3-highmem-44' AND availableCpuPlatform LIKE '%Sapphire Rapids%'; UPDATE instances SET sap = '1', saps = '142420' WHERE name LIKE 'c3-highmem-88' AND availableCpuPlatform LIKE '%Sapphire Rapids%'; UPDATE instances SET sap = '1', saps = '271550' WHERE name LIKE 'c3-highmem-176' AND availableCpuPlatform LIKE '%Sapphire Rapids%'; /* TODO: Add SAPS */ UPDATE instances SET sap = '1' WHERE name LIKE 'c3-standard-192-metal' AND availableCpuPlatform LIKE '%Sapphire Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'c3-highmem-192-metal' AND availableCpuPlatform LIKE '%Sapphire Rapids%'; /* C4 */ /* Intel Emerald Rapids */ /* TODO: Add SAPS */ UPDATE instances SET sap = '1' WHERE name LIKE 'c4-highmem-2' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'c4-highmem-4' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'c4-highmem-8' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'c4-highmem-16' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'c4-highmem-32' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'c4-highmem-48' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'c4-highmem-96' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'c4-highmem-192' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'c4-standard-2' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'c4-standard-4' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'c4-standard-8' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'c4-standard-16' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'c4-standard-32' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'c4-standard-48' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'c4-standard-96' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'c4-standard-192' AND availableCpuPlatform LIKE '%Emerald Rapids%'; /* C2D */ /* AMD EPYC Milan */ UPDATE instances SET sap = '1', saps = '3543' WHERE name LIKE 'c2d-highmem-2' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '7086' WHERE name LIKE 'c2d-highmem-4' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '14171' WHERE name LIKE 'c2d-highmem-8' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '28343' WHERE name LIKE 'c2d-highmem-16' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '56686' WHERE name LIKE 'c2d-highmem-32' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '99200' WHERE name LIKE 'c2d-highmem-56' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '190150' WHERE name LIKE 'c2d-highmem-112' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '3545' WHERE name LIKE 'c2d-standard-2' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '7089' WHERE name LIKE 'c2d-standard-4' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '14179' WHERE name LIKE 'c2d-standard-8' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '28357' WHERE name LIKE 'c2d-standard-16' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '56714' WHERE name LIKE 'c2d-standard-32' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '99250' WHERE name LIKE 'c2d-standard-56' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '189400' WHERE name LIKE 'c2d-standard-112' AND availableCpuPlatform LIKE '%Milan%'; /* C3D */ /* AMD EPYC Genoa */ /* TODO: Add SAPS */ UPDATE instances SET sap = '1' WHERE name LIKE 'c3d-highmem-4'; UPDATE instances SET sap = '1' WHERE name LIKE 'c3d-highmem-8'; UPDATE instances SET sap = '1' WHERE name LIKE 'c3d-highmem-16'; UPDATE instances SET sap = '1' WHERE name LIKE 'c3d-highmem-30'; UPDATE instances SET sap = '1' WHERE name LIKE 'c3d-highmem-60'; UPDATE instances SET sap = '1' WHERE name LIKE 'c3d-highmem-90'; UPDATE instances SET sap = '1' WHERE name LIKE 'c3d-highmem-180'; UPDATE instances SET sap = '1' WHERE name LIKE 'c3d-standard-4'; UPDATE instances SET sap = '1' WHERE name LIKE 'c3d-standard-8'; UPDATE instances SET sap = '1' WHERE name LIKE 'c3d-standard-16'; UPDATE instances SET sap = '1' WHERE name LIKE 'c3d-standard-30'; UPDATE instances SET sap = '1' WHERE name LIKE 'c3d-standard-60'; UPDATE instances SET sap = '1' WHERE name LIKE 'c3d-standard-90'; UPDATE instances SET sap = '1' WHERE name LIKE 'c3d-standard-180'; /* N2 */ /* Intel Cascade Lake */ UPDATE instances SET sap = '1', saps = '2688' WHERE name LIKE 'n2-highmem-2' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '5376' WHERE name LIKE 'n2-highmem-4' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '10752' WHERE name LIKE 'n2-highmem-8' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '21504' WHERE name LIKE 'n2-highmem-16' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '43008' WHERE name LIKE 'n2-highmem-32' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '64512' WHERE name LIKE 'n2-highmem-48' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '86016' WHERE name LIKE 'n2-highmem-64' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '107520' WHERE name LIKE 'n2-highmem-80' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '160080' WHERE name LIKE 'n2-highmem-96' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '183350' WHERE name LIKE 'n2-highmem-128' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '2632' WHERE name LIKE 'n2-standard-2' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '5263' WHERE name LIKE 'n2-standard-4' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '10525' WHERE name LIKE 'n2-standard-8' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '21050' WHERE name LIKE 'n2-standard-16' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '42100' WHERE name LIKE 'n2-standard-32' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '63150' WHERE name LIKE 'n2-standard-48' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '84200' WHERE name LIKE 'n2-standard-64' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '105250' WHERE name LIKE 'n2-standard-80' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '159820' WHERE name LIKE 'n2-standard-96' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '183900' WHERE name LIKE 'n2-standard-128' AND availableCpuPlatform LIKE '%Cascade Lake%'; /* Intel Ice Lake */ UPDATE instances SET sap = '1', saps = '3574' WHERE name LIKE 'n2-highmem-2' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '7148' WHERE name LIKE 'n2-highmem-4' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '14296' WHERE name LIKE 'n2-highmem-8' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '28593' WHERE name LIKE 'n2-highmem-16' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '57185' WHERE name LIKE 'n2-highmem-32' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '85778' WHERE name LIKE 'n2-highmem-48' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '114370' WHERE name LIKE 'n2-highmem-64' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '133400' WHERE name LIKE 'n2-highmem-80' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '160080' WHERE name LIKE 'n2-highmem-96' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '183350' WHERE name LIKE 'n2-highmem-128' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '3576' WHERE name LIKE 'n2-standard-2' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '7152' WHERE name LIKE 'n2-standard-4' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '14304' WHERE name LIKE 'n2-standard-8' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '28608' WHERE name LIKE 'n2-standard-16' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '57215' WHERE name LIKE 'n2-standard-32' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '85823' WHERE name LIKE 'n2-standard-48' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '114430' WHERE name LIKE 'n2-standard-64' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '133183' WHERE name LIKE 'n2-standard-80' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '159820' WHERE name LIKE 'n2-standard-96' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '183900' WHERE name LIKE 'n2-standard-128' AND availableCpuPlatform LIKE '%Ice Lake%'; /* N2D */ /* AMD EPYC Rome */ UPDATE instances SET sap = '1', saps = '3111' WHERE name LIKE 'n2d-highmem-2' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '6223' WHERE name LIKE 'n2d-highmem-4' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '12445' WHERE name LIKE 'n2d-highmem-8' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '24890' WHERE name LIKE 'n2d-highmem-16' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '49780' WHERE name LIKE 'n2d-highmem-32' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '74438' WHERE name LIKE 'n2d-highmem-48' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '99250' WHERE name LIKE 'n2d-highmem-64' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '115025' WHERE name LIKE 'n2d-highmem-80' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '138030' WHERE name LIKE 'n2d-highmem-96' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '3102' WHERE name LIKE 'n2d-standard-2' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '6203' WHERE name LIKE 'n2d-standard-4' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '12406' WHERE name LIKE 'n2d-standard-8' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '24813' WHERE name LIKE 'n2d-standard-16' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '49625' WHERE name LIKE 'n2d-standard-32' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '74438' WHERE name LIKE 'n2d-standard-48' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '99250' WHERE name LIKE 'n2d-standard-64' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '115025' WHERE name LIKE 'n2d-standard-80' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '138030' WHERE name LIKE 'n2d-standard-96' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '177070' WHERE name LIKE 'n2d-standard-128' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '229180' WHERE name LIKE 'n2d-standard-224' AND availableCpuPlatform LIKE '%Milan%'; /* AMD EPYC Milan */ UPDATE instances SET sap = '1', saps = '3160' WHERE name LIKE 'n2d-highmem-2' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '6321' WHERE name LIKE 'n2d-highmem-4' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '12641' WHERE name LIKE 'n2d-highmem-8' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '25283' WHERE name LIKE 'n2d-highmem-16' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '50565' WHERE name LIKE 'n2d-highmem-32' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '75848' WHERE name LIKE 'n2d-highmem-48' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '101130' WHERE name LIKE 'n2d-highmem-64' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '121108' WHERE name LIKE 'n2d-highmem-80' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '145330' WHERE name LIKE 'n2d-highmem-96' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '3166' WHERE name LIKE 'n2d-standard-2' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '6333' WHERE name LIKE 'n2d-standard-4' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '12665' WHERE name LIKE 'n2d-standard-8' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '25330' WHERE name LIKE 'n2d-standard-16' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '50660' WHERE name LIKE 'n2d-standard-32' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '75990' WHERE name LIKE 'n2d-standard-48' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '101320' WHERE name LIKE 'n2d-standard-64' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '120833' WHERE name LIKE 'n2d-standard-80' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '145000' WHERE name LIKE 'n2d-standard-96' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '185950' WHERE name LIKE 'n2d-standard-128' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '272600' WHERE name LIKE 'n2d-standard-224' AND availableCpuPlatform LIKE '%Milan%'; /* T2D */ /* AMD EPYC Milan */ UPDATE instances SET sap = '1', saps = '4325' WHERE name LIKE 't2d-standard-2' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '8650' WHERE name LIKE 't2d-standard-4' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '17300' WHERE name LIKE 't2d-standard-8' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '34600' WHERE name LIKE 't2d-standard-16' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '69200' WHERE name LIKE 't2d-standard-32' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '90064' WHERE name LIKE 't2d-standard-48' AND availableCpuPlatform LIKE '%Milan%'; UPDATE instances SET sap = '1', saps = '112580' WHERE name LIKE 't2d-standard-60' AND availableCpuPlatform LIKE '%Milan%'; /* N1 */ /* Intel Broadwell or Intel Skylake */ UPDATE instances SET sap = '1', saps = '2090' WHERE name LIKE 'n1-highmem-2' AND availableCpuPlatform LIKE '%Broadwell%'; UPDATE instances SET sap = '1', saps = '4180' WHERE name LIKE 'n1-highmem-4' AND availableCpuPlatform LIKE '%Broadwell%'; UPDATE instances SET sap = '1', saps = '8360' WHERE name LIKE 'n1-highmem-8' AND availableCpuPlatform LIKE '%Broadwell%'; UPDATE instances SET sap = '1', saps = '16720' WHERE name LIKE 'n1-highmem-16' AND availableCpuPlatform LIKE '%Broadwell%'; UPDATE instances SET sap = '1', saps = '33440' WHERE name LIKE 'n1-highmem-32' AND availableCpuPlatform LIKE '%Broadwell%'; UPDATE instances SET sap = '1', saps = '66880' WHERE name LIKE 'n1-highmem-64' AND availableCpuPlatform LIKE '%Broadwell%'; UPDATE instances SET sap = '1', saps = '100320' WHERE name LIKE 'n1-highmem-96' AND availableCpuPlatform LIKE '%Skylake%'; UPDATE instances SET sap = '1', saps = '8360' WHERE name LIKE 'n1-standard-8' AND availableCpuPlatform LIKE '%Broadwell%'; UPDATE instances SET sap = '1', saps = '16720' WHERE name LIKE 'n1-standard-16' AND availableCpuPlatform LIKE '%Broadwell%'; UPDATE instances SET sap = '1', saps = '33440' WHERE name LIKE 'n1-standard-32' AND availableCpuPlatform LIKE '%Broadwell%'; UPDATE instances SET sap = '1', saps = '66880' WHERE name LIKE 'n1-standard-64' AND availableCpuPlatform LIKE '%Broadwell%'; UPDATE instances SET sap = '1', saps = '100320' WHERE name LIKE 'n1-standard-96' AND availableCpuPlatform LIKE '%Skylake%'; /* M2 */ /* Intel Cascade Lake */ UPDATE instances SET sap = '1', saps = '223325' WHERE name LIKE 'm2-ultramem-208' AND availableCpuPlatform LIKE '%Cascade Lake%'; /* Same core count. All with 416 cores. All with 446650 SAPS */ UPDATE instances SET sap = '1', saps = '446650' WHERE name LIKE 'm2-ultramem-416' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '446650' WHERE name LIKE 'm2-megamem-416' AND availableCpuPlatform LIKE '%Cascade Lake%'; UPDATE instances SET sap = '1', saps = '446650' WHERE name LIKE 'm2-hypermem-416' AND availableCpuPlatform LIKE '%Cascade Lake%'; /* M1 (Intel Broadwell or Intel Skylake) */ UPDATE instances SET sap = '1', saps = '105050' WHERE name LIKE 'm1-megamem-96' AND availableCpuPlatform LIKE '%Skylake%'; UPDATE instances SET sap = '1', saps = '34475' WHERE name LIKE 'm1-ultramem-40' AND availableCpuPlatform LIKE '%Broadwell%'; UPDATE instances SET sap = '1', saps = '68950' WHERE name LIKE 'm1-ultramem-80' AND availableCpuPlatform LIKE '%Broadwell%'; UPDATE instances SET sap = '1', saps = '137900' WHERE name LIKE 'm1-ultramem-160' AND availableCpuPlatform LIKE '%Broadwell%'; /* M3 */ /* Intel Ice Lake */ UPDATE instances SET sap = '1', saps = '47835' WHERE name LIKE 'm3-ultramem-32' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '95670' WHERE name LIKE 'm3-ultramem-64' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '184800' WHERE name LIKE 'm3-ultramem-128' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '99170' WHERE name LIKE 'm3-megamem-64' AND availableCpuPlatform LIKE '%Ice Lake%'; UPDATE instances SET sap = '1', saps = '187620' WHERE name LIKE 'm3-megamem-128' AND availableCpuPlatform LIKE '%Ice Lake%'; /* M4 */ /* Intel Emerald Rapids */ /* TODO: Add SAPS */ UPDATE instances SET sap = '1' WHERE name LIKE 'm4-megamem-28' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'm4-megamem-56' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'm4-megamem-112' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'm4-megamem-224' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'm4-ultramem-56' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'm4-ultramem-112' AND availableCpuPlatform LIKE '%Emerald Rapids%'; UPDATE instances SET sap = '1' WHERE name LIKE 'm4-ultramem-224' AND availableCpuPlatform LIKE '%Emerald Rapids%'; ================================================ FILE: instances/series/t2a.sql ================================================ /* Tau T2A General-purpose */ /* https://cloud.google.com/compute/docs/general-purpose-machines#t2a_machines */ UPDATE instances SET series = 't2a', family = 'General-purpose', cpuPlatform = 'Ampere Altra', spot = '1' WHERE name LIKE 't2a-%'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 't2a-%-1'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 't2a-%-2'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 't2a-%-4'; UPDATE instances SET bandwidth = '16' WHERE name LIKE 't2a-%-8'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 't2a-%-16'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 't2a-%-32'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 't2a-%-48'; ================================================ FILE: instances/series/t2d.sql ================================================ /* Tau T2D General-purpose */ /* https://cloud.google.com/compute/docs/machine-types#machine_type_comparison */ /* https://cloud.google.com/compute/docs/general-purpose-machines#t2d_machines */ UPDATE instances SET series = 't2d', family = 'General-purpose', cpuPlatform = 'Milan', spot = '1' WHERE name LIKE 't2d-%'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 't2d-%-1'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 't2d-%-2'; UPDATE instances SET bandwidth = '10' WHERE name LIKE 't2d-%-4'; UPDATE instances SET bandwidth = '16' WHERE name LIKE 't2d-%-8'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 't2d-%-16'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 't2d-%-32'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 't2d-%-48'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 't2d-%-60'; ================================================ FILE: instances/series/z3.sql ================================================ /* Z3 Storage-optimized */ /* https://cloud.google.com/compute/docs/storage-optimized-machines */ UPDATE instances SET series = 'z3', family = 'Storage-optimized', cpuPlatform = 'Sapphire Rapids', localSsd = '1', spot = '1' WHERE name LIKE 'z3-%'; UPDATE instances SET bandwidth = '23' WHERE name LIKE 'z3-highmem-8%'; UPDATE instances SET bandwidth = '23' WHERE name LIKE 'z3-highmem-16%'; UPDATE instances SET bandwidth = '23' WHERE name LIKE 'z3-highmem-22%'; UPDATE instances SET bandwidth = '32' WHERE name LIKE 'z3-highmem-32%'; UPDATE instances SET bandwidth = '32', tier1 = '50' WHERE name LIKE 'z3-highmem-44%'; UPDATE instances SET bandwidth = '62', tier1 = '100' WHERE name LIKE 'z3-highmem-88%'; UPDATE instances SET bandwidth = '100', tier1 = '200' WHERE name LIKE 'z3-highmem-176%'; UPDATE instances SET bandwidth = '100', tier1 = '200' WHERE name LIKE 'z3-highmem-192%'; UPDATE instances SET localSsd = '3000' WHERE name LIKE 'z3-highmem-14-standardlssd'; UPDATE instances SET localSsd = '6000' WHERE name LIKE 'z3-highmem-22-standardlssd'; UPDATE instances SET localSsd = '9000' WHERE name LIKE 'z3-highmem-44-standardlssd'; UPDATE instances SET localSsd = '18000' WHERE name LIKE 'z3-highmem-88-standardlssd'; UPDATE instances SET localSsd = '36000' WHERE name LIKE 'z3-highmem-176-standardlssd'; UPDATE instances SET localSsd = '3000' WHERE name LIKE 'z3-highmem-8-highlssd'; UPDATE instances SET localSsd = '6000' WHERE name LIKE 'z3-highmem-16-highlssd'; UPDATE instances SET localSsd = '9000' WHERE name LIKE 'z3-highmem-22-highlssd'; UPDATE instances SET localSsd = '12000' WHERE name LIKE 'z3-highmem-32-highlssd'; UPDATE instances SET localSsd = '18000' WHERE name LIKE 'z3-highmem-44-highlssd'; UPDATE instances SET localSsd = '36000' WHERE name LIKE 'z3-highmem-88-highlssd'; UPDATE instances SET localSsd = '72000' WHERE name LIKE 'z3-highmem-192-highlssd-metal'; ================================================ FILE: regions/README.md ================================================ # Google Cloud Regions Here you can find the SQL files that add the different information from the Google websites. The information is in addition to the data of the Google Cloud Compute API. Feel free to make changes if something is wrong or you want to expand it. The SQL files are read during the [build](../build/) process. ## Carbon Data (`carbon.sql`) Mirror [carbon data across GCP regions](https://cloud.google.com/sustainability/region-carbon#data) from GitHub repo : ```shell curl -o "carbon.csv" \ "https://raw.githubusercontent.com/GoogleCloudPlatform/region-carbon-info/main/data/yearly/2024.csv" ``` Run `carbon.pl` to convert CSV to SQL: ```shell perl carbon.pl > carbon.sql ``` ## Region Locations (`regions.sql`) Add long region location name, latitude and longitude. Mirror [regions.json](https://github.com/GoogleCloudPlatform/region-picker/blob/main/data/regions.json) from GitHub repo : ```shell curl -O "https://raw.githubusercontent.com/GoogleCloudPlatform/region-picker/main/data/regions.json" ``` Run `regions.pl` to convert CSV to SQL: ```shell perl regions.pl > regions.sql ``` ## Country Codes (`country.sql`) Source: Add ISO 3166-1 alpha-2 country code to `country.sql`. ================================================ FILE: regions/carbon.csv ================================================ Google Cloud Region,Location,Google CFE,Grid carbon intensity (gCO2eq / kWh) africa-south1,Johannesburg,0.15,656.85 asia-east1,Taiwan,0.17,439.29 asia-east2,Hong Kong,0.01,505.02 asia-northeast1,Tokyo,0.17,452.85 asia-northeast2,Osaka,0.46,296.19 asia-northeast3,Seoul,0.37,356.57 asia-south1,Mumbai,0.09,678.76 asia-south2,Delhi,0.29,531.83 asia-southeast1,Singapore,0.04,366.85 asia-southeast2,Jakarta,0.18,560.55 australia-southeast1,Sydney,0.34,497.50 australia-southeast2,Melbourne,0.39,454.37 europe-central2,Warsaw,0.40,642.88 europe-north1,Finland,0.98,39.32 europe-north2,Stockholm,1.00,2.73 europe-southwest1,Madrid,0.87,89.04 europe-west1,Belgium,0.84,103.37 europe-west2,London,0.79,105.94 europe-west3,Frankfurt,0.68,275.82 europe-west4,Eemshaven,0.83,208.81 europe-west6,Zürich,0.98,15.05 europe-west8,Milan,0.73,201.69 europe-west9,Paris,0.96,16.30 europe-west10,Berlin,0.68,275.82 europe-west12,Turin,0.73,201.69 me-central1,Doha,0.01,366 me-central2,Dammam,0.01,382.23 me-west1,Tel Aviv,0.07,433.75 northamerica-northeast1,Montréal,0.99,5.48 northamerica-northeast2,Toronto,0.84,58.56 northamerica-south1,Mexico,0.19,305.00 southamerica-east1,Sāo Paulo,0.88,67.32 southamerica-west1,Santiago,0.92,238.00 us-central1,Iowa,0.87,412.72 us-central2,Oklahoma,0.88,372.23 us-east1,South Carolina,0.31,575.77 us-east2,Georgia,0.42,340.42 us-east4,Northern Virginia,0.62,323.05 us-east5,Columbus,0.62,323.05 us-south1,Dallas,0.94,302.95 us-west1,Oregon,0.87,79.23 us-west2,Los Angeles,0.63,169.28 us-west3,Salt Lake City,0.33,555.17 us-west4,Las Vegas,0.64,357.30 ================================================ FILE: regions/carbon.pl ================================================ #!/usr/bin/env perl # Copyright 2022-2025 Nils Knieling. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. use strict; use DBI; my $dbh = DBI->connect("dbi:CSV:", undef, undef, { f_ext => ".csv/r", csv_sep_char => ",", csv_class => "Text::CSV_XS", RaiseError => 1, }) or die "ERROR: Cannot connect $DBI::errstr\n"; # CSV col names: # Google Cloud Region, # Location, # Google CFE, # Grid carbon intensity (gCO2eq / kWh) my $sth = $dbh->prepare("SELECT * FROM carbon"); $sth->execute(); $sth->bind_columns(\my ($region, $location, $cfe, $co2_kwh)); print "/*\n"; print " * GENERATED WITH carbon.pl\n"; print " * Please see: https://github.com/Cyclenerd/google-cloud-compute-machine-types/blob/master/regions/README.md\n"; print " */\n"; while ($sth->fetch) { if ($region) { # Google Cloud Region $region =~ s/\s//; # Google CFE% if ($cfe =~ /^([0,1]\.\d{2}$)/) { $cfe = $1 * 100; } else { $cfe = ""; } # Grid carbon intensity (gCO2eq/kWh) if ($co2_kwh =~ /^(\d+(\.\d+)?)$/) { $co2_kwh = $1; } else { $co2_kwh = ""; } # https://cloud.google.com/sustainability/region-carbon#region-picker # 18.12.2025: https://archive.is/HKHtV # For a location to be considered "low carbon", # it must belong to a region with a Google CFE% of at least 75%, my $low_co2 = "0"; if ($cfe >= "75") { $low_co2 = "1"; # or, if CFE% information is not available, # a grid carbon intensity of maximum 200 gCO2eq/kWh. } elsif (!$cfe && $co2_kwh <= "200") { $low_co2 = "1"; } print "UPDATE instances SET regionCfe = '$cfe', regionCo2Kwh = '$co2_kwh', regionLowCo2 = '$low_co2' WHERE region = '$region';\n"; } } $dbh->disconnect; ================================================ FILE: regions/carbon.sql ================================================ /* * GENERATED WITH carbon.pl * Please see: https://github.com/Cyclenerd/google-cloud-compute-machine-types/blob/master/regions/README.md */ UPDATE instances SET regionCfe = '15', regionCo2Kwh = '656.85', regionLowCo2 = '0' WHERE region = 'africa-south1'; UPDATE instances SET regionCfe = '17', regionCo2Kwh = '439.29', regionLowCo2 = '0' WHERE region = 'asia-east1'; UPDATE instances SET regionCfe = '1', regionCo2Kwh = '505.02', regionLowCo2 = '0' WHERE region = 'asia-east2'; UPDATE instances SET regionCfe = '17', regionCo2Kwh = '452.85', regionLowCo2 = '0' WHERE region = 'asia-northeast1'; UPDATE instances SET regionCfe = '46', regionCo2Kwh = '296.19', regionLowCo2 = '0' WHERE region = 'asia-northeast2'; UPDATE instances SET regionCfe = '37', regionCo2Kwh = '356.57', regionLowCo2 = '0' WHERE region = 'asia-northeast3'; UPDATE instances SET regionCfe = '9', regionCo2Kwh = '678.76', regionLowCo2 = '0' WHERE region = 'asia-south1'; UPDATE instances SET regionCfe = '29', regionCo2Kwh = '531.83', regionLowCo2 = '0' WHERE region = 'asia-south2'; UPDATE instances SET regionCfe = '4', regionCo2Kwh = '366.85', regionLowCo2 = '0' WHERE region = 'asia-southeast1'; UPDATE instances SET regionCfe = '18', regionCo2Kwh = '560.55', regionLowCo2 = '0' WHERE region = 'asia-southeast2'; UPDATE instances SET regionCfe = '34', regionCo2Kwh = '497.50', regionLowCo2 = '0' WHERE region = 'australia-southeast1'; UPDATE instances SET regionCfe = '39', regionCo2Kwh = '454.37', regionLowCo2 = '0' WHERE region = 'australia-southeast2'; UPDATE instances SET regionCfe = '40', regionCo2Kwh = '642.88', regionLowCo2 = '0' WHERE region = 'europe-central2'; UPDATE instances SET regionCfe = '98', regionCo2Kwh = '39.32', regionLowCo2 = '1' WHERE region = 'europe-north1'; UPDATE instances SET regionCfe = '100', regionCo2Kwh = '2.73', regionLowCo2 = '1' WHERE region = 'europe-north2'; UPDATE instances SET regionCfe = '87', regionCo2Kwh = '89.04', regionLowCo2 = '1' WHERE region = 'europe-southwest1'; UPDATE instances SET regionCfe = '84', regionCo2Kwh = '103.37', regionLowCo2 = '1' WHERE region = 'europe-west1'; UPDATE instances SET regionCfe = '79', regionCo2Kwh = '105.94', regionLowCo2 = '1' WHERE region = 'europe-west2'; UPDATE instances SET regionCfe = '68', regionCo2Kwh = '275.82', regionLowCo2 = '0' WHERE region = 'europe-west3'; UPDATE instances SET regionCfe = '83', regionCo2Kwh = '208.81', regionLowCo2 = '1' WHERE region = 'europe-west4'; UPDATE instances SET regionCfe = '98', regionCo2Kwh = '15.05', regionLowCo2 = '1' WHERE region = 'europe-west6'; UPDATE instances SET regionCfe = '73', regionCo2Kwh = '201.69', regionLowCo2 = '0' WHERE region = 'europe-west8'; UPDATE instances SET regionCfe = '96', regionCo2Kwh = '16.30', regionLowCo2 = '1' WHERE region = 'europe-west9'; UPDATE instances SET regionCfe = '68', regionCo2Kwh = '275.82', regionLowCo2 = '0' WHERE region = 'europe-west10'; UPDATE instances SET regionCfe = '73', regionCo2Kwh = '201.69', regionLowCo2 = '0' WHERE region = 'europe-west12'; UPDATE instances SET regionCfe = '1', regionCo2Kwh = '366', regionLowCo2 = '0' WHERE region = 'me-central1'; UPDATE instances SET regionCfe = '1', regionCo2Kwh = '382.23', regionLowCo2 = '0' WHERE region = 'me-central2'; UPDATE instances SET regionCfe = '7', regionCo2Kwh = '433.75', regionLowCo2 = '0' WHERE region = 'me-west1'; UPDATE instances SET regionCfe = '99', regionCo2Kwh = '5.48', regionLowCo2 = '1' WHERE region = 'northamerica-northeast1'; UPDATE instances SET regionCfe = '84', regionCo2Kwh = '58.56', regionLowCo2 = '1' WHERE region = 'northamerica-northeast2'; UPDATE instances SET regionCfe = '19', regionCo2Kwh = '305.00', regionLowCo2 = '0' WHERE region = 'northamerica-south1'; UPDATE instances SET regionCfe = '88', regionCo2Kwh = '67.32', regionLowCo2 = '1' WHERE region = 'southamerica-east1'; UPDATE instances SET regionCfe = '92', regionCo2Kwh = '238.00', regionLowCo2 = '1' WHERE region = 'southamerica-west1'; UPDATE instances SET regionCfe = '87', regionCo2Kwh = '412.72', regionLowCo2 = '1' WHERE region = 'us-central1'; UPDATE instances SET regionCfe = '88', regionCo2Kwh = '372.23', regionLowCo2 = '1' WHERE region = 'us-central2'; UPDATE instances SET regionCfe = '31', regionCo2Kwh = '575.77', regionLowCo2 = '0' WHERE region = 'us-east1'; UPDATE instances SET regionCfe = '42', regionCo2Kwh = '340.42', regionLowCo2 = '0' WHERE region = 'us-east2'; UPDATE instances SET regionCfe = '62', regionCo2Kwh = '323.05', regionLowCo2 = '0' WHERE region = 'us-east4'; UPDATE instances SET regionCfe = '62', regionCo2Kwh = '323.05', regionLowCo2 = '0' WHERE region = 'us-east5'; UPDATE instances SET regionCfe = '94', regionCo2Kwh = '302.95', regionLowCo2 = '1' WHERE region = 'us-south1'; UPDATE instances SET regionCfe = '87', regionCo2Kwh = '79.23', regionLowCo2 = '1' WHERE region = 'us-west1'; UPDATE instances SET regionCfe = '63', regionCo2Kwh = '169.28', regionLowCo2 = '0' WHERE region = 'us-west2'; UPDATE instances SET regionCfe = '33', regionCo2Kwh = '555.17', regionLowCo2 = '0' WHERE region = 'us-west3'; UPDATE instances SET regionCfe = '64', regionCo2Kwh = '357.30', regionLowCo2 = '0' WHERE region = 'us-west4'; ================================================ FILE: regions/country.sql ================================================ /* https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 */ UPDATE instances SET regionLocationCountryCode = 'AU' WHERE regionLocationLong LIKE '%Australia%'; UPDATE instances SET regionLocationCountryCode = 'BE' WHERE regionLocationLong LIKE '%Belgium%'; UPDATE instances SET regionLocationCountryCode = 'BR' WHERE regionLocationLong LIKE '%Brazil%'; UPDATE instances SET regionLocationCountryCode = 'CA' WHERE regionLocationLong LIKE '%Canada%'; UPDATE instances SET regionLocationCountryCode = 'CH' WHERE regionLocationLong LIKE '%Switzerland%'; UPDATE instances SET regionLocationCountryCode = 'CL' WHERE regionLocationLong LIKE '%Chile%'; UPDATE instances SET regionLocationCountryCode = 'DE' WHERE regionLocationLong LIKE '%Germany%'; UPDATE instances SET regionLocationCountryCode = 'ES' WHERE regionLocationLong LIKE '%Spain%'; UPDATE instances SET regionLocationCountryCode = 'FI' WHERE regionLocationLong LIKE '%Finland%'; UPDATE instances SET regionLocationCountryCode = 'FR' WHERE regionLocationLong LIKE '%France%'; UPDATE instances SET regionLocationCountryCode = 'GB' WHERE regionLocationLong LIKE '%UK%'; UPDATE instances SET regionLocationCountryCode = 'HK' WHERE regionLocationLong LIKE '%Hong Kong%'; UPDATE instances SET regionLocationCountryCode = 'ID' WHERE regionLocationLong LIKE '%Indonesia%'; UPDATE instances SET regionLocationCountryCode = 'IL' WHERE regionLocationLong LIKE '%Israel%'; UPDATE instances SET regionLocationCountryCode = 'IN' WHERE regionLocationLong LIKE '%India%'; UPDATE instances SET regionLocationCountryCode = 'IT' WHERE regionLocationLong LIKE '%Italy%'; UPDATE instances SET regionLocationCountryCode = 'JP' WHERE regionLocationLong LIKE '%Japan%'; UPDATE instances SET regionLocationCountryCode = 'KR' WHERE regionLocationLong LIKE '%South Korea%'; UPDATE instances SET regionLocationCountryCode = 'MX' WHERE regionLocationLong LIKE '%Mexico%'; UPDATE instances SET regionLocationCountryCode = 'NL' WHERE regionLocationLong LIKE '%Netherlands%'; UPDATE instances SET regionLocationCountryCode = 'PL' WHERE regionLocationLong LIKE '%Poland%'; UPDATE instances SET regionLocationCountryCode = 'QA' WHERE regionLocationLong LIKE '%Qatar%'; UPDATE instances SET regionLocationCountryCode = 'SA' WHERE regionLocationLong LIKE '%Saudi Arabia%'; UPDATE instances SET regionLocationCountryCode = 'SE' WHERE regionLocationLong LIKE '%Sweden%'; UPDATE instances SET regionLocationCountryCode = 'SG' WHERE regionLocationLong LIKE '%Singapore%'; UPDATE instances SET regionLocationCountryCode = 'TH' WHERE regionLocationLong LIKE '%Thailand%'; UPDATE instances SET regionLocationCountryCode = 'TW' WHERE regionLocationLong LIKE '%Taiwan%'; UPDATE instances SET regionLocationCountryCode = 'US' WHERE regionLocationLong LIKE '%USA%'; UPDATE instances SET regionLocationCountryCode = 'ZA' WHERE regionLocationLong LIKE '%South Africa%'; ================================================ FILE: regions/extra.sql ================================================ /* Extra Data for Regions */ UPDATE instances SET regionLocationLong = 'Doha, Qatar', regionLat = '25.2409741', regionLng = '51.5126395' WHERE region LIKE 'me-central1'; UPDATE instances SET regionLocationLong = 'Dammam, Saudi Arabia', regionLat = '26.3622236', regionLng = '49.6807149' WHERE region LIKE 'me-central2'; UPDATE instances SET regionLocationLong = 'Tel Aviv, Israel', regionLat = '32.0858103', regionLng = '34.7697987' WHERE region LIKE 'me-west1'; UPDATE instances SET regionLocationLong = 'Bangkok, Thailand', regionLat = '13.7525', regionLng = '100.494167' WHERE region LIKE 'asia-southeast3'; /* https://www.domstol.se/mark--och-miljodomstolen-vid-nacka-tingsratt/nyheter/2021/06/mark--och-miljodomstolen-lamnar-tillstand-till-datacenter-i-horndal-avesta-kommun/ */ UPDATE instances SET regionLocationLong = 'Stockholm, Sweden', regionLat = '60.2936275', regionLng = '16.3941995' WHERE region LIKE 'europe-north2'; /* Source: On-site inspection ;) */ UPDATE instances SET regionLocationLong = 'Berlin, Germany', regionLat = '52.2630', regionLng = '13.5727' WHERE region LIKE 'europe-west10'; /* https://cloud.google.com/blog/products/infrastructure/heita-south-africa-new-cloud-region */ UPDATE instances SET regionLocationLong = 'Johannesburg, South Africa', regionLat = '-26.1714376', regionLng = '27.8841339' WHERE region LIKE 'africa-south1'; /* Source: Google Maps search 'Google Data Center' and 2021-carbon-free-energy-data-centers.pdf */ UPDATE instances SET regionLocationLong = 'St. Ghislain, Belgium', regionLat = '50.4690', regionLng = '3.8658' WHERE region LIKE 'europe-west1'; UPDATE instances SET regionLocationLong = 'Eemshaven, Netherlands', regionLat = '53.4259', regionLng = '6.8642' WHERE region LIKE 'europe-west4'; UPDATE instances SET regionLocationLong = 'Hamina, Finland', regionLat = '60.5376', regionLng = '27.1163' WHERE region LIKE 'europe-north1'; UPDATE instances SET regionLocationLong = 'The Dalles, Oregon, USA', regionLat = '45.6407', regionLng = '-121.1991' WHERE region LIKE 'us-west1'; UPDATE instances SET regionLocationLong = 'Las Vegas, Nevada, USA', regionLat = '36.0563', regionLng = '-115.0090' WHERE region LIKE 'us-west4'; UPDATE instances SET regionLocationLong = 'Council Bluffs, Iowa, USA', regionLat = '41.2210', regionLng = '-95.8639' WHERE region LIKE 'us-central1'; /* Source: https://cloud.google.com/blog/products/infrastructure/new-google-cloud-region-in-turin-italy-now-open */ UPDATE instances SET regionLocationLong = 'Turin, Italy', regionLat = '45.146729', regionLng = '7.742147' WHERE region LIKE 'europe-west12'; /* Source: https://cloud.google.com/blog/products/infrastructure/new-google-cloud-region-in-madrid-spain-now-open [...] Built in partnership with Telefónica [...] */ UPDATE instances SET regionLat = '40.5195333', regionLng = '-3.3409366' WHERE region LIKE 'europe-southwest1'; /* https://cloud.google.com/blog/products/infrastructure/expanding-cloud-infrastructure-around-the-world */ UPDATE instances SET regionLat = '20.583333', regionLng = '-100.383333', regionLocationLong = 'Querétaro, Mexico' WHERE region LIKE 'northamerica-south1'; /* https://cloud.google.com/compute/docs/regions-zones/ */ UPDATE instances SET regionLocationLong = 'Ashburn, Northern Virginia, USA' WHERE region LIKE 'us-east4'; UPDATE instances SET regionLocationLong = 'Changhua County, Taiwan, Republic of China' WHERE region LIKE 'asia-east1'; UPDATE instances SET regionLocationLong = 'Jurong West, Singapore' WHERE region LIKE 'asia-southeast1'; UPDATE instances SET regionLocationLong = 'Moncks Corner, South Carolina, USA' WHERE region LIKE 'us-east1'; UPDATE instances SET regionLocationLong = 'Montréal, Québec, Canada' WHERE region LIKE 'northamerica-northeast1'; UPDATE instances SET regionLocationLong = 'Osasco, São Paulo, Brazil' WHERE region LIKE 'southamerica-east1'; UPDATE instances SET regionLocationLong = 'Toronto, Ontario, Canada' WHERE region LIKE 'northamerica-northeast2'; /* * europe-west9 (Paris, France) is Global Switch data center in Clichy * Source: https://lafibre.info/datacenter/incendie-maitrise-globalswitch-clichy/ */ UPDATE instances SET regionLat = '48.8996', regionLng = '2.2961' WHERE region LIKE 'europe-west9'; ================================================ FILE: regions/regions.json ================================================ { "africa-south1":{ "name":"Johannesburg, South Africa", "flag": "https://upload.wikimedia.org/wikipedia/commons/a/af/Flag_of_South_Africa.svg", "latitude": 26.2056, "longitude": 28.0337 }, "asia-east1":{ "name":"Taiwan, Republic of China", "flag": "https://upload.wikimedia.org/wikipedia/commons/7/72/Flag_of_the_Republic_of_China.svg", "latitude": 23.69781, "longitude": 120.960515 }, "asia-east2":{ "name":"Hong Kong, People's Republic of China", "flag": "https://upload.wikimedia.org/wikipedia/commons/5/5b/Flag_of_Hong_Kong.svg", "latitude": 22.396428, "longitude": 114.109497 }, "asia-northeast1":{ "name":"Tokyo, Japan", "flag": "https://upload.wikimedia.org/wikipedia/en/9/9e/Flag_of_Japan.svg", "latitude": 35.6762, "longitude": 139.6503 }, "asia-northeast2":{ "name":"Osaka, Japan", "flag": "https://upload.wikimedia.org/wikipedia/en/9/9e/Flag_of_Japan.svg", "latitude": 34.6937, "longitude": 135.5023 }, "asia-northeast3":{ "name":"Seoul, South Korea", "flag": "https://upload.wikimedia.org/wikipedia/commons/0/09/Flag_of_South_Korea.svg", "latitude": 37.5665, "longitude": 126.9780 }, "asia-south1":{ "name":"Mumbai, India", "flag": "https://upload.wikimedia.org/wikipedia/en/4/41/Flag_of_India.svg", "latitude": 19.0760, "longitude": 72.8777 }, "asia-south2":{ "name":"Delhi, India", "flag": "https://upload.wikimedia.org/wikipedia/en/4/41/Flag_of_India.svg", "latitude": 28.7041, "longitude": 77.1025 }, "asia-southeast1":{ "name":"Singapore", "flag": "https://upload.wikimedia.org/wikipedia/commons/4/48/Flag_of_Singapore.svg", "latitude": 1.3521, "longitude": 103.8198 }, "asia-southeast2":{ "name":"Jakarta, Indonesia", "flag": "https://upload.wikimedia.org/wikipedia/commons/9/9f/Flag_of_Indonesia.svg", "latitude": -6.2088, "longitude": 106.8456 }, "australia-southeast1":{ "name":"Sydney, Australia", "flag": "https://upload.wikimedia.org/wikipedia/commons/8/88/Flag_of_Australia_%28converted%29.svg", "latitude": -33.8688, "longitude": 151.2093 }, "australia-southeast2":{ "name":"Melbourne, Australia", "flag": "https://upload.wikimedia.org/wikipedia/commons/8/88/Flag_of_Australia_%28converted%29.svg", "latitude": -37.8136, "longitude": 144.9631 }, "europe-central2":{ "name":"Warsaw, Poland", "flag": "https://upload.wikimedia.org/wikipedia/en/1/12/Flag_of_Poland.svg", "latitude": 52.2297, "longitude": 21.0122 }, "europe-north1":{ "name":"Hamina, Finland", "flag": "https://upload.wikimedia.org/wikipedia/commons/b/bc/Flag_of_Finland.svg", "latitude": 60.5693, "longitude": 27.1878 }, "europe-southwest1":{ "name":"Madrid, Spain", "flag": "https://upload.wikimedia.org/wikipedia/en/9/9a/Flag_of_Spain.svg", "latitude": 40.4167, "longitude": -3.7025 }, "europe-west1":{ "name":"Belgium", "flag": "https://upload.wikimedia.org/wikipedia/commons/9/92/Flag_of_Belgium_%28civil%29.svg", "latitude": 50.5039, "longitude": 4.4699 }, "europe-west2":{ "name":"London, UK", "flag": "https://upload.wikimedia.org/wikipedia/en/a/ae/Flag_of_the_United_Kingdom.svg", "latitude": 51.5074, "longitude": -0.1278 }, "europe-west3":{ "name":"Frankfurt, Germany", "flag": "https://upload.wikimedia.org/wikipedia/en/b/ba/Flag_of_Germany.svg", "latitude": 50.1109, "longitude": 8.6821 }, "europe-west4":{ "name":"Netherlands", "flag": "https://upload.wikimedia.org/wikipedia/commons/2/20/Flag_of_the_Netherlands.svg", "latitude": 52.1326, "longitude": 5.2913 }, "europe-west6":{ "name":"Zurich, Switzerland", "flag": "https://upload.wikimedia.org/wikipedia/commons/f/f3/Flag_of_Switzerland.svg", "latitude": 47.3769, "longitude": 8.5417 }, "europe-west8":{ "name":"Milan, Italy", "flag": "https://upload.wikimedia.org/wikipedia/en/0/03/Flag_of_Italy.svg", "latitude": 45.4669, "longitude": 9.19 }, "europe-west9":{ "name":"Paris, France", "flag": "https://upload.wikimedia.org/wikipedia/en/c/c3/Flag_of_France.svg", "latitude": 48.8566, "longitude": 2.3522 }, "europe-west10":{ "name":"Berlin, Germany", "flag": "https://upload.wikimedia.org/wikipedia/en/b/ba/Flag_of_Germany.svg", "latitude": 52.5200, "longitude": 13.4050 }, "europe-west12":{ "name":"Turin, Italy", "flag": "https://upload.wikimedia.org/wikipedia/en/0/03/Flag_of_Italy.svg", "latitude": 45.0703, "longitude": 7.6869 }, "me-west1":{ "name":"Tel Aviv, Israel", "flag": "https://upload.wikimedia.org/wikipedia/commons/d/d4/Flag_of_Israel.svg", "latitude": 32.0853, "longitude": 34.7818 }, "me-central1":{ "name":"Doha, Qatar", "flag": "https://upload.wikimedia.org/wikipedia/commons/6/65/Flag_of_Qatar.svg", "latitude": 25.2854, "longitude": 51.5310, "gCO2_kWh": 471 }, "me-central2":{ "name":"Dammam, Kingdom of Saudi Arabia", "flag": "https://upload.wikimedia.org/wikipedia/commons/0/0d/Flag_of_Saudi_Arabia.svg", "latitude": 26.4207, "longitude": 50.0888 }, "northamerica-northeast1":{ "name":"Montréal, Canada", "flag": "https://upload.wikimedia.org/wikipedia/commons/d/d9/Flag_of_Canada_%28Pantone%29.svg", "latitude": 45.5017, "longitude": -73.5673 }, "northamerica-northeast2":{ "name":"Toronto, Canada", "flag": "https://upload.wikimedia.org/wikipedia/commons/d/d9/Flag_of_Canada_%28Pantone%29.svg", "latitude": 43.7417, "longitude": -79.3733 }, "southamerica-east1":{ "name":"São Paulo, Brazil", "flag": "https://upload.wikimedia.org/wikipedia/en/0/05/Flag_of_Brazil.svg", "latitude": -23.5505, "longitude": -46.6333 }, "southamerica-west1":{ "name":"Santiago, Chile", "flag": "https://upload.wikimedia.org/wikipedia/commons/7/78/Flag_of_Chile.svg", "latitude": -33.45, "longitude": -70.6667 }, "us-central1":{ "name":"Iowa, USA", "flag": "https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg", "latitude": 41.8780, "longitude": -93.0977 }, "us-east1":{ "name":"South Carolina, USA", "flag": "https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg", "latitude": 33.8361, "longitude": -81.1637 }, "us-east4":{ "name":"Northern Virginia, USA", "flag": "https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg", "latitude": 38.8334, "longitude": -77.2365 }, "us-east5":{ "name":"Columbus, Ohio, USA", "flag": "https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg", "latitude": 39.9622, "longitude": -83.0006 }, "us-south1":{ "name":"Dallas, Texas, USA", "flag": "https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg", "latitude": 32.7792, "longitude": -96.8089 }, "us-west1":{ "name":"Oregon, USA", "flag": "https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg", "latitude": 43.8041, "longitude": -120.5542 }, "us-west2":{ "name":"Los Angeles, California, USA", "flag": "https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg", "latitude": 34.0522, "longitude": -118.2437 }, "us-west3":{ "name":"Salt Lake City, Utah, USA", "flag": "https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg", "latitude": 40.7608, "longitude": -111.8910 }, "us-west4":{ "name":"Las Vegas, Nevada, USA", "flag": "https://upload.wikimedia.org/wikipedia/en/a/a4/Flag_of_the_United_States.svg", "latitude": 36.1699, "longitude": -115.1398 } } ================================================ FILE: regions/regions.pl ================================================ #!/usr/bin/env perl # Copyright 2022-2025 Nils Knieling. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. use utf8; binmode(STDOUT, ':encoding(utf8)'); use strict; use JSON::XS; open(FH, "regions.json") or die "JSON file 'regions.json' can't be opened"; my $json = ""; while(){ $json .= $_; } close(FH); my $regions = JSON::XS->new->utf8->decode($json); print "/*\n"; print " * GENERATED WITH regions.pl\n"; print " * Please see: https://github.com/Cyclenerd/google-cloud-compute-machine-types/blob/master/regions/README.md\n"; print " */\n"; my @names = keys %$regions; foreach my $name (sort @names) { my $location_name = $regions->{$name}->{'name'}; $location_name =~ s/'/''/g; # Escape single quotes for SQL print "UPDATE instances SET regionLocationLong = '". $location_name ."', regionLat = '". $regions->{$name}->{'latitude'} ."', regionLng = '". $regions->{$name}->{'longitude'} ."' WHERE region = '". $name ."';\n"; } ================================================ FILE: regions/regions.sql ================================================ /* * GENERATED WITH regions.pl * Please see: https://github.com/Cyclenerd/google-cloud-compute-machine-types/blob/master/regions/README.md */ UPDATE instances SET regionLocationLong = 'Johannesburg, South Africa', regionLat = '26.2056', regionLng = '28.0337' WHERE region = 'africa-south1'; UPDATE instances SET regionLocationLong = 'Taiwan, Republic of China', regionLat = '23.69781', regionLng = '120.960515' WHERE region = 'asia-east1'; UPDATE instances SET regionLocationLong = 'Hong Kong, People''s Republic of China', regionLat = '22.396428', regionLng = '114.109497' WHERE region = 'asia-east2'; UPDATE instances SET regionLocationLong = 'Tokyo, Japan', regionLat = '35.6762', regionLng = '139.6503' WHERE region = 'asia-northeast1'; UPDATE instances SET regionLocationLong = 'Osaka, Japan', regionLat = '34.6937', regionLng = '135.5023' WHERE region = 'asia-northeast2'; UPDATE instances SET regionLocationLong = 'Seoul, South Korea', regionLat = '37.5665', regionLng = '126.978' WHERE region = 'asia-northeast3'; UPDATE instances SET regionLocationLong = 'Mumbai, India', regionLat = '19.076', regionLng = '72.8777' WHERE region = 'asia-south1'; UPDATE instances SET regionLocationLong = 'Delhi, India', regionLat = '28.7041', regionLng = '77.1025' WHERE region = 'asia-south2'; UPDATE instances SET regionLocationLong = 'Singapore', regionLat = '1.3521', regionLng = '103.8198' WHERE region = 'asia-southeast1'; UPDATE instances SET regionLocationLong = 'Jakarta, Indonesia', regionLat = '-6.2088', regionLng = '106.8456' WHERE region = 'asia-southeast2'; UPDATE instances SET regionLocationLong = 'Sydney, Australia', regionLat = '-33.8688', regionLng = '151.2093' WHERE region = 'australia-southeast1'; UPDATE instances SET regionLocationLong = 'Melbourne, Australia', regionLat = '-37.8136', regionLng = '144.9631' WHERE region = 'australia-southeast2'; UPDATE instances SET regionLocationLong = 'Warsaw, Poland', regionLat = '52.2297', regionLng = '21.0122' WHERE region = 'europe-central2'; UPDATE instances SET regionLocationLong = 'Hamina, Finland', regionLat = '60.5693', regionLng = '27.1878' WHERE region = 'europe-north1'; UPDATE instances SET regionLocationLong = 'Madrid, Spain', regionLat = '40.4167', regionLng = '-3.7025' WHERE region = 'europe-southwest1'; UPDATE instances SET regionLocationLong = 'Belgium', regionLat = '50.5039', regionLng = '4.4699' WHERE region = 'europe-west1'; UPDATE instances SET regionLocationLong = 'Berlin, Germany', regionLat = '52.52', regionLng = '13.405' WHERE region = 'europe-west10'; UPDATE instances SET regionLocationLong = 'Turin, Italy', regionLat = '45.0703', regionLng = '7.6869' WHERE region = 'europe-west12'; UPDATE instances SET regionLocationLong = 'London, UK', regionLat = '51.5074', regionLng = '-0.1278' WHERE region = 'europe-west2'; UPDATE instances SET regionLocationLong = 'Frankfurt, Germany', regionLat = '50.1109', regionLng = '8.6821' WHERE region = 'europe-west3'; UPDATE instances SET regionLocationLong = 'Netherlands', regionLat = '52.1326', regionLng = '5.2913' WHERE region = 'europe-west4'; UPDATE instances SET regionLocationLong = 'Zurich, Switzerland', regionLat = '47.3769', regionLng = '8.5417' WHERE region = 'europe-west6'; UPDATE instances SET regionLocationLong = 'Milan, Italy', regionLat = '45.4669', regionLng = '9.19' WHERE region = 'europe-west8'; UPDATE instances SET regionLocationLong = 'Paris, France', regionLat = '48.8566', regionLng = '2.3522' WHERE region = 'europe-west9'; UPDATE instances SET regionLocationLong = 'Doha, Qatar', regionLat = '25.2854', regionLng = '51.531' WHERE region = 'me-central1'; UPDATE instances SET regionLocationLong = 'Dammam, Kingdom of Saudi Arabia', regionLat = '26.4207', regionLng = '50.0888' WHERE region = 'me-central2'; UPDATE instances SET regionLocationLong = 'Tel Aviv, Israel', regionLat = '32.0853', regionLng = '34.7818' WHERE region = 'me-west1'; UPDATE instances SET regionLocationLong = 'Montréal, Canada', regionLat = '45.5017', regionLng = '-73.5673' WHERE region = 'northamerica-northeast1'; UPDATE instances SET regionLocationLong = 'Toronto, Canada', regionLat = '43.7417', regionLng = '-79.3733' WHERE region = 'northamerica-northeast2'; UPDATE instances SET regionLocationLong = 'São Paulo, Brazil', regionLat = '-23.5505', regionLng = '-46.6333' WHERE region = 'southamerica-east1'; UPDATE instances SET regionLocationLong = 'Santiago, Chile', regionLat = '-33.45', regionLng = '-70.6667' WHERE region = 'southamerica-west1'; UPDATE instances SET regionLocationLong = 'Iowa, USA', regionLat = '41.878', regionLng = '-93.0977' WHERE region = 'us-central1'; UPDATE instances SET regionLocationLong = 'South Carolina, USA', regionLat = '33.8361', regionLng = '-81.1637' WHERE region = 'us-east1'; UPDATE instances SET regionLocationLong = 'Northern Virginia, USA', regionLat = '38.8334', regionLng = '-77.2365' WHERE region = 'us-east4'; UPDATE instances SET regionLocationLong = 'Columbus, Ohio, USA', regionLat = '39.9622', regionLng = '-83.0006' WHERE region = 'us-east5'; UPDATE instances SET regionLocationLong = 'Dallas, Texas, USA', regionLat = '32.7792', regionLng = '-96.8089' WHERE region = 'us-south1'; UPDATE instances SET regionLocationLong = 'Oregon, USA', regionLat = '43.8041', regionLng = '-120.5542' WHERE region = 'us-west1'; UPDATE instances SET regionLocationLong = 'Los Angeles, California, USA', regionLat = '34.0522', regionLng = '-118.2437' WHERE region = 'us-west2'; UPDATE instances SET regionLocationLong = 'Salt Lake City, Utah, USA', regionLat = '40.7608', regionLng = '-111.891' WHERE region = 'us-west3'; UPDATE instances SET regionLocationLong = 'Las Vegas, Nevada, USA', regionLat = '36.1699', regionLng = '-115.1398' WHERE region = 'us-west4';