# Problems under vmware ESXi



## Dara (Feb 18, 2009)

Hi, i am having some problems with a freebsd server guest under vmware ESXi and was hoping for some help.

The problem is that the systems is slow and seems to freeze every other minute or so for a second or two and a cant find any errors, so if anybody have any tips/tricks for finding whats wrong that would be great..

Info:
FreeBSD kalle.hobbe.something 7.0-RELEASE FreeBSD 7.0-RELEASE #0: Wed Oct 29 14:35:04 CET 2008     drift@kalle.hobbe.something:/usr/obj/usr/src/sys/KALLE  amd64

I have recompiled the kernel to get ULE, and i have tried putting kern.hz=100 in /boot/loader.conf.

I got nothing in the logs

If i cant solve this i have to try to move everything to fbsd 7.1 and see if that solves the problem but there is allot of websites so i rather not..


----------



## vermaden (Feb 18, 2009)

show outputs of these:
# vmstat -i
# vmstat -c 5
# w
# top -s 1 -d 2 -S
# iostat -x -c 5


----------



## Dara (Feb 18, 2009)

[drift@kalle ~]$ vmstat -i
interrupt                          total       rate
irq1: atkbd0                          16          0
irq6: fdc0                            13          0
irq14: ata0                           57          0
irq17: mpt0                      1647970          0
irq18: em0                      16147861          2
cpu0: timer                   1466604053        199



[drift@kalle ~]$ vmstat -c 5
 procs      memory      page                    disks     faults      cpu
 r b w     avm    fre   flt  re  pi  po    fr  sr da0 pa0   in   sy   cs us sy id
 0 0 0  918992 191744     8   0   0   0     8   0   0   0    2   32  254  1  1 98
 0 0 0  918992 191744     0   0   0   0     0   0   0   0    8  131  284  0 64 36
 0 0 0  918992 191744     0   0   0   0     0   0   0   0    2  117  257  0  0 100
 0 0 0  918992 191744     0   0   0   0     0   0   0   0    5  123  268  0  7 93
 0 0 0  918992 191744     0   0   0   0     0   0   0   0    3  121  266  0  7 93


[drift@kalle ~]$ w
 2:49PM  up 84 days, 22:02, 1 user, load averages: 0.00, 0.00, 0.00
USER             TTY      FROM              LOGIN@  IDLE WHAT
drift            p0       me.mynet.c 11:22AM     - w


last pid: 13014;  load averages:  0.00,  0.00,  0.00 up 84+22:03:03  14:49:28
87 processes:  3 running, 68 sleeping, 16 waiting
CPU states:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% idle
Mem: 665M Active, 901M Inact, 252M Wired, 46M Cache, 214M Buf, 139M Free
Swap: 2048M Total, 2048M Free

  PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
   11 root        1 171 ki31     0K    16K RUN    1996.5 86.96% idle: cpu0
  578 www        11  44    0   676M   601M ucond   19.6H  3.91% python2.4
13010 www         1   4    0   146M 21280K accept   0:00  0.98% httpd
13014 drift       1  47    0  7656K  2128K RUN      0:00  0.98% top
   38 root        1  20    -     0K    16K syncer 332:25  0.00% syncer
   12 root        1 -32    -     0K    16K WAIT   228:13  0.00% swi4: clock sio
    4 root        1  -8    -     0K    16K -       21:15  0.00% g_down
   26 root        1 -68    -     0K    16K -       10:02  0.00% em0 taskq
  655 root        1  44    0 10576K  3276K select  10:02  0.00% sendmail
  665 root        1   8    0  5736K  1244K nanslp   7:24  0.00% cron
    3 root        1  -8    -     0K    16K -        6:05  0.00% g_up
   20 root        1 -40    -     0K    16K WAIT     5:05  0.00% swi2: cambio
   15 root        1 -16    -     0K    16K -        4:15  0.00% yarrow
    2 root        1  -8    -     0K    16K -        3:29  0.00% g_event
82284 root        1  45    0   146M 21212K select   3:02  0.00% httpd
  513 root        1  44    0  4684K  1236K select   2:43  0.00% syslogd
   39 root        1 -16    -     0K    16K sdflus   2:39  0.00% softdepflush
   14 root        1 -44    -     0K    16K WAIT     2:14  0.00% swi1: net
  571 root        1  44    0 45452K 11336K select   2:09  0.00% python2.4
  577 root        1  44    0 36932K  8856K select   2:04  0.00% python2.4
  659 smmsp       1  20    0 10576K  3016K pause    1:32  0.00% sendmail
  572 root        1  44    0 48660K 12112K select   1:32  0.00% python2.4
   24 root        1 -64    -     0K    16K WAIT     0:34  0.00% irq17: mpt0
   36 root        1 -16    -     0K    16K psleep   0:31  0.00% bufdaemon
   37 root        1  -4    -     0K    16K vlruwt   0:26  0.00% vnlru
   31 root        1  -8    -     0K    16K -        0:25  0.00% fdc0
   33 root        1 -16    -     0K    16K psleep   0:17  0.00% pagedaemon
    1 root        1   8    0  1928K   356K wait     0:17  0.00% init
10850 root        1  44    0 20960K  3336K select   0:05  0.00% sshd
12452 www         1  44    0   147M 21668K select   0:02  0.00% httpd
12387 www         1   4    0   147M 21644K accept   0:02  0.00% httpd


[drift@kalle ~]$ iostat -x -c 5
                        extended device statistics
device     r/s   w/s    kr/s    kw/s wait svc_t  b
da0        0.0   0.3     0.1     4.2    0   3.8   0
pass0      0.0   0.0     0.0     0.0    0   0.0   0
                        extended device statistics
device     r/s   w/s    kr/s    kw/s wait svc_t  b
da0        0.0   0.0     0.0     0.0    0   0.0   0
pass0      0.0   0.0     0.0     0.0    0   0.0   0
                        extended device statistics
device     r/s   w/s    kr/s    kw/s wait svc_t  b
da0        0.0   0.0     0.0     0.0    0   0.0   0
pass0      0.0   0.0     0.0     0.0    0   0.0   0
                        extended device statistics
device     r/s   w/s    kr/s    kw/s wait svc_t  b
da0        0.0   0.0     0.0     0.0    0   0.0   0
pass0      0.0   0.0     0.0     0.0    0   0.0   0
                        extended device statistics
device     r/s   w/s    kr/s    kw/s wait svc_t  b
da0        0.0   0.0     0.0     0.0    0   0.0   0
pass0      0.0   0.0     0.0     0.0    0   0.0   0

Anything that looks strange ?


----------



## vermaden (Feb 18, 2009)

In the future use [ code ] tag for commands output.

Stats look good, do these freezes occure with high network load? If yes you may also try using software interupts for your FreeBSD network interface using poilling(4).

example configuration @ /etc/rc.conf

```
-ifconfig_em0="DHCP"
+ifconfig_em0="DHCP polling"
```
You will also propably have to recompile kernel with device polling.

But I am not sure if it will really help here, what about your ESX load btw?


----------



## Dara (Feb 18, 2009)

Ok, i will try that. The load isent high at all so its a little bit weird.. i have bean running allot of FreeBSD on ESXi for a while now but never seen this before, but its a first time for everything so.


----------



## r-c-e (Feb 18, 2009)

are you running vmware-guestd on the guest OS?


----------



## Dara (Feb 19, 2009)

Nope, no vmware-guestd, i could try that.


----------



## Bink (Jun 6, 2009)

I was also having performance issues, but with FreeBSD 7.2 AMD64 under VMware ESXi 3.5 u4.

I came across this advice:
VMware ESXi 3.5 - Performance regressions in FreeBSD 7.1[/color]

Following those simple steps have made a very noticable difference in performance to the system.  I'm still not sure I'm getting optimal performance, but its a lot better than it was.

It might be worth giving it a go.


----------

