Sunday, October 1, 2017

memory - Debian (wheezy) force cache to RAM



I have Linux server running about 6 game servers. I have 3 GB total of RAM but I use only about 500 MB. Is there a way to cache one of my game servers (all the files - even not actually used maps etc. - about 1,5 GB) to RAM?



The reason I want to do this is because my Linux server is virtual and the hard drives ar very slow, so there is really big IO wait time.




IO: http://i.stack.imgur.com/7HLhB.png


Answer



You could simply read each file? That would put them in the cache, so long as nothing else needs that space after you 'read' them.



I think you can accomplish this by just greping each file that you want cached, or use it on the directory with the recursive option to cache every file in said directory.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...