컴퓨터는 입력을 받아 중앙처리장치(메모리)에서 지정된 작업을 처리하여 결과값을 출력하는 기계장치다. 이러한 간단한 아이디어를 오랜동안 진화시켜 지금의 모습이 되었다.
위키백과 사전 List of computer hardware manufacturers
library(tidyverse)
library(reactable)
<- readxl::read_excel("data/deep-learning-server.xlsx", sheet = "amd_intel")
intel_amd
%>%
intel_amd ::clean_names() %>%
janitorarrange(desc(year)) %>%
::reactable(
reactablecolumns = list(
year = colDef(width = 80),
notes = colDef(width = 300)
))
library(tidyverse)
library(readxl)
library(rvest)
<- read_excel("data/deep-learning-server.xlsx", sheet = "GPU")
gpu_raw
<- "https://memory.net/memory-prices/"
memory_url
<- read_html(memory_url) %>%
memory_raw html_element(css = "#table_1") %>%
html_table(fill = TRUE)
<- memory_raw %>%
memory_tbl ::clean_names() %>%
janitormutate(price = parse_number(price),
capacity = parse_number(capacity))
%>%
memory_tbl write_rds("data/memory_tbl_20220705.rds")
<- c(4, 8, 16, 32, 64, 128, 256) * 10^9
gb_units
%>%
memory_tbl mutate(gb_price = price / capacity) %>%
mutate(capacity_gb = capacity * 10^9) %>%
ggplot(aes(x = capacity_gb, y = gb_price)) +
geom_jitter() +
geom_smooth(se=FALSE) +
geom_vline(xintercept = gb_units, linetype = 2) +
scale_x_continuous(labels = scales::label_bytes("GB", accuracy = 0)) +
theme_light() +
labs(title = "DRAM 가격",
subtitle = "달러($)/GigaByte",
x = "용량(기가바이트, GB)",
y = "달러($)")
<- read_lines("data/CPU_raw.txt")
single_cpu_raw <- read_lines("data/CPU_multicore.txt")
multiple_cpu_raw
<- function(raw_data, field = 1) {
get_field %>%
raw_data as_tibble() %>%
filter(row_number() %% 5 == field)
}
<- tibble(cpu = get_field(single_cpu_raw, 1) %>% unlist,
single_cpu_tbl cpu_value = get_field(single_cpu_raw, 2) %>% unlist,
cpu_index = get_field(single_cpu_raw, 3) %>% unlist,
cpu_mark = get_field(single_cpu_raw, 4) %>% unlist,
cpu_price = get_field(single_cpu_raw, 0) %>% unlist)
<- tibble(cpu = get_field(multiple_cpu_raw, 1) %>% unlist,
multiple_cpu_tbl cpu_value = get_field(multiple_cpu_raw, 2) %>% unlist,
cpu_index = get_field(multiple_cpu_raw, 3) %>% unlist,
cpu_mark = get_field(multiple_cpu_raw, 4) %>% unlist,
cpu_price = get_field(multiple_cpu_raw, 0) %>% unlist)
<- single_cpu_tbl %>%
cpu_tbl mutate(type = "Single") %>%
bind_rows(multiple_cpu_tbl %>% mutate(type = "Mulitple")) %>%
select(type, everything()) %>%
slice(2:n()) %>%
set_names(c("type", "spec", "value", "index", "cpu_mark", "price")) %>%
mutate(across(value:price, parse_number))
%>%
cpu_tbl ggplot(aes( x = cpu_mark, y = price, color = type)) +
geom_point() +
facet_wrap(~type, scales = "free") +
theme(legend.position = "none") +
geom_smooth(se = FALSE) +
theme_light() +
labs(title = "CPU 가격",
x = "CPU 성능 벤치마크",
y = "달러($)") +
theme(legend.position = "none") +
scale_x_continuous(labels = scales::comma) +
scale_y_continuous(labels = scales::comma)
<- "https://diskprices.com/?locale=us&condition=new&disk_types=external_ssd,internal_ssd,m2_ssd,m2_nvme,u2"
ssd_url
<- read_html(ssd_url) %>%
ssd_raw html_element(css = "#diskprices") %>%
html_table(fill = TRUE)
<- ssd_raw %>%
ssd_tbl ::clean_names() %>%
janitorfilter(condition == "New",
!str_detect(capacity, "x[\\d+]"),
str_detect(capacity, "TB")) %>%
mutate(price = parse_number(price),
price_per_tb = parse_number(price_per_tb),
capacity = parse_number(capacity)) %>%
mutate(name = str_to_lower(name)) %>%
mutate(supplier = case_when(str_detect(name, "samsung") ~ "Samsung",
str_detect(name, "hynix") ~ "SK Hynix",
str_detect(name, "^WD|^westrn") ~ "Western Digital",
str_detect(name, "seagate") ~ "Seagate",
str_detect(name, "micron") ~ "Micron",
str_detect(name, "intel") ~ "Intel",
str_detect(name, "toshiba") ~ "Toshiba",
TRUE ~ "ETC"))
%>%
ssd_tbl # count(technology, sort = T)
filter(supplier != "ETC",
%in% c("NVMe", "SSD", "HDD")) %>%
technology mutate(capacity_tb = capacity * 10^12) %>%
ggplot(aes(x = capacity, y = price_per_tb, color = supplier)) +
geom_point() +
geom_smooth(se = FALSE) +
theme(legend.position = "none") +
theme_light() +
labs(title = "SSD 가격",
x = "SSD 용량 (TB)",
y = "달러($)") +
theme(legend.position = "none") +
facet_wrap(~technology)
<- read_excel("data/deep-learning-server.xlsx", sheet = "server")
dl_svr
%>%
dl_svr filter(! is.na(품명)) %>%
ggplot(aes(x = fct_reorder(품명, 비율), y=비율, fill = 품명)) +
geom_col(width = 0.5) +
coord_flip() +
theme(legend.position = "none") +
theme_light() +
labs(title = "딥러닝 워크스테이션 원가비중",
x = "",
y = "비중 (부품가/총비용)") +
theme(legend.position = "none") +
scale_y_continuous(labels = scales::percent, limits = c(0, 0.5)) +
geom_text(aes(label = scales::percent(비율, accuracy = 0.1)), size = 4, hjust = -0.1 )
library(reactable)
%>%
dl_svr filter(! is.na(품명)) %>%
select(-순) %>%
::reactable(
reactablestriped = TRUE,
highlight = TRUE,
bordered = TRUE,
showPageSizeOptions = TRUE,
groupBy = c("구분"),
columns = list(
= colDef(width = 80),
품명 = colDef(width = 350),
제품사양 = colDef(width = 50),
수량 = colDef(aggregate = "sum",
가격 format = colFormat(separators =TRUE)),
= colDef(format = colFormat(separators =TRUE)),
단가 = colDef(width = 70, format = colFormat(percent = TRUE, digits = 1)),
비율 = colDef(width = 70, format = colFormat(percent = TRUE, digits = 1))
누적비율 ))