์๋ ํ์ธ์,
ํ๋์จ์ด์ ์ํํธ์จ์ด:
์๋ฒ : Dell R930 4-Intel Xeon E7-8870 v3 2.1GHz, 45M ์บ์, 9.6GT/s QPI, ํฐ๋ณด, HT, 18C/36T ๋ฐ 1TB RAM
์ด์ ์ฒด์ : ๋ ๋ํ 7.1
R ๋ฒ์ : 3.3.2
data.table ๋ฒ์ : 1.10.5 ๋น๋ 2017-03-21
csv ํ์ผ(44GB, 872505ํ x 12785์ด)์ ๋ก๋ ์ค์ ๋๋ค. 144๊ฐ์ ์ฝ์ด๋ฅผ ์ฌ์ฉํ์ฌ 1.30๋ถ ๋ง์ ๋งค์ฐ ๋น ๋ฅด๊ฒ ๋ก๋๋ฉ๋๋ค(ํ์ดํผ์ค๋ ๋ฉ์ด ํ์ฑํ๋ 4๊ฐ์ ํ๋ก์ธ์์์ 72๊ฐ์ ์ฝ์ด๋ฅผ ์ฌ์ฉํ์ฌ 144๊ฐ์ ์ฝ์ด ์์๋ก ๋ง๋ค ์ ์์).
์ฃผ์ ๋ฌธ์ ๋ DT๊ฐ ๋ก๋๋ ๋ csv ํ์ผ์ ํฌ๊ธฐ์ ๊ด๋ จํ์ฌ ์ฌ์ฉ ์ค์ธ ๋ฉ๋ชจ๋ฆฌ ์์ด ํฌ๊ฒ ์ฆ๊ฐํ๋ค๋ ๊ฒ์ ๋๋ค. ์ด ๊ฒฝ์ฐ 44GB csv(fwrite๋ก ์ ์ฅ, saveRDS๋ก ์ ์ฅ ๋ฐ compress=FALSE๋ก 84GB ํ์ผ ์์ฑ)๋ ~ 356GB RAM์ ์ฌ์ฉํ๊ณ ์์ต๋๋ค.
๋ค์์ "verbose=TRUE"๋ฅผ ์ฌ์ฉํ ์ถ๋ ฅ์
๋๋ค.
_12785๊ฐ์ ์ด ์ฌ๋กฏ ํ ๋น(12785 - 0 ์ญ์ )
๋งค๋๋น์ค ์ํ์
: ok
1440๊ฐ์ ์ ํ ํฌ์ธํธ์ 144๊ฐ์ ์ค๋ ๋๋ก ๋ฐ์ดํฐ ์ฝ๊ธฐ
858881๊ฐ์ ์์ ํ ์ค 95.7% ์ฝ๊ธฐ
1๋ถ 33.736์ด์ ๋ฒฝ์๊ณ ์๊ฐ์ 43.772GB ํ์ผ์์ 872505ํ x 12785์ด ์ฝ๊ธฐ(์คํ ์ค์ธ ๋ค๋ฅธ ์ฑ์ ์ํฅ)
0.000์ด ( 0%) ๋ฉ๋ชจ๋ฆฌ ๋งต
0.070s( 0%) sep, ncol ๋ฐ ํค๋ ๊ฐ์ง
26.227s ( 28%) 1440 ์ ํ ํฌ์ธํธ์์ 34832 ์ํ ํ์ ์ฌ์ฉํ ์ด ์ ํ ๊ฐ์ง
0.614์ด(1%) RAM์ 3683116ํ x 12785์ด(350.838GB) ํ ๋น
0.000์ด( 0%) ๋งค๋๋ฐ์ด์ค ์์ฐจ
66.825์ด ( 71%) ๋ฐ์ดํฐ ์ฝ๊ธฐ
์ด 93.736์ด_
๋ณ๋ ฌ ํจํค์ง๋ก ์์ ํ ๋ ๋๋๋ก ๋ฐ์ํ๋ ์ ์ฌํ ๋ฌธ์ ๋ฅผ ๋ณด์ฌ์ฃผ๊ณ ์์ต๋๋ค. ์ฌ๊ธฐ์ "mclappy"์ ๊ฐ์ ๊ธฐ๋ฅ์ ์ฌ์ฉํ ๋ ์ฝ์ด๋น ํ๋์ ์ธ์ ์ด ์์๋ฉ๋๋ค. ์ด ์คํฌ๋ฆฐ์ท์ ์์ฑ/๋์ด๋ Rsessions๋ฅผ ์ฐธ์กฐํ์ญ์์ค.
"rm(DT)"๋ฅผ ์ํํ๋ฉด RAM์ด ์ด๊ธฐ ์ํ๋ก ๋์๊ฐ๊ณ "Rsessions"๊ฐ ์ ๊ฑฐ๋ฉ๋๋ค.
์ด๋ฏธ "setDTthreads(20)"๋ฅผ ์๋ํ์ง๋ง ์ฌ์ ํ ๋์ผํ ์์ RAM์ ์ฌ์ฉํ๊ณ ์์ต๋๋ค.
๊ทธ๊ฑด ๊ทธ๋ ๊ณ , ํ์ผ์ด "fread"์ ๋น๋ณ๋ ฌ ๋ฒ์ ์ผ๋ก ๋ก๋๋๋ฉด ๋ฉ๋ชจ๋ฆฌ ํ ๋น์ ์ต๋ 106GB๊น์ง๋ง ์ป์ ์ ์์ต๋๋ค.
๊ธฐ์๋ฅด๋ชจ
์ด๊ฒ์ ๋ณ๋ ฌ์ด ์๋ fread ๊ตฌํ์ ์ถ๋ ฅ์ ๋๋ค(data.table 1.10.5 IN DEVELOPMENT ๊ตฌ์ถ 2017-02-09).
๊ทธ๋ฆฌ๊ณ ์ฌ์ฉ๋ ๋ฉ๋ชจ๋ฆฌ ์์ ๋ค์ ํ์ธํ๋๋ฐ ์ต๋ 84GB๊น์ง ์ฌ๋ผ๊ฐ๋๋ค.
๊ธฐ์๋ฅด๋ชจ
๋ค ๋ง์ด ๋ง์. ํ๋ฅญํ ๋ณด๊ณ ์์ ๊ฐ์ฌ๋๋ฆฝ๋๋ค. ์ถ์ ๋ nrow๋ ๋๋ต ๋ง๋ ๊ฒ์ฒ๋ผ ๋ณด์ด์ง๋ง(858,881 ๋ 872,505) ํ ๋น์ ๊ทธ๋ณด๋ค 4.2๋ฐฐ ๋ ํฌ๊ณ (3,683,116) ํจ์ฌ ๋ ๋ง์ต๋๋ค. ๊ณ์ฐ์ ๊ฐ์ ํ๊ณ ์์ธํ ์ถ๋ ฅ์ ์์ธํ ๋ด์ฉ์ ์ถ๊ฐํ์ต๋๋ค. ๋ช ๊ฐ์ง ์์ ์ด ๋ ์๋ฃ๋ ๋๊น์ง ์ง๊ธ์ ์ฌํ ์คํธ๋ฅผ ๋ณด๋ฅํ์ญ์์ค.
๋ค์ ํ ์คํธํ์ญ์์ค. ์ง๊ธ ์์ ํด์ผ ํฉ๋๋ค.
๋ฐฉ๊ธ data.table dev๋ฅผ ์ค์นํ์ต๋๋ค.
data.table 1.10.5 IN DEVELOPMENT ๊ตฌ์ถ 2017-03-27 02:50:31 UTC
๋์ผํ 44GB ํ์ผ์ ์ฝ์ผ๋ ค๊ณ ํ ๋ ๊ฐ์ฅ ๋จผ์ ๋ฐ์ ๋ฉ์์ง๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค.
DT <- fread('dt.daily.4km.csv')
์ค๋ฅ: protect(): ๋ณดํธ ์คํ ์ค๋ฒํ๋ก
๊ทธ๋ฐ ๋ค์ ๋์ผํ ๋ช ๋ น์ ๋ค์ ์คํํ๊ณ ์ ๋๋ก ์๋ํ๊ธฐ ์์ํ์ต๋๋ค. ๊ทธ๋ฌ๋ ์ด ๋ฒ์ ์ ๋ฉํฐ์ฝ์ด ๋ชจ๋๋ฅผ ์ฌ์ฉํ์ง ์์ต๋๋ค. fread ๋ณ๋ ฌ ๋ฒ์ ์ ๋ฃ๊ธฐ ์ ๊ณผ ๋ง์ฐฌ๊ฐ์ง๋ก ๋ก๋ํ๋ ๋ฐ ~ 25๋ถ์ด ๊ฑธ๋ฆฝ๋๋ค.
๊ธฐ์๋ฅด๋ชจ
๋ชจ๋ r-์ธ์ ์ ๋ซ๊ณ ํ ์คํธ๋ฅผ ๋ค์ ์คํํ๋๋ฐ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค.
์ถ์ธก๋ ์ด ์ ํ์ 508๊ฐ ์ด์ 34711745๊ฐ ๊ฐ์ ์ถฉ๋ถํ์ง ์์ต๋๋ค. colClasses๋ฅผ ์ฌ์ฉํ์ฌ ์ด๋ฌํ ์ด ํด๋์ค๋ฅผ ์๋์ผ๋ก ์ค์ ํ์ญ์์ค.
์๋๋ฅผ ์ฐธ์กฐํ์ญ์์ค. "์ ์๋ฅผ ์ถ์ธกํ์ง๋ง <<0....>>์ด(๊ฐ) ํฌํจ๋์ด ์๋ค๋ ๋ช ๊ฐ์ง ๋ฉ์์ง๊ฐ ๋ํ๋ฉ๋๋ค.
_๋ฒฝ์๊ณ ์๊ฐ 15:27.024์ 43.772GB ํ์ผ์์ 872505ํ x 12785์ด ์ฝ๊ธฐ(์ ํด ์ํ์ธ ๊ฒ์ฒ๋ผ ๋ณด์ด๋๋ผ๋ ์ด๋ ค ์๋ ๋ค๋ฅธ ์ฑ์ ์ํด ์๋๊ฐ ๋๋ ค์ง ์ ์์)
171์ด('D_19810618')์ '์ ์'๋ฅผ ์ถ์ธกํ์ง๋ง <<2.23000001907349>>๋ฅผ ํฌํจํฉ๋๋ค.
347์ด('D_19811211')์ '์ ์'๋ก ์ถ์ธก๋์ง๋ง <<1.02999997138977>>์ ํฌํจํฉ๋๋ค.
์ด 348('D_19811212')์ด '์ ์'๋ก ์ถ์ธก๋์ง๋ง <<3.75>>_์(๋ฅผ) ํฌํจํฉ๋๋ค.
์์ฐ - ๊ทํ์ ํ์ผ์ ์ ๋ง ๊ทน๋จ์ ์ธ ๊ฒฝ์ฐ๋ฅผ ํ
์คํธํ๊ณ ์์ต๋๋ค. ์์ฒญ๋. ์์ผ๋ก verbose=TRUE
์คํํ๊ณ ์ ์ฒด ์ถ๋ ฅ์ ์ ๊ณตํ์ญ์์ค. ๊ทธ๋ฌ๋ ์ด ๊ฒฝ์ฐ์ ์ ๊ณตํ ์ ๋ณด๋ฅผ ํตํด ์ค์ ๋ก ๋ฌธ์ ๊ฐ ๋ฌด์์ธ์ง ์ ์ ์์ต๋๋ค. ๊ฐ ์ค๋ ๋์ ๋ํด ๊ฐ ์ด์ ๋ํด ์์ฑ๋ ๋ฒํผ๊ฐ ์์ต๋๋ค(์ด ๊ฒฝ์ฐ 12,000๊ฐ ์ด์์ ์ด). ๊ฐ๊ฐ์ ํ์ฌ ๋ณ๋๋ก ๋ณดํธ๋ฉ๋๋ค. ๊ทธ๊ฒ์ ํผํ๋ ๋ฐฉ๋ฒ์ด ์์ต๋๋ค - ํ ๊ฒ์
๋๋ค. ์ ํ ์ถ์ธก์ ๋ํ ๋ฉ์์ง๊ฐ ์ ํํฉ๋๋ค. 508๊ฐ์ ์ด์ด ๋น์ ์๊ฒ ์๋ฏธ๊ฐ ์๊ณ ์ซ์์ฌ์ผ ํ๋ค๋ ๋ฐ ๋์ํ์ญ๋๊น? ๋ค์๊ณผ ๊ฐ์ด ์ด ๋ฒ์๋ฅผ colClasses
์ ๋ฌํ ์ ์์ต๋๋ค. colClasses=list("numeric"=11:518)
์ด ๋ฐ์ดํฐ๋ ์ด๋ ๋ถ์ผ์ ๋ฐ์ดํฐ์
๋๊น? ํ์ผ์ ๋ง๋ค๊ณ ์์ต๋๊น? ์ผ๋ฐ์ ์ธ ๋ชจ๋ฒ ์ฌ๋ก๋ ๊ธด ํ์์ผ๋ก ์์ฑํ๊ณ ๋ฉ๋ชจ๋ฆฌ์๋ ์ ์งํ๋ ๊ฒ์ธ ์์ด๋ ํ์์ผ๋ก ๋คํ๋ฆฐ ๊ฒ์ฒ๋ผ ๋๊ปด์ง๋๋ค. ์ผ๋ฐ์ ์ผ๋ก "D_19810618"๊ณผ ๊ฐ์ 508๊ฐ์ ์ด ์ด๋ฆ์ ์ด ์์ฒด๊ฐ ์๋๋ผ ์ด์ ๊ฐ์ผ๋ก ๋ณผ ๊ฒ์ผ๋ก ์์ํฉ๋๋ค. ๊ทธ๋์ ํ์ผ์ ์์ฑํ๊ณ ์๊ณ ๊ธด ํ์์ผ๋ก ์์ฑํ ์ ์๋์ง ๋ฌป์ต๋๋ค. ๊ทธ๋ ์ง ์์ ๊ฒฝ์ฐ ํ์ผ์ ๋ง๋๋ ์ฌ๋์๊ฒ ๋ ์ํ ์ ์๋ค๊ณ ์ ์ํ์ญ์์ค. ์๋ง๋ .SD
๋ฐ .SDcols
์ฌ์ฉํ์ฌ ์ด์ ํตํด ์์
์ ์ ์ฉํ๊ณ ์๋ค๊ณ ์๊ฐํฉ๋๋ค. ๊ธด ํ์๊ณผ "D_19810618"๊ณผ ๊ฐ์ ๊ฐ์ ํฌํจํ๋ keyby=
์ด์ด ํจ์ฌ ์ข์ต๋๋ค.
๊ทธ๋ฌ๋ ๋๋ ์ฌ์ ํ fread
๋ฅผ ๋ชจ๋ ์
๋ ฅ(12,000๊ฐ ์ด์์ ์ด์ด ํฌํจ๋ ๋งค์ฐ ๋์ ํ์ผ)์ ์ฒ๋ฆฌํ๋ ๋ฐ ์ฌ์ฉํ ์ ์๋๋ก ์ต์ ์ ๋คํ ๊ฒ์
๋๋ค.
๋ค๋ฅธ ์ฌ๋๋ค์ด ํ์ผ์ ํ ์คํธํ๊ณ ์ ํ ๋ฌธ์ ๋ฅผ ์ฐพ์ง ์๊ธฐ๋ฅผ ๋ฐ๋๋๋ค!
_ 508๊ฐ์ ์ด์ด ๋น์ ์๊ฒ ์๋ฏธ๊ฐ ์๊ณ ์ซ์์ฌ์ผ ํ๋ค๋ ๋ฐ ๋์ํ์ญ๋๊น?
์ด ํ ์ด๋ธ์๋ ํ๋ณ ์๊ณ์ด์ด ํฌํจ๋์ด ์์ต๋๋ค. IDx,IDy, Time1_value, Time2_value, Time3_value... ๋ฐ ๋ชจ๋ Time N _value ์ด์๋ ์ซ์ ๊ฐ๋ง ํฌํจ๋ฉ๋๋ค. colClasses๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ 12783: list("numeric"=2:12783)์ ๋ํด ์ํํด์ผ ํฉ๋๋ค. ๋๋ ์ด๊ฒ์ ์๋ํ ๊ฒ์ด๋ค.
_์ด ๋ฐ์ดํฐ์ ์ถ์ฒ๋ ๋ฌด์์
๋๊น?_
์ง๋ฆฌ ๊ณต๊ฐ ๋ฐ์ดํฐ. IDx ๋ฐ IDy๋ฅผ ์ฌ์ฉํ์ฌ DT ๋ด์์ ์ ํด๋ฆฌ๋ ๊ฑฐ๋ฆฌ ๊ฒ์์ ์ํํ๊ณ ์์ต๋๋ค. ํ์ด ๋ง์์๋ก ๊ฒ์ ์๋๊ฐ ๋๋ ค์ง๋๋ค. ๋ง๋์?
์ง๊ธ์ ๊ฝค ๋น ๋ฆ
๋๋ค(์์ด๋ ํ์). ์ฌ์ฉ์๊ฐ ์์ญ์ ํด๋ฆญํ ๋ค์ ์ฃผ์ด์ง ํด๋ฆญ์ ๊ฐ์ฅ ๊ฐ๊น์ด ์์น(์ฌ์ฉ ๊ฐ๋ฅํ ๋ฐ์ดํฐ ํฌํจ)์์ csv ํ์ผ ๋ด์์ ์๊ณ์ด์ด ์์ฑ๋๋ ์ง๋๊ฐ ์์ต๋๋ค. ๋์ ๊ธด ํ์์ผ๋ก ๊ตฌํํ๊ฒ ์ต๋๋ค.
๋ช ๊ฐ์ง ๊ฒฐ๊ณผ๋ฅผ ๊ฐ์ง๊ณ ๋์์ค๊ฒ ์ต๋๋ค.
๊ทธ๋ ์ข์. list("numeric"=2:12783)
iiuc๋ 508๊ฐ ์ด์ ๋ํ ๋์๋ง ํ์ํ๊ธฐ ๋๋ฌธ์ ํ์ํ์ง ์์ต๋๋ค. ์ - ์๊ฒ ์ต๋๋ค - 508์ด ์ด์ ํตํด ํฉ์ด์ ธ ์๋ค๊ณ ์๊ฐํฉ๋๋ค(์ธ์ ํ ์ด ์งํฉ์ด ์๋)?
์๋์ค - data.table์ด ๋์ ๋ ๋ ๋น ๋ฅด์ง ์์ต๋๋ค! Long์ ๊ฑฐ์ ํญ์ ๋ ๋น ๋ฅด๊ณ ๋ ํธ๋ฆฌํฉ๋๋ค. roll="nearest"
๋ฅผ ๋ณด์๊ณ ์๋ํ ์ ์ด ์์ต๋๊น? ์ง๊ธ ์ด๋ป๊ฒ ํ๊ณ ์๋์? ์ฐ๋ฆฌ๊ฐ ์ดํดํ ์ ์๋๋ก ์ฝ๋๋ฅผ ๋ณด์ฌ์ฃผ์ธ์. ๊ฑฐ์ ํ์คํ ๊ธด ํ์์ด ๋ ๋ซ์ง๋ง ๊ฐ์ฅ ๊ฐ๊น์ด 2D์ ๋ํด ๋ช ๊ฐ์ง ๊ฐ์ ์ฌํญ์ด ํ์ํ ์ ์์ต๋๋ค. ํ์ด๋ฐ๋ ๋ณด์ฌ์ฃผ์ธ์. "๋งค์ฐ ๋น ๋ฆ"์ด๋ผ๊ณ ๋งํ๋ฉด ์ฌ๋๋ค์ "๋งค์ฐ ๋น ๋ฆ"์ด ๋ฌด์์ธ์ง์ ๋ํด ๋งค์ฐ ๋ค๋ฅธ ์๊ฐ์ ๊ฐ์ง๊ณ ์์์ด ๋ฐํ์ก์ต๋๋ค.
์ด ํ ์ด๋ธ์ ๋ น์ด๋ฉด 2^31 ํ๊ณ์ ๋๋ฌํฉ๋๋ค. "์์ ๊ธธ์ด ๋ฒกํฐ๋ ํ์ฉ๋์ง ์์ต๋๋ค"๋ผ๋ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค.
๊ธด ํ์์ผ๋ก ์์ฑํ ์ ์๋์ง ํ์ธํ๊ธฐ ์ํด ์์ค๋ก ๋์๊ฐ๊ฒ ์ต๋๋ค.
# Read Data
DT <- fread('dt.daily.4km.csv', showProgress = FALSE)
# Add two columns with truncated values of x and y (these are geog. coords.)
DT[,y_tr:=trunc(y)]
DT[,x_tr:=trunc(x)]
# For using on plotting (x-axis values)
xaxis<-seq.Date(as.Date("1981-01-01"),as.Date("2015-12-31"), "day")
# subset by truncated coordinates to avoid full-table search. Now searches
# will happen in a smaller subset
DT2 <- DT[y_tr==trunc(y_clicked) & x_tr==trunc(x_clicked),]
# Add distance from each point in the data.table to the provided location, "gdist" is from
# Imap package for euclidean distance.
DT2[,DIST:=gdist(lat.1 = DT2$y,
lon.1 = DT2$x,
lat.2 = y_clicked,
lon.2 = x_clicked, units="miles")]
# Get the minimum distance
minDist <- min(DT2[,DIST])
# Get the y-axis values
yt <- transpose(DT2[DIST==minDist,3:(ncol(DT2)-3)])$V1`
# Ready to plot xaxis vs yt
...
...
๊ณต๊ฐ ์๋ฒ์ ์ ํ๋ฆฌ์ผ์ด์ ์ด ์์ต๋๋ค. ๊ธฐ๋ณธ์ ์ผ๋ก ์ฌ์ฉ์๋ ์ง๋๋ฅผ ํด๋ฆญํ ๋ค์ ํด๋น ์ขํ๋ฅผ ์บก์ฒํ๊ณ ์์ ๊ฒ์์ ์ํํ๊ณ ์๊ณ์ด์ ๊ฐ์ ธ์ค๊ณ ํ๋กฏ์ ์์ฑํ ์ ์์ต๋๋ค.
๋งค์ฐ ๋ง์ ์์ ์ด์ ๋ํ ๋ ๋ค๋ฅธ ์คํ ์ค๋ฒํ๋ก๋ฅผ ์ฐพ์ ์์ ํ์ต๋๋ค. https://github.com/Rdatatable/data.table/commit/d0469e670961dcdea115d433c0f2dce596d65906. ์ปค๋ฐ ๋ฉ์์ง์์ ์ด ๋ฌธ์ ๋ฒํธ์ ํ๊ทธ๋ฅผ ์ง์ ํ๋ ๊ฒ์ ์์์ต๋๋ค.
์ค. ๊ทธ๊ฒ ํฌ์ธํธ์ ๋๋ค. 872505ํ * 12780์ด์ 110์ต ํ์ ๋๋ค. ๋ฐ๋ผ์ ๊ธด ํ์์ ์ฌ์ฉํ๋ผ๋ ๋ด ์ ์์ > 2^31์ด๋ฏ๋ก ์๋ํ์ง ์์ต๋๋ค. ์ฃ์กํฉ๋๋ค - ๋ด๊ฐ ๊ทธ๊ฒ์ ๋ฐ๊ฒฌํ์ด์ผ ํฉ๋๋ค. ์ด์์ ๊นจ๋ฌผ๊ณ > 2^31๋ก ์ด๋ํ๋ฉด ๋ฉ๋๋ค. ๊ทธ๋์ ์์ ํ๊ณ ์๋ ์์ด๋ ํ์์ ๊ณ์ ์ฌ์ฉํ๊ณ ์ด์ ๋ํด ์ค๋ช ํ๊ฒ ์ต๋๋ค.
๋ค์ ์๋ํด ์ฃผ์ธ์. ๋ฉ๋ชจ๋ฆฌ ์ฌ์ฉ๋์ ์ ์์ผ๋ก ๋์๊ฐ์ผ ํ๋ฉฐ ์ํ ์ธ ์ ํ ์์ธ๊ฐ ์๋ 12,785๊ฐ ์ด ์ค 508๊ฐ ์ด์ ์๋์ผ๋ก ๋ค์ ์ฝ์ด์ผ ํฉ๋๋ค. ์๋ ์ฌ์คํ ์๊ฐ์ ํผํ๋ ค๋ฉด colClasses
์ค์ ํ ์ ์์ต๋๋ค.
์์ ๋์ง ์์ ๊ฒฝ์ฐ ์ ์ฒด ์์ธ ์ถ๋ ฅ์ ๋ถ์ฌ๋ฃ์ผ์ญ์์ค. ์๊ฐ๋ฝ์ด ๊ต์ฐจ!
ํ์ธ...
์ต์ data.table dev: data.table 1.10.5 IN DEVELOPMENT ๊ตฌ์ถ ๊ฒฐ๊ณผ ์์ฝ
์ธ๊ธํ 4๊ฐ์ง ์ฃผ์ ์ฌํญ:
๋ช ๊ฐ์ง ์๊ฒฌ/์ง๋ฌธ:
1.
์ฝ์ด์ ์ฌ์ฉ๋ ๋น์จ์ด ์ด์ ๋งํผ ํ์ฑํ๋์ง ์์์ต๋๋ค(์คํฌ๋ฆฐ์ท ์ฐธ์กฐ).
fread์ ์ด์ ๋ฒ์ ์์ ์ฝ์ด์ ํ๋์ ํญ์ ~ 90-80%์์ต๋๋ค. ์ด ๋ฒ์ ์์๋ ์์ ์ด๋ฏธ์ง์ ๊ฐ์ด ๊ฐ ์ฝ์ด์ ์ฝ 2-3%๋ฅผ ์ ์งํ์ต๋๋ค.
Column 1489 ("D_19850126") bumped from 'integer' to 'numeric' due to <<0.949999988079071>> somewhere between row 6041 and row 24473
ํด๋น ํ์ ๋ ๋ฒ ํ์ธํ๋๋ฐ ๊ด์ฐฎ์ ๊ฒ ๊ฐ์ต๋๋ค. ๊ฐ ์ด๋ฏธ ์ซ์์ธ ๊ฒฝ์ฐ ์ ์๋ก ๊ฐ์ง๋๊ณ '์ซ์'๋ก '๋ฒํ'ํด์ผ ํ๋ ์ด์ ๋ ๋ฌด์์ ๋๊น(์๋ ์ ์๋ ํ์ ๋ํ ์์ฝ ์ฐธ์กฐ)? ์๋๋ฉด ๋ด๊ฐ์ด ์ค์ ์๋ชป ์ดํดํ๊ณ ์์ต๋๊น? ์ด๊ฒ์ 508 ๋ผ์ธ์์ ๋ฐ์ํฉ๋๋ค. NA๊ฐ ๋ฌธ์ ๋ฅผ ์ผ์ผํค๋๊ฐ?
summary(DT[6041:24473,.(D_19850126)])
D_19850126
Min. :0.750
1st Qu.:0.887
Median :0.945
Mean :0.966
3rd Qu.:1.045
Max. :1.210
NA's :18393
์๋๋ ํ ์คํธ ์ค ์ฅํฉํ ๊ฒ์ ๋๋ค.
DT<-fread('dt.daily.4km.ver032917.csv', verbose=TRUE)
์ฐ์ถ
Parameter na.strings == <<NA>>
None of the 0 na.strings are numeric (such as '-9999').Input contains no \n. Taking this to be a filename to open
File opened, filesize is 43.772296 GB.
Memory mapping ... ok
Detected eol as \n only (no \r afterwards), the UNIX and Mac standard.
Positioned on line 1 starting: <<x,y,D_19810101,D_19810102,D_19810103,D_19810104,D_19810105,D_19810106,D_19810107,D_19810108,D_19810109,D_19810110,D_19810111,D_19810112,D_19810113,
...
...
All the fields on line 1 are character fields. Treating as the column names.
Number of sampling jump points = 11 because 1281788 startSize * 10 NJUMPS * 2 = 25635760 <= -244636240 bytes from line 2 to eof
Type codes (jump 00) : 441111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...1111111111 Quote rule 0
Type codes (jump 01) : 444422222222222222242444424444442222222222424444424442224424222244222222222242422222224422...4442244422 Quote rule 0
Type codes (jump 02) : 444422222222222222242444424444442422222242424444424442224424222244222222222242424222424424...4442444442 Quote rule 0
Type codes (jump 03) : 444422222222222224242444424444444422222244424444424442224424222244222222222244424442424424...4442444442 Quote rule 0
Type codes (jump 04) : 444444244422222224442444424444444444242244444444444444424444442244444222222244424442444444...4444444444 Quote rule 0
Type codes (jump 05) : 444444244422222224442444424444444444242244444444444444424444442244444222222244424442444444...4444444444 Quote rule 0
Type codes (jump 06) : 444444444422222224442444424444444444242244444444444444424444444444444244444444424442444444...4444444444 Quote rule 0
Type codes (jump 07) : 444444444422222224442444424444444444242244444444444444444444444444444244444444424444444444...4444444444 Quote rule 0
Type codes (jump 08) : 444444444442222224444444424444444444242244444444444444444444444444444444444444424444444444...4444444444 Quote rule 0
Type codes (jump 09) : 444444444442222424444444424444444444244444444444444444444444444444444444444444424444444444...4444444444 Quote rule 0
Type codes (jump 10) : 444444444442222424444444424444444444244444444444444444444444444444444444444444424444444444...4444444444 Quote rule 0
=====
Sampled 305 rows (handled \n inside quoted fields) at 11 jump points including middle and very end
Bytes from first data row on line 2 to the end of last row: 47000004016
Line length: mean=45578.20 sd=33428.37 min=12815 max=108497
Estimated nrow: 47000004016 / 45578.20 = 1031195
Initial alloc = 2062390 rows (1031195 + 100%) using bytes/max(mean-2*sd,min) clamped between [1.1*estn, 2.0*estn]
=====
Type codes (colClasses) : 444444444442222424444444424444444444244444444444444444444444444444444444444444424444444444...4444444444
Type codes (drop|select): 444444444442222424444444424444444444244444444444444444444444444444444444444444424444444444...4444444444
Allocating 12785 column slots (12785 - 0 dropped)
Reading 44928 chunks of 0.998MB (22 rows) using 144 threads
Read 872505 rows x 12785 columns from 43.772GB file in 05:26.908 wall clock time (can be slowed down by any other open apps even if seemingly idle)
Final type counts
0 : drop
0 : logical
0 : integer
0 : integer64
12785 : numeric
0 : character
Rereading 508 columns due to out-of-sample type exceptions.
Column 171 ("D_19810618") bumped from 'integer' to 'numeric' due to <<2.23000001907349>> somewhere between row 6041 and row 24473
Column 347 ("D_19811211") bumped from 'integer' to 'numeric' due to <<1.02999997138977>> somewhere between row 6041 and row 24473
Column 348 ("D_19811212") bumped from 'integer' to 'numeric' due to <<3.75>> somewhere between row 6041 and row 24473
Column 643 ("D_19821003") bumped from 'integer' to 'numeric' due to <<1.04999995231628>> somewhere between row 6041 and row 24473
Column 1066 ("D_19831130") bumped from 'integer' to 'numeric' due to <<1.46000003814697>> somewhere between row 6041 and row 24473
Column 1102 ("D_19840105") bumped from 'integer' to 'numeric' due to <<0.959999978542328>> somewhere between row 6041 and row 24473
Column 1124 ("D_19840127") bumped from 'integer' to 'numeric' due to <<0.620000004768372>> somewhere between row 6041 and row 24473
Column 1130 ("D_19840202") bumped from 'integer' to 'numeric' due to <<0.540000021457672>> somewhere between row 6041 and row 24473
Column 1489 ("D_19850126") bumped from 'integer' to 'numeric' due to <<0.949999988079071>> somewhere between row 6041 and row 24473
Column 1508 ("D_19850214") bumped from 'integer' to 'numeric' due to <<0.360000014305115>> somewhere between row 6041 and row 24473
...
...
Reread 872505 rows x 508 columns in 05:29.167
Read 872505 rows. Exactly what was estimated and allocated up front
Thread buffers were grown 0 times (if all 144 threads each grew once, this figure would be 144)
=============================
0.000s ( 0%) Memory map
0.093s ( 0%) sep, ncol and header detection
0.186s ( 0%) Column type detection using 305 sample rows from 44928 jump points
0.600s ( 0%) Allocation of 872505 rows x 12785 cols (192.552GB) plus 1.721GB of temporary buffers
326.029s ( 50%) Reading data
329.167s ( 50%) Rereading 508 columns due to out-of-sample type exceptions
656.075s Total
์ด ๋ง์ง๋ง ์์ฝ์ ์๋ฃํ๋ ๋ฐ ๋ง์ ์๊ฐ์ด ๊ฑธ๋ ธ์ต๋๋ค(~6๋ถ). ์ด ์ฅํฉํ ์์ฝ์ ๊ณ์ฐํ๋ฉด ์ ์ฒด fread๊ฐ ~ 11๋ถ์ด ๊ฑธ๋ ธ์ต๋๋ค. ํด๋น 508๊ฐ ์ด์ ๋ค์ ์ฝ๊ณ ์์ผ๋ฉฐ verbose=TRUE๋ฅผ ์ฌ์ฉํ์ง ์๊ณ "์ํ ์ ํ ์์ธ๋ก ์ธํด 508๊ฐ ์ด์ ๋ค์ ์ฝ๋ ์ค"์ด๋ผ๋ ๋ฉ์์ง๋ ๋ณผ ์ ์์ต๋๋ค.
"verbose=TRUE" ์์ด ํ์ธํ์ญ์์ค.
ptm<-proc.time()
DT<-fread('dt.daily.4km.ver032917.csv')
Read 872505 rows x 12785 columns from 43.772GB file in 05:26.647 wall clock time (can be slowed down by any other open apps even if seemingly idle)
Rereading 508 columns due to out-of-sample type exceptions.
Reread 872505 rows x 508 columns in 05:30.276
proc.time() - ptm
user system elapsed
2113.100 85.919 657.870
์ฐ๊ธฐ ํ
์คํธ
๊ทธ๊ฒ์ ์ ์๋ํฉ๋๋ค. ์ ๋ง ๋น ๋ฆ
๋๋ค. ์์ฆ์ ๊ธ์ด ์ฝ๊ธฐ๋ณด๋ค ๋๋ฆฌ๋ค๋ ์๊ฐ์ด ๋ค์์ต๋๋ค.
fwrite(DT,'dt.daily.4km.ver032917.csv', verbose=TRUE)
No list columns are present. Setting sep2='' otherwise quote='auto' would quote fields containing sep2.
maxLineLen=151187 from sample. Found in 1.890s
Writing column names ... done in 0.000s
Writing 872505 rows in 32315 batches of 27 rows (each buffer size 8MB, showProgress=1, nth=144) ...
done (actual nth=144, anyBufferGrown=no, maxBuffUsed=46%)
"๋ค์ ์ฝ๊ธฐ"๋ ์๊ฐ์ด ๊ฝค ๊ฑธ๋ฆฝ๋๋ค. ํ์ผ์ ๋ ๋ฒ ์ฝ๋ ๊ฒ๊ณผ ๊ฐ์ต๋๋ค.
ํ๋ฅญํ! ๋ชจ๋ ์ ๋ณด๋ฅผ ์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค.
colClasses=list("numeric"=1:12785)
ํ์ผ๋ฏ๋ก Type code (colClasses)
์์ํ๋ ์ถ๋ ฅ ํ์ ๋ชจ๋ ๊ฐ 4์ฌ์ผ ํฉ๋๋ค. ๋๋ฝ๋ ํ
์คํธ๋ฅผ ์์ ํ๊ณ ์ถ๊ฐํฉ๋๋ค.lscpu
์ ๋์ค ๋ช
๋ น์ ์ถ๋ ฅ์ ๋ถ์ฌ๋ฃ์ ์ ์์ต๋๊น? ์ด๊ฒ์ ๋น์ ์ ์บ์ ํฌ๊ธฐ๋ฅผ ์๋ ค์ค ๊ฒ์ด๊ณ ๋๋ ๊ฑฐ๊ธฐ์์ ์๊ฐํ ์ ์์ต๋๋ค. buffMB
์ ๋งค๊ฐ๋ณ์๋ก fread
ํ์ฌ ๊ทธ๊ฒ์ด ๋ง๋์ง ํ์ธํ ์ ์์ต๋๋ค. ๊ทธ๋ ๋ค๋ฉด ๋ ๋์ ๊ณ์ฐ์ ํ ์ ์์ต๋๋ค.
๋ด ์ด์ ๊ฒ์๋ฌผ์ ํ ์ง์ ์์ ๋ด ์ค์. colClasses=list("numeric"=1:12785)
์ด(๊ฐ) ์ ์๋ํฉ๋๋ค. "colClasses"๋ฅผ ์ง์ ํ์ง ์์ผ๋ฉด "๋ค์ ์ฝ๊ธฐ"๊ฐ ์ํ๋ฉ๋๋ค. ํผ๋์ ๋๋ ค ์ฃ์กํฉ๋๋ค.
๋ด๊ฐ ์์์ฐจ๋ฆฐ ํ ๊ฐ์ง๋ "colClasses"๋ฅผ ์ง์ ํ์ง ์์ผ๋ฉด ํ
์ด๋ธ์ด NA๋ก ์์ฑ๋๊ณ RAM์ด DT๊ฐ ์ ์์ ์ผ๋ก ๋ก๋๋ ๊ฒ์ฒ๋ผ ํ์๋๋ค๋ ๊ฒ์
๋๋ค(RAM์์ ~106MB).
๋ค์์ lscpu ์ถ๋ ฅ์ ๋๋ค.
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 144
On-line CPU(s) list: 0-143
Thread(s) per core: 2
Core(s) per socket: 18
Socket(s): 4
NUMA node(s): 4
Vendor ID: GenuineIntel
CPU family: 6
Model: 63
Model name: Intel(R) Xeon(R) CPU E7-8870 v3 @ 2.10GHz
Stepping: 4
CPU MHz: 2898.328
BogoMIPS: 4195.66
Virtualization: VT-x
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 46080K
NUMA node0 CPU(s): 0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140
NUMA node1 CPU(s): 1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61,65,69,73,77,81,85,89,93,97,101,105,109,113,117,121,125,129,133,137,141
NUMA node2 CPU(s): 2,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,66,70,74,78,82,86,90,94,98,102,106,110,114,118,122,126,130,134,138,142
NUMA node3 CPU(s): 3,7,11,15,19,23,27,31,35,39,43,47,51,55,59,63,67,71,75,79,83,87,91,95,99,103,107,111,115,119,123,127,131,135,139,143
์๊ฒ ์ต๋๋ค. ๊ฐ์ฌ ํด์.
์ฒซ ๋ฒ์งธ ์๊ฒฌ์ ๋ค์ ์ฝ์ผ๋ฉด "์ ์์์ ์ซ์๋ก ๋ฒํ"์ด ์๋๋ผ "์ ์์์ ์ด์ค์ผ๋ก ๋ฒํ"์ด๋ผ๊ณ ๋งํ๋ฉด ๋ ์ดํด๊ฐ ๋ ๊น์?
'NA๋ก ์์ฑ๋จ'์ ๋ฌด์จ ๋ป์ธ๊ฐ์? ๋ชจ๋ ํ ์ด๋ธ์ด NA๋ก ๊ฐ๋ ์ฐจ ์๊ณ 508๊ฐ์ ์ด๋ง ์์ต๋๊น?
'DT๊ฐ ์ ์์ ์ผ๋ก ๋ก๋๋์์ต๋๋ค(RAM์์ ~106MB)'๋ ๋ฌด์์ ๋๊น? 44GB ํ์ผ์ธ๋ฐ ์ด๋ป๊ฒ 106MB๊ฐ ์ ์์ผ ์ ์์ต๋๊น?
๊ธ์, ์ด ํ์ผ์์ ๋ด๊ฐ ๊ฐ์ง ๋ชจ๋ ๊ฒ์ ์ค์์ NA์ ๋๋ค. ์ ์ ๊ฐ์ด ์์ต๋๋ค. "datatypeA์์ datatypeB๋ก ๋ฒํ"์ด๋ผ๋ ๋ฉ์์ง๊ฐ ์ธ์ ๋ฐ์ํฉ๋๊น?
๊ทธ๊ฒ ๋ฐ๋ก ๋ด๊ฐ ์๋ฏธํ๋ ๋ฐ์
๋๋ค. ๋ด๊ฐ ์ค์นํ ํ์ฌ ๋ฒ์ ์ data.table์์ colClasses๋ฅผ ์๋ตํ๋ฉด DT๋ ๋ก๋๋์ง๋ง NA๋ ๊ฐ๋ ์ฐจ ์์ต๋๋ค. DT[!is.na(D_19821001),]
๋ 0๊ฐ์ ๋ ์ฝ๋๋ฅผ ์์ฑํ๊ณ colClasses๊ฐ ์๋ ํ
์ด๋ธ์ ๋ก๋ํ๊ณ ๋์ผํ ํํฐ๋ง์ ์ํํ๋ฉด ์ค์ ๋ก ๋ ์ฝ๋๊ฐ ํ์๋ฉ๋๋ค.
๊ธ์, ์ด ํ์ผ์ ๋์คํฌ์ csv๋ก 47GB์ด์ง๋ง, ์ผ๋จ R์ ๋ก๋ํ๋ฉด RAM์์ ๋ ๋ฐฐ ์ด์ ๊ฑธ๋ฆฝ๋๋ค... ๊ฐ์ ์ ๋ฐ๋์ ๊ด๋ จ์ด ์์ต๋๋ค. ์ผ๋จ ๋ก๋๋๋ฉด ์ค์ ๋ฉ๋ชจ๋ฆฌ ํ ๋น์ด ๋ก๋๋ฉ๋๋ค. ์ซ์๊ฐ ์ฆ๊ฐ๋ฅผ ์ ๋ฐํฉ๋๊น?
๊ทธ๋ ๋ค๋ฉด ๋ ๋ค๋ฅธ ์คํ๊ฐ ์์ ์ ์์ต๋๋ค. 106MB๋ 106GB์ฌ์ผ ํฉ๋๋ค.
๋๋ NA ์ธก๋ฉด์ ๋ฐ๋ฅด์ง ์์ต๋๋ค. ๊ทธ๋ฌ๋ ๋์ค์ ๋ช ๊ฐ์ง ์์ ํ ๋ค์ ์๋ก ๋ค์ ์๋ํ์ญ์์ค ...
์๊ฒ ์ต๋๋ค. ๋ค์ ์๋ํด ์ฃผ์ธ์. ์ถ์ธก ์ํ์ด 10,000์ผ๋ก ์ฆ๊ฐํ์ผ๋ฉฐ(์๊ฐ์ด ์ผ๋ง๋ ๊ฑธ๋ฆฌ๋์ง ํ์ธํ๋ ๊ฒ์ด ํฅ๋ฏธ๋ก์ธ ๊ฒ์
๋๋ค) ์ด์ ๋ฒํผ ํฌ๊ธฐ์ ์ต์๊ฐ์ด ์ ์ฉ๋ฉ๋๋ค.
drat ํจํค์ง ํ์ผ์ด ์น๊ฒฉ๋ ๋๊น์ง ์ต์ 30๋ถ์ ๊ธฐ๋ค๋ ค์ผ ํ ์ ์์ต๋๋ค.
์ฃ์กํฉ๋๋ค. "MB"๊ฐ ์๋๋ผ "GB"์์ต๋๋ค. ์ปคํผ๊ฐ ๋ถ์กฑํ์ด์.
์
๋ฐ์ดํธ ๋ฐ์์ ํ
์คํธ ํด๋ณด๊ฒ ์ต๋๋ค.
์ต์ data.table dev.๋ก ํ ์คํธ: data.table 1.10.5 IN DEVELOPMENT ๊ตฌ์ถ 2017-03-30 16:31:45 UTC :
์์ฝ:
๊ทธ๊ฒ์ ๋น ๋ฅด๊ฒ ์๋ํ๊ณ (csv๋ฅผ ์ฝ๋ ๋ฐ 1.43๋ถ) ๋ฉ๋ชจ๋ฆฌ ํ ๋น๋ ์ ์๋ํฉ๋๋ค. RAM ํ ๋น์ด ์ด์ ์ฒ๋ผ ์ฆ๊ฐํ์ง ์๋ ๊ฒ ๊ฐ์ต๋๋ค. ๋์คํฌ์ 44GB csv๋ ๋ก๋๋๋ฉด RAM์ ~112(+ 37GB ์์ ๋ฒํผ)GB๋ก ๋ณํ๋ฉ๋๋ค. ์ด๊ฒ์ ํ์ผ์ ์๋ ๊ฐ์ ๋ฐ์ดํฐ ์ ํ๊ณผ ๊ด๋ จ์ด ์์ต๋๊น?
ํ ์คํธ 1 :
colClasses=list("numeric"=1:12785)
์ฌ์ฉํ์ง ์๊ณ
DT<-fread('dt.daily.4km.csv', verbose=TRUE)
Parameter na.strings == <<NA>>
None of the 1 na.strings are numeric (such as '-9999').
Input contains no \n. Taking this to be a filename to open
File opened, filesize is 43.772296 GB.
Memory mapping ... ok
Detected eol as \n only (no \r afterwards), the UNIX and Mac standard.
Positioned on line 1 starting: <<x,y,D_19810101,D_19810102,D_19810103,D_19810104,D_19810105,D_19810106,D_19810107,
D_19810108,D_19810109,D_19810110,D_19810111,D_19810112,
...
All the fields on line 1 are character fields. Treating as the column names.
Number of sampling jump points = 101 because 47000004016 bytes from row 1 to eof / (2 * 1281788 jump0size) == 18333
Type codes (jump 000) : 441111111111111111111111111111111111111111111111111111111111111111111111111111111111111111...1111111111 Quote rule 0
Type codes (jump 001) : 444222422222222224442444444444442222444444444444444444442444444444444222224444444444444444...4444444442 Quote rule 0
Type codes (jump 002) : 444222444444222244442444444444444422444444444444444444442444444444444222224444444444444444...4444444442 Quote rule 0
...
Type codes (jump 034) : 444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...4444444444 Quote rule 0
Type codes (jump 100) : 444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...4444444444 Quote rule 0
=====
Sampled 10049 rows (handled \n inside quoted fields) at 101 jump points including middle and very end
Bytes from first data row on line 2 to the end of last row: 47000004016
Line length: mean=79727.22 sd=32260.00 min=12804 max=153029
Estimated nrow: 47000004016 / 79727.22 = 589511
Initial alloc = 1179022 rows (589511 + 100%) using bytes/max(mean-2*sd,min) clamped between [1.1*estn, 2.0*estn]
=====
Type codes (colClasses) : 444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...4444444444
Type codes (drop|select) : 444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444...4444444444
Allocating 12785 column slots (12785 - 0 dropped)
Reading 432 chunks of 103.756MB (1364 rows) using 144 threads
Read 872505 rows x 12785 columns from 43.772GB file in 02:17.726 wall clock time (can be slowed down by any other open apps even if seemingly idle)
Final type counts
0 : drop
0 : logical
0 : integer
0 : integer64
12785 : double
0 : character
Thread buffers were grown 67 times (if all 144 threads each grew once, this figure would be 144)
=============================
0.000s ( 0%) Memory map
0.099s ( 0%) sep, ncol and header detection
11.057s ( 8%) Column type detection using 10049 sample rows
0.899s ( 1%) Allocation of 872505 rows x 12785 cols (112.309GB) plus 37.433GB of temporary buffers
125.671s ( 91%) Reading data
0.000s ( 0%) Rereading 0 columns due to out-of-sample type exceptions
137.726s Total
ํ ์คํธ 2 :
์ง๊ธ colClasses=list("numeric"=1:12785)
ํ์ด๋ฐ์ด ๋ช ์ด ๊ฐ์ ๋์์ต๋๋ค ...
DT<-fread('dt.daily.4km.csv', colClasses=list("numeric"=1:12785), verbose=TRUE)
Allocating 12785 column slots (12785 - 0 dropped)
Reading 432 chunks of 103.756MB (1364 rows) using 144 threads
Read 872505 rows x 12785 columns from 43.772GB file in 01:43.028 wall clock time (can be slowed down by any other open apps even if seemingly idle)
Final type counts
0 : drop
0 : logical
0 : integer
0 : integer64
12785 : double
0 : character
Thread buffers were grown 67 times (if all 144 threads each grew once, this figure would be 144)
=============================
0.000s ( 0%) Memory map
0.092s ( 0%) sep, ncol and header detection
11.009s ( 11%) Column type detection using 10049 sample rows
0.332s ( 0%) Allocation of 872505 rows x 12785 cols (112.309GB) plus 37.433GB of temporary buffers
91.595s ( 89%) Reading data
0.000s ( 0%) Rereading 0 columns due to out-of-sample type exceptions
103.028s Total
์ข์ - ์ฐ๋ฆฌ๋ ๊ฑฐ๊ธฐ์ ๋๋ฌํ๊ณ ์์ต๋๋ค. ์์ ๋ ์ํ ํฌ๊ธฐ์ 100๊ฐ ํฌ์ธํธ(10,000๊ฐ ์ํ ๋ผ์ธ)์์ 100๊ฐ ๋ผ์ธ์ผ๋ก ๋๋ฆฌ๋ฉด ์ ํ์ ์ฌ๋ฐ๋ฅด๊ฒ ์ถ์ธกํ๊ธฐ์ ์ถฉ๋ถํ์ต๋๋ค. ํ๋ฅญํฉ๋๋ค. 44GB ํ์ผ์ ์ด์ด 12,875๊ฐ์ด๊ณ ํ ๊ธธ์ด๊ฐ ํ๊ท 80,000์์ด๋ฏ๋ก ์ํ๋งํ๋ ๋ฐ 11์ด๊ฐ ๊ฑธ๋ ธ์ต๋๋ค. ๊ทธ๋ฌ๋ ๊ทธ ์๊ฐ์ 90์ด๊ฐ ๋ ๊ฑธ๋ ธ์ ๋ค์ ์ฝ๊ธฐ๋ฅผ ํผํ ์ ์์๊ธฐ ๋๋ฌธ์ ๊ฐ์น๊ฐ ์์์ต๋๋ค. ์ฐ๋ฆฌ๋ ๊ทธ๋ ๊ทธ๊ฒ์ ๊ณ ์ํ ๊ฒ์ ๋๋ค.
๋ ๋ฒ์งธ ์๊ฐ์ด๊ณ ์ด์ ์ฒด์ ๊ฐ ์๋ฐ์ ๋์ด ํ์ผ์ ์บ์ํ๊ธฐ ๋๋ฌธ์ ๋ ๋ฒ์งธ ์๊ฐ์ด ๋ ๋น ๋ฅด๋ค๊ณ ์๊ฐํฉ๋๋ค. ์์์์ ์คํ๋๋ ๋ค๋ฅธ ๋ชจ๋ ๊ฒ์ ๋ฒฝ์๊ณ ํ์ด๋ฐ์ ์ํฅ์ ๋ฏธ์นฉ๋๋ค. ์ด๋ 1์ฐจ ํ ์คํธ์ ๋์ผํ ์ฐ์ 3ํ ์คํ์ผ๋ก ํด๊ฒฐ๋ฉ๋๋ค. ๊ทธ๋ฐ ๋ค์ ํ ๊ฐ์ง๋ง ๋ณ๊ฒฝํ๊ณ 3๊ฐ์ ๋์ผํ ์ฐ์ ์คํ์ ๋ค์ ์คํํฉ๋๋ค. 44GB ํฌ๊ธฐ์์๋ ๋ง์ ์์ฐ์ค๋ฌ์ด ์ฐจ์ด๋ฅผ ๋ณผ ์ ์์ต๋๋ค. ์ผ๋ฐ์ ์ผ๋ก 3๊ฐ์ ์คํ์ผ๋ก ๊ฒฐ๋ก ์ ๋ด๋ฆฌ๊ธฐ์ ์ถฉ๋ถํ์ง๋ง ๋ธ๋ ์ํธ๊ฐ ๋ ์ ์์ต๋๋ค.
์, ๋ฉ๋ชจ๋ฆฌ์ 112GB์ ๋์คํฌ์ 44GB๋ ๋ถ๋ถ์ ์ผ๋ก ๋ชจ๋ ์ด์ด ์ด์ค ์ ํ์ด๊ธฐ ๋๋ฌธ์ ๋ฉ๋ชจ๋ฆฌ์ ๋ฐ์ดํฐ๊ฐ ๋ ํฌ๊ธฐ ๋๋ฌธ์
๋๋ค. R์๋ ๋ฉ๋ชจ๋ฆฌ ๋ด ์์ถ์ด ์์ผ๋ฉฐ ์ด CSV(๋จ์ง ",,"
)์๋ ๊ณต๊ฐ์ ์ฐจ์งํ์ง ์์ง๋ง ๋ฉ๋ชจ๋ฆฌ์๋ 8๋ฐ์ดํธ์ NA ๊ฐ์ด ๋ง์ด ์์ต๋๋ค. ๊ทธ๋ฌ๋ 112GB๊ฐ ์๋ 83GB์ฌ์ผ ํฉ๋๋ค(872505ํ x 12785์ด x 8๋ฐ์ดํธ 2๋ฐฐ / 1024^3 = 83GB). ๊ทธ 112GB๋ ๋ผ์ธ ๊ธธ์ด์ ํ๊ท ๊ณผ ํ์คํธ์ฐจ๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ํ ๋น๋ ๊ฒ์
๋๋ค. ํ๊ท ํ ๊ธธ์ด๋ฅผ ๊ธฐ์ค์ผ๋ก 589,511ํ์ผ๋ก ์ถ์ ํ์ฌ ๋๋ฌด ์งง์์ต๋๋ค. ์ ๊ธธ์ด ํธ์ฐจ๊ฐ ๋๋ฌด ์ปค์ ํด๋จํ๊ฐ +100%์์ ์ ์ฉ๋์์ต๋๋ค. 58,9511 * 2 = 1,179,022 * 12785 * 8 / 1024^3 = 112GB์
๋๋ค. ๊ฒฐ๊ตญ ํ์ผ์ 872,505๊ฐ๊ฐ ์์์ ๋ฐ๊ฒฌํ์ต๋๋ค. ๊ทธ๋ฌ๋ ๊ทธ๊ฒ์ ์ฌ์ ๊ณต๊ฐ์ ํ๋ณดํ์ง ์์ต๋๋ค. ์์ ํ๊ฒ ์ต๋๋ค. (TODO1)
๋ชจ๋ ์ด์ ๋ํด ์ด ์ ํ์ ์ง์ ํด๋ ์ฌ์ ํ ์ํ๋ง๋ฉ๋๋ค. ์ฌ์ฉ์๊ฐ ๋ชจ๋ ์ด์ ์ง์ ํ ๊ฒฝ์ฐ ์ํ๋ง์ ๊ฑด๋๋ฐ์ด์ผ ํฉ๋๋ค. (TODO2)
๋ชจ๋ ๋ฐ์ดํฐ๊ฐ 2๋ฐฐ์ด๊ธฐ ๋๋ฌธ์ C ๋ผ์ด๋ธ๋ฌ๋ฆฌ ํจ์ strtod()๋ฅผ 110์ต ๋ฒ ํธ์ถํฉ๋๋ค. ๊ทธ ๊ธฐ๋ฅ์ ์ ๋ฌธํ์ ๋ํ ์ค๋ ์ผ์์ ์ด๋ก ์ ์ผ๋ก ์ด ํ์ผ์ ์๋๋ฅผ ํฌ๊ฒ ๋์ฌ์ผ ํฉ๋๋ค. (์๋ฃ)
์ข์ ์ค๋ช ๊ฐ์ฌํฉ๋๋ค. ์ด ํ์ผ๋ก ๋ค๋ฅธ ๊ฒ์ ํ ์คํธํ๊ณ ์ถ๋ค๋ฉด ์๋ ค์ฃผ์ธ์. ์ ๋ ~2,100๋ง ํ x 1432๊ฐ์ ์ด์ด ์๋ ๊ธด ํ์์ ๋ ๊ฐ๊น์ด ๋ค๋ฅธ ๋ฐ์ดํฐ ์ธํธ๋ฅผ ์์ ์ค์ ๋๋ค.
NAME NROW NCOL MB
[1,] DT 21,812,625 1,432 238,310
์ฌ๊ธฐ์ ์ถ๊ฐ ๋ฐ์ดํฐ ํฌ์ธํธ๋ฅผ ์ถ๊ฐํฉ๋๋ค. 89G .tsv
, ๋ก๋ ์ค ์ต๋ ๋ฉ๋ชจ๋ฆฌ ์ฌ์ฉ๋์ ~180G์
๋๋ค. NA์ ๋๋ธ์ด ๋ง๊ธฐ ๋๋ฌธ์ ๊ธฐ๋๋๋ ๋ถ๋ถ์ด๋ผ๊ณ ์๊ฐํฉ๋๋ค.
๋๋ ๋ํ ์ด๊ฒ์ ๋ํด ํ ์คํธํ๊ฒ๋์ด ๊ธฐ์ฉ๋๋ค.
Ubuntu 16.04 64bit / Linux 4.4.0-71-generic
R version 3.3.2 (2016-10-31)
data.table 1.10.5 IN DEVELOPMENT built 2017-04-04 14:27:46 UTC
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 64
On-line CPU(s) list: 0-63
Thread(s) per core: 2
Core(s) per socket: 16
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 79
Model name: Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz
Stepping: 1
CPU MHz: 2699.984
CPU max MHz: 3000.0000
CPU min MHz: 1200.0000
BogoMIPS: 4660.70
Hypervisor vendor: Xen
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 46080K
NUMA node0 CPU(s): 0-15,32-47
NUMA node1 CPU(s): 16-31,48-63
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq monitor est ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm xsaveopt ida
Parameter na.strings == <<NA>>
None of the 1 na.strings are numeric (such as '-9999').
Input contains no \n. Taking this to be a filename to open
File opened, filesize is 88.603947 GB.
Memory mapping ... ok
Detected eol as \n only (no \r afterwards), the UNIX and Mac standard.
Positioned on line 1 starting: <<allele prediction_uuid sample_>>
Detecting sep ...
sep=='\t' with 101 lines of 76 fields using quote rule 0
Detected 76 columns on line 1. This line is either column names or first data row (first 30 chars): <<allele prediction_uuid sample_>>
All the fields on line 1 are character fields. Treating as the column names.
Number of sampling jump points = 101 because 95137762779 bytes from row 1 to eof / (2 * 24414 jump0size) == 1948426
Type codes (jump 000) : 5555542444111145424441111444111111111111111111111111111111111111111111111111 Quote rule 0
Type codes (jump 009) : 5555542444114445424441144444111111111111111111111111111111111111111111111111 Quote rule 0
Type codes (jump 042) : 5555542444444445424444444444111111111111111111111111111111111111111111111111 Quote rule 0
Type codes (jump 048) : 5555544444444445444444444444225225522555545111111111111111111111111111111111 Quote rule 0
Type codes (jump 083) : 5555544444444445444444444444225225522555545254452454411154454452454411154455 Quote rule 0
Type codes (jump 085) : 5555544444444445444444444444225225522555545254452454454454454452454454454455 Quote rule 0
Type codes (jump 100) : 5555544444444445444444444444225225522555545254452454454454454452454454454455 Quote rule 0
=====
Sampled 10028 rows (handled \n inside quoted fields) at 101 jump points including middle and very end
Bytes from first data row on line 2 to the end of last row: 95137762779
Line length: mean=465.06 sd=250.27 min=198 max=929
Estimated nrow: 95137762779 / 465.06 = 204571280
Initial alloc = 409142560 rows (204571280 + 100%) using bytes/max(mean-2*sd,min) clamped between [1.1*estn, 2.0*estn]
=====
Type codes (colClasses) : 5555544444444445444444444444225225522555545254452454454454454452454454454455
Type codes (drop|select) : 5555544444444445444444444444225225522555545254452454454454454452454454454455
Allocating 76 column slots (76 - 0 dropped)
Reading 90752 chunks of 1.000MB (2254 rows) using 64 threads
๋์์ด ๋๋ค๋ฉด ๋ค์์ ๋งค์ฐ ๊ธด ๋ฐ์ดํฐ๋ฒ ์ด์ค์ ๋ํ ๊ฒฐ๊ณผ์ ๋๋ค: 419,124,196 x 42(~2^34) ํ๋์ ํค๋ ํ๊ณผ colClasses๊ฐ ์ ๋ฌ๋์์ต๋๋ค.
> library(data.table)
data.table 1.10.5 IN DEVELOPMENT built 2017-09-27 17:12:56 UTC; travis
The fastest way to learn (by data.table authors): https://www.datacamp.com/courses/data-analysis-the-data-table-way
Documentation: ?data.table, example(data.table) and browseVignettes("data.table")
Release notes, videos and slides: http://r-datatable.com
> CC <- c(rep('integer', 2), rep('character', 3),
+ rep('numeric', 2), rep('integer', 3),
+ rep('character', 2), 'integer', 'character', 'integer',
+ rep('character', 4), rep('numeric', 11), 'character',
+ 'numeric', 'character', rep('numeric', 2),
+ rep('integer', 3), rep('numeric', 2), 'integer',
+ 'numeric')
> P <- fread('XXXX.csv', colClasses = CC, header = TRUE, verbose = TRUE)
Input contains no \n. Taking this to be a filename to open
[01] Check arguments
Using 40 threads (omp_get_max_threads()=40, nth=40)
NAstrings = [<<NA>>]
None of the NAstrings look like numbers.
show progress = 1
0/1 column will be read as boolean
[02] Opening the file
Opening file XXXXcsv
File opened, size = 51.71GB (55521868868 bytes).
Memory mapping ... ok
[03] Detect and skip BOM
[04] Arrange mmap to be \0 terminated
\r-only line endings are not allowed because \n is found in the data
[05] Skipping initial rows if needed
Positioned on line 1 starting: <<X,X,X,X>>
[06] Detect separator, quoting rule, and ncolumns
Detecting sep ...
sep=',' with 100 lines of 42 fields using quote rule 0
Detected 42 columns on line 1. This line is either column names or first data row. Line starts as: <<X,X,X,X>>
Quote rule picked = 0
fill=false and the most number of columns found is 42
[07] Detect column types, good nrow estimate and whether first row is column names
'header' changed by user from 'auto' to true
Number of sampling jump points = 101 because (55521868866 bytes from row 1 to eof) / (2 * 13006 jump0size) == 2134471
Type codes (jump 000) : 5161010775551055105101111111111111110110771117717 Quote rule 0
Type codes (jump 022) : 5561010775551055105101111111111111110110771117717 Quote rule 0
Type codes (jump 030) : 5561010775551055105101010107517171151110110771117717 Quote rule 0
Type codes (jump 037) : 5561010775551055105101010107517771171110110771117717 Quote rule 0
Type codes (jump 073) : 5561010775551055105101010107517771177110110771117717 Quote rule 0
Type codes (jump 093) : 5561010775551055105101010107717771177110110771117717 Quote rule 0
Type codes (jump 100) : 5561010775551055105101010107717771177110110771117717 Quote rule 0
=====
Sampled 10049 rows (handled \n inside quoted fields) at 101 jump points
Bytes from first data row on line 1 to the end of last row: 55521868866
Line length: mean=132.68 sd=6.00 min=118 max=425
Estimated number of rows: 55521868866 / 132.68 = 418453923
Initial alloc = 460299315 rows (418453923 + 9%) using bytes/max(mean-2*sd,min) clamped between [1.1*estn, 2.0*estn]
=====
[08] Assign column names
[09] Apply user overrides on column types
After 11 type and 0 drop user overrides : 551010107755510105105101010107777777777710710775557757
[10] Allocate memory for the datatable
Allocating 42 column slots (42 - 0 dropped) with 460299315 rows
[11] Read the data
jumps=[0..52960), chunk_size=1048373, total_size=55521868441
Read 98%. ETA 00:00
[12] Finalizing the datatable
Read 419124195 rows x 42 columns from 51.71GB (55521868868 bytes) file in 13:42.935 wall clock time
Thread buffers were grown 0 times (if all 40 threads each grew once, this figure would be 40)
Final type counts
0 : drop
0 : bool8
0 : bool8
0 : bool8
0 : bool8
11 : int32
0 : int64
19 : float64
0 : float64
0 : float64
12 : string
=============================
0.000s ( 0%) Memory map 51.709GB file
0.016s ( 0%) sep=',' ncol=42 and header detection
0.016s ( 0%) Column type detection using 10049 sample rows
188.153s ( 23%) Allocation of 419124195 rows x 42 cols (125.177GB)
634.751s ( 77%) Reading 52960 chunks of 1.000MB (7901 rows) using 40 threads
= 0.121s ( 0%) Finding first non-embedded \n after each jump
+ 17.036s ( 2%) Parse to row-major thread buffers
+ 616.184s ( 75%) Transpose
+ 1.410s ( 0%) Waiting
0.000s ( 0%) Rereading 0 columns due to out-of-sample type exceptions
822.935s Total
> memory.size()
[1] 134270.3
> rm(P)
> gc()
used (Mb) gc trigger (Mb) max used (Mb)
Ncells 585532 31.3 5489235 293.2 6461124 345.1
Vcells 1508139082 11506.2 20046000758 152938.9 25028331901 190951.1
> memory.size()
[1] 87.56
> P <- fread('XXXX.csv', colClasses = CC, header = TRUE, verbose = TRUE)
Input contains no \n. Taking this to be a filename to open
[01] Check arguments
Using 40 threads (omp_get_max_threads()=40, nth=40)
NAstrings = [<<NA>>]
None of the NAstrings look like numbers.
show progress = 1
0/1 column will be read as boolean
[02] Opening the file
Opening file XXXX.csv
File opened, size = 51.71GB (55521868868 bytes).
Memory mapping ... ok
[03] Detect and skip BOM
[04] Arrange mmap to be \0 terminated
\r-only line endings are not allowed because \n is found in the data
[05] Skipping initial rows if needed
Positioned on line 1 starting: <<X,X,X,X>>
[06] Detect separator, quoting rule, and ncolumns
Detecting sep ...
sep=',' with 100 lines of 42 fields using quote rule 0
Detected 42 columns on line 1. This line is either column names or first data row. Line starts as: <<X,X,X,X>>
Quote rule picked = 0
fill=false and the most number of columns found is 42
[07] Detect column types, good nrow estimate and whether first row is column names
'header' changed by user from 'auto' to true
Number of sampling jump points = 101 because (55521868866 bytes from row 1 to eof) / (2 * 13006 jump0size) == 2134471
Type codes (jump 000) : 5161010775551055105101111111111111110110771117717 Quote rule 0
Type codes (jump 022) : 5561010775551055105101111111111111110110771117717 Quote rule 0
Type codes (jump 030) : 5561010775551055105101010107517171151110110771117717 Quote rule 0
Type codes (jump 037) : 5561010775551055105101010107517771171110110771117717 Quote rule 0
Type codes (jump 073) : 5561010775551055105101010107517771177110110771117717 Quote rule 0
Type codes (jump 093) : 5561010775551055105101010107717771177110110771117717 Quote rule 0
Type codes (jump 100) : 5561010775551055105101010107717771177110110771117717 Quote rule 0
=====
Sampled 10049 rows (handled \n inside quoted fields) at 101 jump points
Bytes from first data row on line 1 to the end of last row: 55521868866
Line length: mean=132.68 sd=6.00 min=118 max=425
Estimated number of rows: 55521868866 / 132.68 = 418453923
Initial alloc = 460299315 rows (418453923 + 9%) using bytes/max(mean-2*sd,min) clamped between [1.1*estn, 2.0*estn]
=====
[08] Assign column names
[09] Apply user overrides on column types
After 11 type and 0 drop user overrides : 551010107755510105105101010107777777777710710775557757
[10] Allocate memory for the datatable
Allocating 42 column slots (42 - 0 dropped) with 460299315 rows
[11] Read the data
jumps=[0..52960), chunk_size=1048373, total_size=55521868441
Read 98%. ETA 00:00
[12] Finalizing the datatable
Read 419124195 rows x 42 columns from 51.71GB (55521868868 bytes) file in 05:04.910 wall clock time
Thread buffers were grown 0 times (if all 40 threads each grew once, this figure would be 40)
Final type counts
0 : drop
0 : bool8
0 : bool8
0 : bool8
0 : bool8
11 : int32
0 : int64
19 : float64
0 : float64
0 : float64
12 : string
=============================
0.000s ( 0%) Memory map 51.709GB file
0.031s ( 0%) sep=',' ncol=42 and header detection
0.000s ( 0%) Column type detection using 10049 sample rows
28.437s ( 9%) Allocation of 419124195 rows x 42 cols (125.177GB)
276.442s ( 91%) Reading 52960 chunks of 1.000MB (7901 rows) using 40 threads
= 0.017s ( 0%) Finding first non-embedded \n after each jump
+ 12.941s ( 4%) Parse to row-major thread buffers
+ 262.989s ( 86%) Transpose
+ 0.495s ( 0%) Waiting
0.000s ( 0%) Rereading 0 columns due to out-of-sample type exceptions
304.910s Total
> memory.size()
[1] 157049.7
> sessionInfo()
R version 3.4.2 beta (2017-09-17 r73296)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server >= 2012 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] data.table_1.10.5
loaded via a namespace (and not attached):
[1] compiler_3.4.2 tools_3.4.2
๋ช ๊ฐ์ง ๋ฉ๋ชจ์ ๋๋ค. colClasses๊ฐ ์ ๋ฌ๋๋ฉด ํ์ธํ ์ด์ ๊ฐ ์๋ค๋ ์ ์์ [09]๋ฅผ [07] ์์ ๋๋ ๊ฒ์ด ์ข์ต๋๋ค. ๋ํ Windows๋ ๊ฐ ์คํ ํ ์ฝ 160GB๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ผ๋ก ๋ํ๋ฌ์ต๋๋ค. memory.size()๋ ์๋ง๋ ์ฒญ์๋ฅผ ํ ๊ฒ์ ๋๋ค. ์ด ์๋ฒ์ 532GB RAM์ด ์๋ ๊ฒฝ์ฐ ๋ฉ๋ชจ๋ฆฌ ์บ์ฑ์ ๋ ๋ฒ์งธ ์คํ ์ ์๋ ์ฆ๊ฐ์ ๊ด๋ จ์ด ์์ ์ ์์ต๋๋ค. ๋์์ด ๋๊ธฐ๋ฅผ ๋ฐ๋๋๋ค.
๊ด๋ฒ์ํ "์ค์ " ํ
์ด๋ธ(๋ณ์ ๋ฐ์ดํฐ)์์ ํ
์คํธ: 30M ํ ร 125์ด v readr '1.2.0' ๋ฐ read.csv
3.4.3.
๋ฌธ์ ๋ฅผ ํ์ธํ ๊ธฐํ๊ฐ 1.11.4์์๋ ์ฌ์ ํ ์ ํจํฉ๋๊น? ๋๋ ์์ ๋ฐ์ดํฐ๋ฅผ ์์ฑํ๋ ์ฝ๋.
์ด๊ฒ์ ๋ด๊ฐ ์๋ ํ ๋ชจ๋ ํด๊ฒฐ๋์์ต๋๋ค. @geponce ๊ทธ๋ ์ง ์์ ๊ฒฝ์ฐ ์
๋ฐ์ดํธํ์ญ์์ค.
์์ TODO1์ ์ด์ #3024๋ก ์ ์ถ๋์์ต๋๋ค.
์์ TODO2๋ ์ด์ #3025๋ก ์ ์ถ๋์์ต๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
๊ด๋ฒ์ํ "์ค์ " ํ ์ด๋ธ(๋ณ์ ๋ฐ์ดํฐ)์์ ํ ์คํธ: 30M ํ ร 125์ด v readr '1.2.0' ๋ฐ
read.csv
3.4.3.