본문 바로가기
데이터베이스

[MySQL]대용량 데이터 처리 Option (innodb_buffer_pool_size)

by 공장장코난 2021. 10. 16.

업무에 대용량 데이터를 핸들링할 일이 생겼다. Query의 속도도 문제지만 해당 데이터를 불러와 loading해야 하는데
실행되지 않는다. 이때 innodb_buffer_pool_size를 조정, 문제를 해결 했다. 

# InnoDB, unlike MyISAM, uses a buffer pool to cache both indexes and
# row data. The bigger you set this the less disk I/O is needed to
# access data in tables. On a dedicated database server you may set this
# parameter up to 80% of the machine physical memory size. Do not set it
# too large, though, because competition of the physical memory may
# cause paging in the operating system.  Note that on 32bit systems you
# might be limited to 2-3.5G of user level memory per process, so do not
# set it too high.
innodb_buffer_pool_size=8M

기본값은 8M 크기로 1G 정도로 변경 후 해결되었는데 my.ini에서도 언급되었듯이 너무큰 값은 설정하지
말란다.