matthew.r.rohrer | 1 Sep 2010 01:00
Favicon

Degrading Network performance as KVM/kernel version increases

I have been getting degrading network performance with newer versions of
KVM and was wondering if this was expected?  It seems like a bug, but I
am new to this and maybe I am doing something wrong so I thought I would
ask.

KVM Host OS: Fedora 12 x86_64
KVM Guest OS Tiny Core Linux 2.6.33.3 kernel

I have tried multiple host kernels 2.6.31.5, 2.6.31.6, 2.6.32.19 and
2.6.35.4 along with versions qemu-kvm 11.0 and qemu-system-x86_64 12.5
compiled from from qemu-kvm repo.

Setup is: 2 hosts with 1 guest on each connected by 10 Gb nic.

I am using virtio and have checked that hardware acceleration is
working.

Processor usage is less than 50% on host and guests. 

Here is what I am seeing, I will just include guest to guest statistics,
I do have more (host to guest, etc.) if interested:

With kernel 2.6.31.5 and usign qemu-kvm 11.0  1.57 Gb/s (guest 1 to
guest 2)  then 1.37 Gb/s (guest 2 to guest 1) with a single iperf
thread.
With kernel 2.6.31.5 and usign qemu-kvm 11.0  3.16 Gb/s (guest 1 to
guest 2)  then 4.29 Gb/s (guest 2 to guest 1) with 4 (P4) iperf threads.

With kernel 2.6.31.5 and usign qemu-system 12.5  1.02 Gb/s (guest 1 to
guest 2) then .420 Gb/s (guest 2 to guest 1) with a single iperf thread.
(Continue reading)

Brian Jackson | 1 Sep 2010 01:56
Gravatar

Re: Degrading Network performance as KVM/kernel version increases

  On 8/31/2010 6:00 PM, matthew.r.rohrer <at> L-3com.com wrote:
> I have been getting degrading network performance with newer versions of
> KVM and was wondering if this was expected?  It seems like a bug, but I
> am new to this and maybe I am doing something wrong so I thought I would
> ask.
>
> KVM Host OS: Fedora 12 x86_64
> KVM Guest OS Tiny Core Linux 2.6.33.3 kernel
>
> I have tried multiple host kernels 2.6.31.5, 2.6.31.6, 2.6.32.19 and
> 2.6.35.4 along with versions qemu-kvm 11.0 and qemu-system-x86_64 12.5
> compiled from from qemu-kvm repo.

I can't say anything about the kernel version making things worse. At 
least for the qemu-kvm version, you should be using -device and -netdev 
instead of -net nic -net tap (see 
*http://git.qemu.org/qemu.git/tree/docs/qdev-device-use.txt since it's 
not in the 0.12 tree).*

> Setup is: 2 hosts with 1 guest on each connected by 10 Gb nic.
>
> I am using virtio and have checked that hardware acceleration is
> working.
>
> Processor usage is less than 50% on host and guests.
>
> Here is what I am seeing, I will just include guest to guest statistics,
> I do have more (host to guest, etc.) if interested:

<snip results>
(Continue reading)

Andrew Theurer | 1 Sep 2010 05:38
Picon

Re: [PATCH 4/4] NUMA: realize NUMA memory pinning

On Tue, 2010-08-31 at 17:03 -0500, Anthony Liguori wrote:
> On 08/31/2010 03:54 PM, Andrew Theurer wrote:
> > On Mon, 2010-08-23 at 16:27 -0500, Anthony Liguori wrote:
> >    
> >> On 08/23/2010 04:16 PM, Andre Przywara wrote:
> >>      
> >>> Anthony Liguori wrote:
> >>>        
> >>>> On 08/23/2010 01:59 PM, Marcelo Tosatti wrote:
> >>>>          
> >>>>> On Wed, Aug 11, 2010 at 03:52:18PM +0200, Andre Przywara wrote:
> >>>>>            
> >>>>>> According to the user-provided assignment bind the respective part
> >>>>>> of the guest's memory to the given host node. This uses Linux'
> >>>>>> mbind syscall (which is wrapped only in libnuma) to realize the
> >>>>>> pinning right after the allocation.
> >>>>>> Failures are not fatal, but produce a warning.
> >>>>>>
> >>>>>> Signed-off-by: Andre Przywara<andre.przywara <at> amd.com>
> >>>>>> ...
> >>>>>>              
> >>>>> Why is it not possible (or perhaps not desired) to change the binding
> >>>>> after the guest is started?
> >>>>>
> >>>>> Sounds unflexible.
> >>>>>            
> >>> The solution is to introduce a monitor interface to later adjust the
> >>> pinning, allowing both changing the affinity only (only valid for
> >>> future fault-ins) and actually copying the memory (more costly).
> >>>        
(Continue reading)

Zachary Amsden | 1 Sep 2010 07:57
Picon
Favicon

[KVM timekeeping] Revert getnsboottime() kernel API

Turns out this doesn't actually save any math or locking, name
is chosen rather poorly, it doesn't match the existing kernel
APIs, and requires kvm-kmod changes.

Signed-off-by: Zachary Amsden <zamsden <at> redhat.com>
---
 arch/x86/kvm/x86.c        |   18 ++++++++++++++----
 include/linux/time.h      |    1 -
 kernel/time/timekeeping.c |   28 +---------------------------
 3 files changed, 15 insertions(+), 32 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 4014d6c..03605b8 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
 <at>  <at>  -919,6 +919,16  <at>  <at>  static inline u64 nsec_to_cycles(u64 nsec)
 	return ret;
 }

+static inline u64 get_kernel_ns(void)
+{
+	struct timespec ts;
+
+	WARN_ON(preemptible());
+	ktime_get_ts(&ts);
+	monotonic_to_bootbased(&ts);
+	return timespec_to_ns(&ts);
+}
+
 void kvm_write_tsc(struct kvm_vcpu *vcpu, u64 data)
(Continue reading)

Stefan Hajnoczi | 1 Sep 2010 08:21
Picon
Gravatar

Re: [PATCH 5/5] virtio-net: Switch default to new bottom half TX handler for iothread

On Tue, Aug 31, 2010 at 11:32 PM, Alex Williamson
<alex.williamson <at> redhat.com> wrote:
> On Tue, 2010-08-31 at 23:25 +0300, Michael S. Tsirkin wrote:
>> On Fri, Aug 27, 2010 at 04:37:45PM -0600, Alex Williamson wrote:
>> > The bottom half handler shows big improvements over the timer
>> > with few downsides, default to it when the iothread is enabled.
>> >
>> > Using the following tests, with the guest and host connected
>> > via tap+bridge:
>> >
>> > guest> netperf -t TCP_STREAM -H $HOST
>> > host> netperf -t TCP_STREAM -H $GUEST
>> > guest> netperf -t UDP_STREAM -H $HOST
>> > host> netperf -t UDP_STREAM -H $GUEST
>> > guest> netperf -t TCP_RR -H $HOST
>> >
>> > Results: base throughput, exits/throughput ->
>> >                    patched throughput, exits/throughput
>> >
>> > --enable-io-thread
>> > TCP guest->host 2737.77, 47.82  -> 6767.09, 29.15 = 247%, 61%
>> > TCP host->guest 2231.33, 74.00  -> 4125.80, 67.61 = 185%, 91%
>> > UDP guest->host 6281.68, 14.66  -> 12569.27, 1.98 = 200%, 14%
>> > UDP host->guest 275.91,  289.22 -> 264.80, 293.53 = 96%, 101%
>> > interations/s   1949.65, 82.97  -> 7417.56, 84.31 = 380%, 102%
>> >
>> > No --enable-io-thread
>> > TCP guest->host 3041.57, 55.11 -> 1038.93, 517.57 = 34%, 939%
>> > TCP host->guest 2416.03, 76.67 -> 5655.92, 55.52  = 234%, 72%
>> > UDP guest->host 12255.82, 6.11 -> 7775.87, 31.32  = 63%, 513%
(Continue reading)

Avi Kivity | 1 Sep 2010 09:05
Picon
Favicon

[PATCH 0/2] Improve kvm_stat delta display

Make the first sleep shorter, so numbers come up quicker, and scale the
delta so it is a rate-of-change instead of a meaningless number.

Avi Kivity (2):
  kvm_stat: make the initial sleep shorter
  kvm_stat: scale delta column to make it a rate

 kvm/kvm_stat |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Avi Kivity | 1 Sep 2010 09:05
Picon
Favicon

[PATCH 1/2] kvm_stat: make the initial sleep shorter

So we can see results faster

Signed-off-by: Avi Kivity <avi <at> redhat.com>
---
 kvm/kvm_stat |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/kvm/kvm_stat b/kvm/kvm_stat
index e68ca4e..b031d48 100755
--- a/kvm/kvm_stat
+++ b/kvm/kvm_stat
 <at>  <at>  -325,9 +325,11  <at>  <at>  def tui(screen, stats):
             row += 1
         screen.refresh()

+    sleeptime = 0.25
     while True:
         refresh()
-        curses.halfdelay(30)
+        curses.halfdelay(int(sleeptime * 10))
+        sleeptime = 3
         try:
             c = screen.getkey()
             if c == 'q':
--

-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo <at> vger.kernel.org
(Continue reading)

Avi Kivity | 1 Sep 2010 09:05
Picon
Favicon

[PATCH 2/2] kvm_stat: scale delta column to make it a rate

Scale the delta column by 1/sleeptime, so its units are
events per second.

Signed-off-by: Avi Kivity <avi <at> redhat.com>
---
 kvm/kvm_stat |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kvm/kvm_stat b/kvm/kvm_stat
index b031d48..e32df14 100755
--- a/kvm/kvm_stat
+++ b/kvm/kvm_stat
 <at>  <at>  -301,7 +301,7  <at>  <at>  number_width = 10
 def tui(screen, stats):
     curses.use_default_colors()
     curses.noecho()
-    def refresh():
+    def refresh(sleeptime):
         screen.erase()
         screen.addstr(0, 0, 'kvm statistics')
         row = 2
 <at>  <at>  -321,13 +321,13  <at>  <at>  def tui(screen, stats):
             screen.addstr(row, col, '%10d' % (values[0],))
             col += number_width
             if values[1] is not None:
-                screen.addstr(row, col, '%8d' % (values[1],))
+                screen.addstr(row, col, '%8d' % (values[1] / sleeptime,))
             row += 1
         screen.refresh()

(Continue reading)

Avi Kivity | 1 Sep 2010 09:09
Picon
Favicon

Re: [patch 0/2] SVM: fix cpu onlining

  On 09/01/2010 01:13 AM, Marcelo Tosatti wrote:

applied, thanks.

--

-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Avi Kivity | 1 Sep 2010 09:15
Picon
Favicon

[PATCH] kvm_stat: use total count as a secondary sort key

This shows events with history in preference to events with none.

Signed-off-by: Avi Kivity <avi <at> redhat.com>
---
 kvm/kvm_stat |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kvm/kvm_stat b/kvm/kvm_stat
index e32df14..4a16277 100755
--- a/kvm/kvm_stat
+++ b/kvm/kvm_stat
 <at>  <at>  -308,9 +308,9  <at>  <at>  def tui(screen, stats):
         s = stats.get()
         def sortkey(x):
             if s[x][1]:
-                return -s[x][1]
+                return (-s[x][1], -s[x][0])
             else:
-                return x
+                return (0, -s[x][0])
         for key in sorted(s.keys(), key = sortkey):
             if row >= screen.getmaxyx()[0]:
                 break
--

-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
(Continue reading)


Gmane