Monthly Archives: July 2011

Vmware Server 2 high cpu waiting time problem

The following observations are made on VmWare Server 2.0.2, with Debain 6.0 Host and Windows 2008R2 Guests, all systems being x64. The host has a Core2Quad CPU and 8GB of RAM.

A previously healthy environment turned very slow after setting up another Windows guest on the same host. The Windows guest system “felt slow” in the way that the GUI froze for seconds, and that loading times were very slow. The Linux host appeared healthy (immediate command line response, no swap usage, plenty of disk available). The top command revealed very high “waiting time”. I first interpreted this as an I/O problem… but it was not.

The three Windows guests all had 2 virtual cpus, making a total of 6 virtual CPUs running on four physical cores (I do believe it is four cores, not two cores with four threads, not 100% there). Assigning just one virtual CPU to each virtual guest essentially solved to problems.

Conclusion: Avoid virtual SMP in Vmware Server 2, unless you have “enough” physical cores.

Perhaps I will try a one-dual-cpu plus three-single-cpu configuration some day to see how that works.

VmWare Server 2 web console in Linux, Chrome

The web interface of VmWare Server 2 comes with a console, that requires a browser plugin. I have been struggling with Firefox in Linux a lot, and now running Chrome I started looking for another solution.

And there is a great solution: use VmWare player

Simply install vmware player in Linux and invoke it like:

  $ vmplayer -h

…login and enjoy!

It seems you have to use 8333 (8222 does not work).

Disable internal laptop display (Debian/Squeeze)

I have an HP nc6220 laptop that is constantly docked and attached to an external display via DVI. I only want to use the external display, and leave the internal LCD off/black/unused. This used to work perfectly and automatically in Ubuntu 11.04.

A few days ago the hard drive broke. I replaced the hard drive and decided to use Debian 6.0 Squeeze instead. Unfortunately Debian decided to insist on using the built-in LCD as primary display. I could correct it using the Monitor application under Preferences, but as soon as the screen was locked or resolution was changed (Flash video or something) things broke and I had to go back to the internal display to reconfigure using the Monitor application.

There is a little utility called xrandr that can configure the display from the command line. For example, this is how to list available displays:

zo0ok@debian-workstation:~$ xrandr 
Screen 0: minimum 320 x 200, current 1600 x 1200, maximum 4096 x 4096
VGA1 disconnected (normal left inverted right x axis y axis)
LVDS1 disconnected (normal left inverted right x axis y axis)
DVI1 connected 1600x1200+0+0 (normal left inverted right x axis y axis) 408mm x 306mm
   1600x1200      60.0*+
   1280x1024      85.0     75.0     60.0  
   1280x960       60.0  
   1152x864       75.0  
   1024x768       85.0     75.1     70.1     60.0  
   832x624        74.6  
   800x600        85.1     75.0     60.3  
   640x480        85.0     75.0     60.0  
   720x400        70.1  
TV1 disconnected (normal left inverted right x axis y axis)

It is possible to disable displays and change resolution like this:

zo0ok@debian-workstation:~$ xrandr --output LVDS1 --off
zo0ok@debian-workstation:~$ xrandr --output DVI1 --mode 1600x1200

However, this is lost as soon as the display is locked or a full screen video is played.

Years ago fixing xorg.conf was always the way to make video work in Linux. Nowadays, you should not need to. But, to disable the internal display completely, hacking xorg.conf was needed. I was assisted using this article.

This is what I did:

$ xrandr (to list my video devices: DVI1 and LVDS1)

CTRL-ALT-F1 (to leave X)
(login as root)

(turn off X video)
# /etc/init.d/gdm3 stop

(to generate a sample /etc/X11/xorg.conf)
# Xorg -configure
# cp /root/ /etc/X11/xorg.conf

(edit xorg.conf)
# vim /etc/X11/xorg.conf

(start X again)
# /etc/init.d/gdm3 start

Of course, I needed to edit xorg.conf and restart gdm3 several times until I was satisfied.

One thing to note is how the Option “Monitor-XXX” contains the device name from xrandr.
The entire file xorg.conf follows, it is mostly auto generated, the critical parts are bold:

Section "ServerLayout"
        Identifier     " Configured"
        Screen      0  "Screen1" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"

Section "Files"
        ModulePath   "/usr/lib/xorg/modules"
        FontPath     "/usr/share/fonts/X11/misc"
        FontPath     "/usr/share/fonts/X11/cyrillic"
        FontPath     "/usr/share/fonts/X11/100dpi/:unscaled"
        FontPath     "/usr/share/fonts/X11/75dpi/:unscaled"
        FontPath     "/usr/share/fonts/X11/Type1"
        FontPath     "/usr/share/fonts/X11/100dpi"
        FontPath     "/usr/share/fonts/X11/75dpi"
        FontPath     "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
        FontPath     "built-ins"

Section "Module"
        Load  "record"
        Load  "glx"
        Load  "dri"
        Load  "dbe"
        Load  "extmod"
        Load  "dri2"

Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"

Section "InputDevice"
        Identifier  "Mouse0"
        Driver      "mouse"
        Option      "Protocol" "auto"
        Option      "Device" "/dev/input/mice"
        Option      "ZAxisMapping" "4 5 6 7"

Section "Monitor"
        Identifier   "External DVI"
        Option "Enable" "true"
        Option "PreferredMode" "1600x1200"

Section "Monitor"
        Identifier   "Integrated LCD"
        Option "Ignore" "true"

Section "Device"
        ### Available Driver options are:-
        ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
        ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
        ### [arg]: arg optional
        #Option     "AccelMethod"               # [<str>]
        #Option     "DRI"                       # [<bool>]
        #Option     "ColorKey"                  # <i>
        #Option     "VideoKey"                  # <i>
        #Option     "FallbackDebug"             # [<bool>]
        #Option     "Tiling"                    # [<bool>]
        #Option     "Shadow"                    # [<bool>]
        #Option     "SwapbuffersWait"           # [<bool>]
        #Option     "XvMC"                      # [<bool>]
        #Option     "XvPreferOverlay"           # [<bool>]
        #Option     "DebugFlushBatches"         # [<bool>]
        #Option     "DebugFlushCaches"          # [<bool>]
        #Option     "DebugWait"                 # [<bool>]
        Identifier  "Card0"
        Driver      "intel"
        VendorName  "Intel Corporation"
        BoardName   "Mobile 915GM/GMS/910GML Express Graphics Controller"
        BusID       "PCI:0:2:0"
        Option      "Monitor-DVI1" "External DVI"
        Option      "Monitor-LVDS1" "Integrated LCD"

Section "Screen"
        Identifier "Screen1"
        Device     "Card0"
        Monitor    "External DVI"
        SubSection "Display"
                Viewport   0 0
                Depth     1
        SubSection "Display"
                Viewport   0 0
                Depth     4
        SubSection "Display"
                Viewport   0 0
                Depth     8
        SubSection "Display"
                Viewport   0 0
                Depth     15
        SubSection "Display"
                Viewport   0 0
                Depth     16
        SubSection "Display"
                Viewport   0 0
                Depth     24