# server

> Server types.

Primary key: `vendor_id`, `server_id`. See the [version history of this table on dbdocs.io](https://dbdocs.io/spare-cores/sc-crawler?table=server&schema=public&view=table_structure).

## Columns

| Column | Type | Constraints | References | Description |
| --- | --- | --- | --- | --- |
| `vendor_id` | `VARCHAR(255)` | PK | [`vendor.vendor_id`](https://docs.sparecores.com/schemas/tables/vendor.md) | Reference to the Vendor. |
| `server_id` | `VARCHAR(255)` | PK |  | Unique identifier, as called at the Vendor. |
| `name` | `VARCHAR(255)` | NOT NULL |  | Human-friendly name. |
| `api_reference` | `VARCHAR(255)` | NOT NULL |  | How this resource is referenced in the vendor API calls. This is usually either the id or name of the resource, depending on the vendor and actual API endpoint. |
| `api_reference_object` | `JSON` |  |  | How this resource is referenced in the vendor API calls, including the parameter name(s). |
| `display_name` | `VARCHAR(255)` | NOT NULL |  | Human-friendly reference (usually the id or name) of the resource. |
| `description` | `VARCHAR(255)` | NOT NULL |  | Short description. |
| `family` | `VARCHAR(255)` |  |  | Broad workload class of the server in the vendor''s own naming, e.g. General Purpose, Compute Optimized or Memory Optimized. |
| `series` | `VARCHAR(255)` |  |  | Hardware line and generation of the server, e.g. m5 (AWS), n2 (GCP) or b3 (OVH). |
| `vcpus` | `INTEGER` | NOT NULL |  | Default number of virtual CPUs (vCPU) of the server. |
| `hypervisor` | `VARCHAR(255)` |  |  | Hypervisor of the virtual server, e.g. Xen, KVM, Nitro or Dedicated. |
| `cpu_allocation` | `ENUM` | NOT NULL |  | Allocation of CPU(s) to the server, e.g. shared, burstable or dedicated. See [CpuAllocation](#cpuallocation) for the possible values. |
| `cpu_cores` | `INTEGER` |  |  | Default number of CPU cores of the server. Equals to vCPUs when HyperThreading is disabled. |
| `cpu_speed` | `FLOAT` |  |  | Vendor-reported maximum CPU clock speed (GHz). |
| `cpu_architecture` | `ENUM` | NOT NULL |  | CPU architecture (arm64, arm64_mac, i386, or x86_64). See [CpuArchitecture](#cpuarchitecture) for the possible values. |
| `cpu_manufacturer` | `VARCHAR(255)` |  |  | The manufacturer of the primary processor, e.g. Intel or AMD. |
| `cpu_family` | `VARCHAR(255)` |  |  | The product line/family of the primary processor, e.g. Xeon, Core i7, Ryzen 9. |
| `cpu_model` | `VARCHAR(255)` |  |  | The model number of the primary processor, e.g. 9750H. |
| `cpu_l1d_cache` | `INTEGER` |  |  | L1 data cache size (KiB). |
| `cpu_l1d_cache_total` | `INTEGER` |  |  | Total L1 data cache size (KiB) across all cores. |
| `cpu_l1i_cache` | `INTEGER` |  |  | L1 instruction cache size (KiB). |
| `cpu_l1i_cache_total` | `INTEGER` |  |  | Total L1 instruction cache size (KiB) across all cores. |
| `cpu_l2_cache` | `INTEGER` |  |  | L2 cache size (KiB). |
| `cpu_l2_cache_total` | `INTEGER` |  |  | Total L2 cache size (KiB) across all cores. |
| `cpu_l3_cache` | `INTEGER` |  |  | L3 cache size (KiB). |
| `cpu_l3_cache_total` | `INTEGER` |  |  | Total L3 cache size (KiB) across all cores. |
| `cpu_flags` | `JSON` | NOT NULL |  | CPU features/flags. |
| `cpus` | `JSON` | NOT NULL |  | JSON array of known CPU details, e.g. the manufacturer, family, model; L1/L2/L3 cache size; microcode version; feature flags; bugs etc. |
| `ecpus` | `FLOAT` |  |  | The effective "real-world" core count, calculated by dividing the maximum multi-core SCore by the single-core SCore. |
| `scalability` | `FLOAT` |  |  | Measures how efficiently the server scales from a single core performance to using multiple cores. A score of 100%% means perfect linear scaling with zero performance loss. |
| `hw_virt` | `BOOL` |  |  | If hardware virtualization (e.g. KVM) is supported. |
| `memory_amount` | `INTEGER` | NOT NULL |  | RAM amount (MiB) reported by the vendor. |
| `memory_amount_actual` | `INTEGER` |  |  | Actual RAM amount (MiB) measured on the instance via lstopo or other tool. This amount might not match the vendor-reported memory due to the BIOS or the hypervisor reserving a small percentage. |
| `memory_generation` | `ENUM` |  |  | Generation of the DDR SDRAM, e.g. DDR4 or DDR5. See [DdrGeneration](#ddrgeneration) for the possible values. |
| `memory_speed` | `INTEGER` |  |  | DDR SDRAM clock rate (Mhz). |
| `memory_ecc` | `BOOL` |  |  | If the DDR SDRAM uses error correction code to detect and correct n-bit data corruption. |
| `accelerator_count` | `FLOAT` | NOT NULL |  | Number of accelerator(s), e.g. GPUs or NPUs. |
| `accelerator_memory_min` | `INTEGER` |  |  | Memory (MiB) allocated to the lowest-end accelerator. |
| `accelerator_memory_total` | `INTEGER` |  |  | Overall memory (MiB) allocated to all the accelerator(s). |
| `accelerator_type` | `ENUM` |  |  | The type of the primary accelerator, e.g. GPU or NPU. See [AcceleratorType](#acceleratortype) for the possible values. |
| `accelerator_manufacturer` | `VARCHAR(255)` |  |  | The manufacturer of the primary accelerator, e.g. Nvidia or AMD. |
| `accelerator_family` | `VARCHAR(255)` |  |  | The product family of the primary accelerator, e.g. Turing. |
| `accelerator_model` | `VARCHAR(255)` |  |  | The model number of the primary accelerator, e.g. Tesla T4. |
| `accelerators` | `JSON` | NOT NULL |  | JSON array of accelerator details, including the manufacturer, name, and memory (MiB) of each accelerator. |
| `storage_size` | `INTEGER` | NOT NULL |  | Overall size (GB) of the disk(s). |
| `storage_type` | `ENUM` |  |  | Primary disk type, e.g. HDD, SSD, or NVMe SSD. See [StorageType](#storagetype) for the possible values. |
| `storages` | `JSON` | NOT NULL |  | JSON array of disks attached to the server, including the size (GB) and type of each disk. |
| `storage_read_iops_max` | `INTEGER` |  |  | The vendor-published maximum read IOPS of the bundled disk(s), summed over all disks, also of different types (e.g. temp disk and NVMe), so a theoretical total. Per-disk values are in storages. |
| `storage_write_iops_max` | `INTEGER` |  |  | The vendor-published maximum write IOPS of the bundled disk(s), summed over all disks, also of different types (e.g. temp disk and NVMe), so a theoretical total. Per-disk values are in storages. |
| `storage_read_throughput_max` | `INTEGER` |  |  | The vendor-published maximum read throughput (MB/s) of the bundled disk(s), summed over all disks, also of different types (e.g. temp disk and NVMe), so a theoretical total. Per-disk values are in storages. |
| `storage_write_throughput_max` | `INTEGER` |  |  | The vendor-published maximum write throughput (MB/s) of the bundled disk(s), summed over all disks, also of different types (e.g. temp disk and NVMe), so a theoretical total. Per-disk values are in storages. |
| `compatible_storage_ids` | `JSON` |  |  | List of storage_ids that can be attached to the server as extra storage. |
| `network_speed_baseline` | `FLOAT` |  |  | The baseline network performance (Gbps) of the server, aggregated over all network cards. |
| `network_speed_max` | `FLOAT` |  |  | The maximum network performance (Gbps) of the server, aggregated over all network cards. |
| `network_storage_speed_baseline` | `FLOAT` |  |  | The baseline bandwidth performance of network-attached storage (Gbps). |
| `network_storage_speed_max` | `FLOAT` |  |  | The maximum bandwidth performance of network-attached storage (Gbps). |
| `inbound_traffic` | `FLOAT` | NOT NULL |  | Amount of complimentary inbound traffic (GB) per month. |
| `outbound_traffic` | `FLOAT` | NOT NULL |  | Amount of complimentary outbound traffic (GB) per month. |
| `ipv4` | `INTEGER` | NOT NULL |  | Number of complimentary IPv4 address(es). |
| `average_time_to_start` | `FLOAT` |  |  | Average time to start the server (seconds). |
| `retirement_date` | `DATE` |  |  | Retirement date announced by the vendor for PLANNED_FOR_RETIREMENT and RETIRED records: the end of support (shutdown) if published, otherwise the end of sale. Empty when not announced or not known. |
| `status` | `ENUM` | NOT NULL |  | Status of the resource (active or inactive). See [Status](#status) for the possible values. |
| `observed_at` | `DATETIME` | NOT NULL |  | Timestamp of the last observation. |

## Foreign keys

- `vendor_id` → [`vendor`](https://docs.sparecores.com/schemas/tables/vendor.md) (`vendor_id`)

## Enums

### CpuAllocation

CPU allocation methods at cloud vendors.

| Value | Description |
| --- | --- |
| `SHARED` | Shared CPU with other virtual server tenants. |
| `BURSTABLE` | CPU that can temporarily burst above its baseline performance. |
| `DEDICATED` | Dedicated CPU with known performance. |

### CpuArchitecture

CPU architectures.

| Value | Description |
| --- | --- |
| `ARM64` | 64-bit ARM architecture. |
| `ARM64_MAC` | Apple 64-bit ARM architecture. |
| `I386` | 32-bit x86 architecture. |
| `X86_64` | 64-bit x86 architecture. |
| `X86_64_MAC` | Apple 64-bit x86 architecture. |

### DdrGeneration

Generation of the DDR SDRAM.

| Value | Description |
| --- | --- |
| `DDR3` | DDR3 SDRAM. |
| `DDR4` | DDR4 SDRAM. |
| `DDR5` | DDR5 SDRAM. |

### AcceleratorType

Type of a hardware accelerator, e.g. GPU or NPU.

| Value | Description |
| --- | --- |
| `GPU` | Graphics Processing Unit. |
| `TPU` | Tensor Processing Unit. Deprecated: Google TPUs are stored as NPU. |
| `NPU` | Neural Processing Unit, e.g. Google TPU, AWS Inferentia and Trainium, Habana Gaudi or Qualcomm AI100. |
| `FPGA` | Field-Programmable Gate Array, e.g. Xilinx Virtex UltraScale+. |
| `VPU` | Video Processing Unit: video transcoding card, e.g. Xilinx U30. |

### StorageType

Type of a storage, e.g. HDD or SSD.

| Value | Description |
| --- | --- |
| `HDD` | Magnetic hard disk drive. |
| `SSD` | Solid-state drive. |
| `NVME_SSD` | NVMe based solid-state drive. |

### Status

Last known status of a record.

The docstrings of the values are shown to end-users (e.g. in the API and
on the website), so keep those to what a status means, and document here
how the statuses are set:

- `ACTIVE` and `INACTIVE` are valid for all tables. Records returned by
  the vendor or defined in code are `ACTIVE`. Records no longer returned
  or defined are set to `INACTIVE` by `pull`, as well as records missing
  from the source by `sync`.
- `PLANNED_FOR_RETIREMENT` and `RETIRED` are only valid for Server and
  Database, and are set only from explicit vendor signals. These are kept
  by `pull` when the record is no longer returned by the vendor.
- `ARCHIVED` is valid for all tables. It is set only from the
  [archive rules][sc_crawler.archive_rules] by `pull` and `sync`, also for
  child records (e.g. prices of a region), and archived records are not
  updated afterwards. It is our decision on the identity of a record,
  never a vendor signal: end of sale is `RETIRED`, and records no longer
  returned by a vendor are `INACTIVE`.

| Value | Description |
| --- | --- |
| `ACTIVE` | Currently available. |
| `INACTIVE` | Currently not available, without a known retirement. May become available again. |
| `PLANNED_FOR_RETIREMENT` | Retirement was announced by the vendor, but can still be ordered. Only used for servers and databases. |
| `RETIRED` | Retired by the vendor and cannot be ordered anymore, but prices may still exist (e.g. for active multi-year contracts). Only used for servers and databases. |
| `ARCHIVED` | Kept only for historical reference: replaced by another record (e.g. renamed, merged or split) or dropped from the dataset. |

## Referenced by

- [`server_description`](https://docs.sparecores.com/schemas/tables/server_description.md)
- [`server_price`](https://docs.sparecores.com/schemas/tables/server_price.md)
