11 Replies Latest reply: Jan 10, 2011 9:30 AM by mudtoe RSS

    Performance tuning in Server 2.0

    prisoner881 Enthusiast

       

      Everyone has their favorite list of performance tweaks for the old 1.0 Server product.  MemTrimRate, pshare, etc.

       

       

       

       

       

      Has anyone applied these tweaks to the 2.0 product?  Do they still help with performance?  Do they even still exist as tweaks?

       

       

       

       

       

      I posted this question back in the RC2 forums and nobody ever responded.  Is nobody interested in improving VM performance under 2.0?

       

       

        • 1. Re: Performance tuning in Server 2.0
          DevotedDad Enthusiast

          I'm interested in this as well ... anyone?

          • 2. Re: Performance tuning in Server 2.0
            btone Hot Shot

            Not really did a lot of tuning myself but these are the thread that might help - if you haven't already found it:

             

            The struggle for disk IO scalability in Server 1.x and RC2

             

            Tips for Improving Performance On Linux Host

            • 3. Re: Performance tuning in Server 2.0
              Hochlehnert Novice

               

              Everything I did for Server 1.0 still works for 2.0

               

               

              Here's my setup for Debian Etch:

               

               

              General tuning. Add the following files to /etc/sysctl.conf:

               

               

              vm.dirty_background_ratio = 5

              vm.dirty_ratio = 100

               

               

              Tune network performance. Add the following files to /etc/sysctl.conf:

               

               

              net.core.wmem_max = 16777216

              net.core.rmem_max = 16777216

              net.ipv4.tcp_timestamps = 0

              net.ipv4.tcp_rmem = 4096 262144 16777216

              net.ipv4.tcp_wmem = 4096 262144 16777216

              net.core.optmem_max = 524288

              net.core.netdev_max_backlog = 200000

               

               

              Tune HD performance. Add the following lines to /etc/rc.local (change sda to your hd):

               

               

              echo "64" > /sys/block/sda/queue/max_sectors_kb        # This depends on the block size of your RAID controller

              echo "8192" > /sys/block/sda/queue/nr_requests

              blockdev --setra 16384 /dev/sda

               

               

              Add the following line to /etc/fstab (create the directory /tmp/vmware first ):

               

               

              tmpfs           /tmp/vmware             tmpfs   defaults,size=100%      0       0

               

               

              VMware setup (add the following lines to /etc/vmware/config):

               

               

              tmpDirectory = "/tmp/vmware"

              mainMem.useNamedFile = "FALSE"

              sched.mem.pshare.enable = "FALSE"

              MemTrimRate = "0"

              MemAllowAutoScaleDown = "FALSE"

              prefvmx.useRecommendedLockedMemSize = "TRUE"

              prefvmx.minVmMemPct = "100"

               

               

               

               

               

              After all that VMware Server is really fast (at least on my hosts).

               

               

              It has only one disadvantage. After "redirecting" the mmap file to the RAM the sum of all guest RAM is limited to the real RAM minus the VMware overhead. That's because the mmap file always uses always the full RAM specified for the guest, but I can live with that.

               

               

              BTW: This setup doesn't double the RAM usage.

               

               

               

               

               

              • 4. Re: Performance tuning in Server 2.0
                prisoner881 Enthusiast

                What about all the tuning options for the individual VM's?  Do you no longer need to tweak the VM's if the VMWare config file is tweaked?

                • 5. Re: Performance tuning in Server 2.0
                  JohnInSJ Lurker

                  Wow... thanks for this. I've been struggling with server 2.0's performance under Ubuntu server and the tmpfs/server settings made a HUGE performance difference.

                  • 6. Re: Performance tuning in Server 2.0
                    projectserve Novice

                    Im new to VMware server 2. and im running it on a windows server 2008 x64 machine.

                    Can i use those options aswell in windows? yes; where to put it.. can't find a config file..

                    Cause my guest systems are way slow; running a Quad core Xeon, 8Gb ECC and 6x WDC Veliciraptor @ raid 5.

                     

                     

                    VMware setup (add the following lines to /etc/vmware/config):

                     

                     

                    tmpDirectory = "/tmp/vmware"

                    mainMem.useNamedFile = "FALSE"

                    sched.mem.pshare.enable = "FALSE"

                    MemTrimRate = "0"

                    MemAllowAutoScaleDown = "FALSE"

                    prefvmx.useRecommendedLockedMemSize = "TRUE"

                    prefvmx.minVmMemPct = "100"

                    • 7. Re: Performance tuning in Server 2.0
                      JohnInSJ Lurker

                      I know the answer to this one.

                       

                      On windows you don't need to do a lot - setting mainMem.useNamedFile = "FALSE" in the vm's .vmx file is sufficient to keep it from doing the stupid memory-backed file thing

                       

                      Lots of good info on .vmx file settings is at http://sanbarrow.com/vmx/vmx-config-ini.html

                      • 8. Re: Performance tuning in Server 2.0
                        KhaledC Lurker

                         

                        Hi,

                         

                         

                        I just wanted to add my experiences with this in the hope that it helps others as you have all helped me so much!

                         

                         

                        I have a decent host setup

                         

                         

                        Supermicro X5DP8

                        Dual Xeon 3.06Ghz

                        8GB RAM

                        4 SATA Disks in Raid 5 (vmware images partition)

                        Single SATA boot disk (Ubuntu etc...)

                         

                         

                        I was using Ubuntu 6.06 server for quite a while with vmware server 1.0.x (starting with .1 and ending with .7)

                        I upgraded regularly when newer versions would be released, and never faced any issues with the guests performance.

                         

                         

                        I recently upgraded to Ubuntu 8.10 server and took the opportunity to upgrade to vmware server 2.0.

                         

                         

                        Now that i'm using server 2.0 - i experienced some performance problems - it looked like they had something to do with disk performance.

                         

                         

                        Symptoms

                         

                         

                        On a win2k3 guest, i have a network share with some DVD photo backup ISO files (about 3.5 - 4Gb each)

                        I have a share mapped to one of my XP desktops and through that, i started to copy one of the DVDs to check some images.

                        Initially the transfer window stated the ETA to be 9 minutes or so, after a couple hundred MB, it started increasing, and within seconds it was up to about 230 Minutes!!! - something is not right!

                         

                         

                        did some troubleshooting, isolating the problems, eventually i searched on google and found the post which linked to this one (thank you!!)

                         

                         

                        I didnt want to do all the steps in one go, so all i did was:

                         

                        • The /etc/fstab modification

                        • The vmware config file modifications

                         

                         

                         

                        Well, tried the file copy operation again, and it worked perfectly, took about 8-9 minutes to transfer the 3.5Gb.

                         

                         

                        Thanks for all the effort everyone has put in to document their experiences.

                         

                         

                         

                         

                         

                        • 9. Re: Performance tuning in Server 2.0
                          ancker Novice

                           

                          Do you really set the:

                           

                           

                          vm.dirty_ratio = 100 ?

                           

                           

                          or

                           

                           

                          vm.dirty_ratio = 10 ?

                           

                          thanks.

                          • 10. Re: Performance tuning in Server 2.0
                            mudtoe Enthusiast

                            This is great information, thanks!   I've got a dual core laptop with 4gb of memory in it that I leave running at my vacation home in Florida, which I use for offsite backups, a backup proxy server, and a few other things.  I've got Ubuntu 9.1 server running on it as host with VMWare Server 2 installed.  In theory I have enough memory to run two or perhaps three Windows VMs on it at the same time, but in practice if I run more than one VM, after a while I have performance problems.  It looks like what eventually happens is that whichever Windows VM is doing the least work gets the vast majority of its pages swapped to disk.  Once that happens it's almost impossible to cause enough of the pages to be swapped back in for the VM to function normally again (takes about 20 minutes or longer) without shutting it down and powering it back on.  Instead it looks like the vast majority of the memory ends up in the Ubuntu disk cache, and there doesn't appear to be a way to control the maximum amount of memory the disk cache is allowed to use.    I had tried the host memory settings configurable from the VMWare server gui, but without results.   After reading this thread I now understand why.

                             

                            I'm reluctant to edit the fstab entry remotely, just in case I goof it up and the system won't reboot, so I'll have to wait until I'm back down there in a couple of weeks to try it.  So essentially what this is doing is creating a RAM disk and forcing VMWare to use that to swap pages?   My only question is does this end up taking up twice as much real memory as the VMs are actually using (e.g. one time for the actual pages in real memory, and a second time for the RAM disk file that backs the real memory)? 

                             

                             

                            mudtoe

                             

                             

                            P.S.  Yes, I know this thread is several years old, but the information here seems just as applicable today as when it was originally posted.

                            • 11. Re: Performance tuning in Server 2.0
                              mudtoe Enthusiast

                              I tested the fstab change on another local machine before updating the one in Florida, and the only issue was that the /tmp directory kept getting cleared at reboot (i.e. /tmp/vmware directory entry gone each time), so I had to move it to /var/tmp/vmware.  As that worked OK and didn't cause a problem on the local machine I went and updated the machine in Florida.  The difference in performace after the changes is nothing short of amazing!  I can run VMs up to within about 256mb of the total amount of memory in the laptop, and they all run just fine, and don't get their pages stolen (the Ubuntu host doesn't do much else other than be a local dns server and an email MX backup site and nobody is ever directly logged on to it).

                               

                              This is a really great tip!  I'm sure there are lots of people who have tried VMWare Server in this environment and then abandoned it in favor of something else becaues the performance was crappy.  I was getting frustrated myself and thinking of trying one of the other packages available for Linux before I found this thread.  I was also looking for all kinds of ways to try to control the size of the linux disk cache, manually fix process pages in memory, in an effort to stop the VM's pages from being stolen.  It's a real shame that VMWare doesn't document these issues better and/or offer some better default settings when you install the product, as they are hurting their product's reputation by not doing so.

                               

                               

                              mudtoe