www.centos.org Forum Index CentOS 6 - General Support Please help me setup ramdisk
|
Bottom Previous Topic Next Topic |
| |
|
|
|---|
| Poster | Thread |
|---|
|
Re: Please help me setup ramdisk | #6 |
|
|---|---|---|---|
|
Professional Board Member
![]()
Joined: 2006/12/30
From Colorado, USA
Posts: 457
|
Besides, how do you know I/O is the bottleneck?
Unless it's all local LAN traffic, I'm betting bandwidth is more of a bottleneck then normal Hard Drive I/O access. But why guess, benchmark your system and find out where the slow points are. |
||
Posted on: 2012/1/18 0:13
|
|||
|
Re: Please help me setup ramdisk | #5 |
|
|---|---|---|---|
|
Moderator
![]()
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
|
You are still assuming that a RAM disk it the best way to use your resources. If you allocate large chunks of RAM to ramdisks then performance may well suffer greatly when the system starts swapping. More total RAM, faster disks, or SSD will be more likely to improve performance than use of ramdisks.
If still determined to proceed, try a forum search for ramdisk. You will find some examples, and a lot more counter-arguments. |
||
|
_________________
Phil Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions |
|||
Posted on: 2012/1/17 22:37
|
|||
|
Re: Please help me setup ramdisk | #4 |
|
|---|---|---|---|
|
Moderator
![]()
Joined: 2009/9/24
From Brighton, UK
Posts: 6376
|
It already is.
Linux will cache the most recently used files in RAM for later use. It'll adjust what is in the cache so that it contains the most recently used programs and files. If you subtract a portion of that RAM and force it to contain what you think it should then you are overriding the operating system and taking space away from it that it would use for the most useful purpose at the time. If you're really intent on doing this then you could use /dev/shm - make a directory there and copy the files there that you want then point your application at that directory - e.g. /dev/shm/worlds. This uses tmpfs and that uses RAM and is backed by swapspace so if the system needs the RAM for more important purposes it'll swap tmpfs out. I have no idea how you reliably copy those files back to persistent storage to preserve the contents when the files have been changed. |
||
|
_________________
Linux/VoIP Systems Administrator |
|||
Posted on: 2012/1/17 22:36
|
|||
|
Re: Please help me setup ramdisk | #3 |
|
|---|---|---|---|
|
Newbie
![]()
Joined: 2012/1/17
From
Posts: 2
|
Here is my question revised.
How do you mount a folder to a ramdisk so access to files within the folder is cached in RAM to speed up read/write access since for my purposes read/write from the HDD does not offer the performance needed. Also do you have to unmount the ramdisk after backing up the data cached in RAM? Thanks. |
||
Posted on: 2012/1/17 22:04
|
|||
|
Re: Please help me setup ramdisk | #2 |
|
|---|---|---|---|
|
Moderator
![]()
Joined: 2006/12/13
From Tidewater, Virginia, North America
Posts: 18773
|
Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.
This seems to be a "How can I use X to do Y?" type question. I know of no good reason to do what you propose. What is your objective? If it is an attempt to optimize performance, you are almost certainly better off letting the OS manage your RAM for use as buffers rather than setting up ramdisks. If you want to isolate your "worlds" then perhaps you want to consider virtualization. |
||
|
_________________
Phil Recommended reading: FAQ & Readme first ; Search hint: google "your topic site:centos.org"; Smart Questions |
|||
Posted on: 2012/1/17 21:19
|
|||
|
Please help me setup ramdisk | #1 |
|
|---|---|---|---|
|
Newbie
![]()
Joined: 2012/1/17
From
Posts: 2
|
Hello,
I am new to linux and have been using CentOS 6 as a Minecraft server for about 2 months now. I rarely use the GUI and mostly use SSH to the server. I want to place my Minecraft worlds in a ramdisk but have not had much luck understanding how to do this. I have found bloated shell scripts that are not commented so I cannot break it down to understand. I would love a basic, beginners guide to help me out. All I want to do is assign a specific size to the ramdisk and load each world folder into its own ramdisk (maybe a single ramdisk if that's how it is supposed to be done), then start the server. I know data in a ram disk is volatile and would need to be backed up regularly. I have a backup plugin to do this. I appreciate any help you can offer. Thank you. |
||
Posted on: 2012/1/17 17:56
|
|||
Top Previous Topic Next Topic |
|



Topic options
Print Topic
Threaded
Oldest First
cschanzle






You cannot start a new topic.
You can view topic.