Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to add temporary files to /dev/shm with my VMware but I found this hack to improve the perfomance of the vm:

mount -t tmpfs -o size=5G,nr_inodes=5k,mode=700 tmpfs /disk2/tmpfs

But I don't know what it's doing (it's adaptive ramdisk) and why it could help to improve the performance? Do I've add this to my fstab? This is my vmware settings:

#temp directory 
tmpDirectory="/disk2/tmpfs"
# bugfix
host.cpukHz = "2200000"
host.noTSC = "TRUE"
ptsc.noTSC = "TRUE"
# I/O fix
prefvmx.useRecommendedLockedMemSize = "TRUE"
prefvmx.minVmMemPct = "100"
# temp file fix
mainMem.useNamedFile = "FALSE"
MemTrimRate=0
MemAllowAutoScaleDown = "FALSE"
# Cpu fix
mem.ShareScanTotal=0
mem.ShareScanVM=0
mem.ShareScanThreshold=2024
sched.mem.maxmemctl=0
sched.mem.pshare.enable = "FALSE"
# Disable 3d
mks.enable3d = "true"

Maybe this is the correct command: tmpfs /dev/shm tmpfs defaults,size=5G,nr_inodes=5k,mode=700 0 0?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

FYI, this setting increased the performance of my guest box a lot. My host is a 64 bit Linux box with BFS and the timer is at 1500hz. If you can enjoy virtualization like I do I would like to recommend to check this out. My box has 6GB physical ram and I created a 5GB ramdisk but it should also work with only 2GB of physical ram. tmpfs seems to dynamically allocate wanted ram. host.cpukHz needs to be exactly the host box cpu speed. mem.ShareScanThreshold needs to be exactly the guest box ram size. Start the guest box and install the vmware tools and let it install the virtual drivers for the hardisk, video card and so on. I've created a guest box with Windows XP SP3 OS and it works like a charm. It could be a little faster but my box is cpu limited. It's only a 2.2Ghz 64 bit dual core cpu and it's doesn't support hyperthreading. It's also good if the guest box has enough ram (2GB).

# create a ramdisk    
tmpfs /dev/shm tmpfs defaults,size=5G,nr_inodes=5k,mode=700 0 0

#temp directory 
tmpDirectory="/dev/shm"
# bugfix
host.cpukHz = "2200000"
host.noTSC = "TRUE"
ptsc.noTSC = "TRUE"
# I/O fix
prefvmx.useRecommendedLockedMemSize = "TRUE"
prefvmx.minVmMemPct = "100"
# temp file fix
mainMem.useNamedFile = "FALSE"
MemTrimRate=0
MemAllowAutoScaleDown = "FALSE"
# Cpu fix
mem.ShareScanTotal=0
mem.ShareScanVM=0
mem.ShareScanThreshold=2024
sched.mem.maxmemctl=0
sched.mem.pshare.enable = "FALSE"
# Disable 3d
mks.enable3d = "true"

Here is some explanation: http://vmfaq.com/entry/25/. It's also good to compile a kernel with max 1khz timer freqquency.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.