# Compute Engine的主機類型選擇

Google Compute Engine提供許多主機類型可以選擇，主要以三大類為主：

* Standard主機：Standard類型主機主要以1 Core CPU搭配3.75G記憶體的方式倍增，提供基本的主機運算資源選擇。
* High CPU主機：High CPU主機主要將Standard類型之主機CPU倍增，讓需要較高CPU資源之服務可以直接選用。
* High Memory主機：High Memory主機主要將Standard類型之主機Memory倍增，讓需要較高Memory資源之服務可以直接選用。

註：以上，不論是哪種類型的主機，基本上在同一資料中心的硬體規格均是相同，僅是CPU與記憶體數量的差別。

## 查詢主機型號

如果想要知道目前GCP上提供哪些型號的主機服務，可以透過gcloud指令作查詢：

```
$ gcloud compute machine-types list
NAME            ZONE               CPUS  MEMORY_GB  DEPRECATED
f1-micro        asia-east1-c       1     0.60
g1-small        asia-east1-c       1     1.70
n1-highcpu-16   asia-east1-c       16    14.40
n1-highcpu-2    asia-east1-c       2     1.80
n1-highcpu-32   asia-east1-c       32    28.80
n1-highcpu-4    asia-east1-c       4     3.60
n1-highcpu-8    asia-east1-c       8     7.20
n1-highmem-16   asia-east1-c       16    104.00
n1-highmem-2    asia-east1-c       2     13.00
n1-highmem-32   asia-east1-c       32    208.00
n1-highmem-4    asia-east1-c       4     26.00
n1-highmem-8    asia-east1-c       8     52.00
...(skip)
```

查詢的結果將會完整的顯示型號與該型號對應的CPU與記憶體數量，供您挑選一個適合您的機型。

## 彈性主機規格

GCP除了提供標準類型機器之外，另外也提供彈性的主機規格供使用者自行設定CPU與希望搭配的記憶體大小....

![Custom Machine Type](/files/-LAi6voHBWDeJBnMYPgv)

彈性的主機類型選擇，在考慮服務資源調整時候，可以更節省資源的成本，達到節費的效果喔！


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gdgcloud-taipei.gitbook.io/google-cloud-platform-in-practice/google-cloud-shang-de-yun-suan-fu-wu/compute-engine/compute-engine-de-zhu-ji-lei-xing-xuan-ze.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
