차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
game:mc:linux_server_using_ramdisk [2011/05/12 01:33] – vaslor | game:mc:linux_server_using_ramdisk [2014/03/19 02:36] (현재) – 바깥 편집 127.0.0.1 | ||
---|---|---|---|
줄 1: | 줄 1: | ||
+ | ======Linux Server Using Ramdisk for Minecraft====== | ||
+ | |||
+ | * 출처: http:// | ||
+ | |||
+ | ======Ramdisk Introduction====== | ||
+ | Conventionally, | ||
+ | |||
+ | ======Advantages and Disadvantages====== | ||
+ | =====Advantages===== | ||
+ | * 빠르다. | ||
+ | |||
+ | =====Disadvantages===== | ||
+ | * 컴이 꺼지면 날라감 | ||
+ | * 램용량 | ||
+ | |||
+ | ======Why it makes sense for Minecraft servers====== | ||
+ | In a Minecraft server, one of the strongest bottlenecks are disk I/O related operations (e.g. chunk management). By moving the data into the RAM, access times will be near instant and data transfer rates will be significantly faster, making chunk loading and saving much faster operations. Since a Minecraft world currently consists of of very many chunk files split over many folders, seek time is equally, if not more, important for overall speed. | ||
+ | |||
+ | ======Basic Minecraft and ramdisk setup====== | ||
+ | (Make sure to back up your files if you don't know exactly what you are going to do!) | ||
+ | |||
+ | =====Linux===== | ||
+ | On most Linux distributions there is already a ramdisk set up (usually mounted to /dev/shm (''' | ||
+ | |||
+ | It is possible to move anything into the ramdisk, but here I will focus on just moving the map into it and leaving the server files on the conventional drive. | ||
+ | |||
+ | Given the following basic server directory " | ||
+ | |||
+ | We will want to move " | ||
+ | |||
+ | < | ||
+ | $ cd ~/ | ||
+ | $ cp world/ world_storage/ | ||
+ | </ | ||
+ | |||
+ | Now with the old world in a safe location, we can go ahead and move the world into the ram-disk | ||
+ | |||
+ | < | ||
+ | $ mkdir / | ||
+ | $ mv world/ / | ||
+ | </ | ||
+ | |||
+ | By now, the world is loaded into the RAM, but the Minecraft server doesn' | ||
+ | |||
+ | < | ||
+ | $ ln -s / | ||
+ | </ | ||
+ | |||
+ | This will create a link to "/ | ||
+ | |||
+ | Now we need to take care of the volatility of the ramdisk, by periodically saving the world from the RAM into " | ||
+ | |||
+ | First, we need a script that can be called by cron (it doesn' | ||
+ | |||
+ | < | ||
+ | #!/bin/sh | ||
+ | |||
+ | VOLATILE="/ | ||
+ | PERMANENT="/ | ||
+ | |||
+ | #TODO: Check if both directories actually exist, skipped here for clearness | ||
+ | rsync -r -t -v " | ||
+ | </ | ||
+ | |||
+ | 이제 [[crontab]]을 이용하여 자동 싱크... | ||
+ | |||
+ | < | ||
+ | $ crontab -e | ||
+ | </ | ||
+ | |||
+ | You will be put into an editor (more precisely: the editor in your " | ||
+ | |||
+ | < | ||
+ | */5 * * * * bash / | ||
+ | </ | ||
+ | |||
+ | * 출처 http:// | ||
+ | |||
+ | ^ [[|배슬로넷 마인크래프트 위키]]입니다. 마음에 안드는 내용이 있으면 욕하지 말고 니가 고치세요. 퍼가면 가문의 영광. 댓글은 굽신굽신. 게시판은 [[: | ||
+ | |||
+ | {{tag> | ||