Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Jul 15, 2015 2:02 am 
Offline
Newbie

Joined: Thu May 08, 2014 2:23 pm
Posts: 3
Linode Support team are aware of these issues below and have been helping resolve them, but I am sharing the information since it will be possibility useful to others - and because I want to know how other users have dealt with their own upgrade issues in case it can inform our own plans and indeed help us try again to move to KVM.

We run a fleet of ten Linodes in differing sizes to handle workloads ranging from nodejs application servers (8GB and 4GB Linodes) to a 3-Linode TokuMX (a MongoDB fork) database cluster (one 32GB and two 16GB Linodes). These have a heavy 24x5 workload (ie weekdays only), with consistently high levels of network i/o with medium cpu and very low disk i/o for the nodejs servers and medium network i/o, high disk i/o and high cpu for the database cluster. Under Xen all these Linodes offered consistent and reliable performance with very rare downtime (eg only when the host broke).

I upgraded these to KVM in three stages: first a development server, then all the application servers, and then the database servers.

The application servers started to experience CPU stalls (see logs below). At first Linode support were suggesting these could be resolved by migrating to different KVM hosts. Now we are preferring to move back to Xen when they happen.

The database servers suffered more problems. Firstly performance under KVM was reduced. It is hard to measure exactly but although iowait times reduced, we seemed to be able to achieve lower levels of throughput - a reduction of between 10% and 20%. And when these too started to stall and crash (culminating in the Linode console showing "unable to boot" for an unknown reason) we migrated these back to Xen as a matter of urgency.

Now we are running a mix of Xen and KVM my anecdotal feedback is that for low and medium workloads KVM is competitive, but for high workloads it is inferior to Xen on Linode at this time.

I'd welcome feedback around other peoples' experiences with all this. I can provide some charts and data to back up my assertions later (we're still firefighting at the moment).

-----------------------------------------

CPU stall examples:

login: BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
IP: [<ffffffff8111b88c>] get_next_timer_interrupt+0x12b/0x219
PGD 138fbe067 PUD 138fe1067 PMD 0
Oops: 0000 [#1] SMP
Modules linked in:
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.1.0-x86_64-linode59 #1
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.8.1-0-g4adadbd-20150316_085822-nilsson.home.kr
axel.org 04/01/2014
task: ffff88013ab94a40 ti: ffff88013abd8000 task.ti: ffff88013abd8000
RIP: 0010:[<ffffffff8111b88c>] [<ffffffff8111b88c>] get_next_timer_interrupt+0x12b/0x219
RSP: 0018:ffff88013abdbe28 EFLAGS: 00010013
RAX: 0000000103821f64 RBX: ffff88013fc8e440 RCX: 00000000010381e2
RDX: 0000000000000022 RSI: 0000000000000022 RDI: 0000000000000000
RBP: ffff88013fc8f478 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000103821f64 R11: 0000000000000040 R12: 000000010381e1d2
R13: ffff88013fc8f698 R14: ffff88013fc90870 R15: 000000cd42e4dffb
FS: 0000000000000000(0000) GS:ffff88013fc80000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000018 CR3: 00000000b7da6000 CR4: 00000000001407e0
Stack:
ffffffff81042b41 0000000000000001 ffff88013fc8f478 ffff88013fc8f878
ffff88013fc8fc78 ffff88013fc90078 0000000000017900 0000b2aa7d56c1b5
000000010381e1d2 ffff88013abd8000 0000000000000001 ffffffff81127ef9
Call Trace:
[<ffffffff81042b41>] ? kvm_clock_read+0x1b/0x1d
[<ffffffff81127ef9>] ? __tick_nohz_idle_enter+0x13a/0x34d
[<ffffffff8112818b>] ? tick_nohz_idle_enter+0x5a/0x63
[<ffffffff81107e21>] ? cpu_startup_entry+0x41/0x2fc
Code: 93 38 1c 00 00 48 89 54 24 28 4a 8b 6c 04 10 48 89 ca 83 e2 3f 89 d6 48 63 fa 48 c1 e7 04 4c 8d 54 3d 00 4
9 8b 3a 4d 89 d5 eb 1a <f6> 47 18 01 75 11 4c 8b 57 10 41 b9 01 00 00 00 49 39 c2 49 0f
RIP [<ffffffff8111b88c>] get_next_timer_interrupt+0x12b/0x219
RSP <ffff88013abdbe28>
CR2: 0000000000000018
INFO: rcu_sched detected stalls on CPUs/tasks:
1: (0 ticks this GP) idle=ddf/140000000000000/0 softirq=10745556/10745556 fqs=8
(detected by 0, t=22044 jiffies, g=7497916, c=7497915, q=4)
Task dump for CPU 1:
swapper/1 R running task 0 0 1 0x00200008
0000b2aa7d5767c2 ffff88013fc8d000 00000000b71a6300 0000b2aa78029993
ffffffffffffffff ffff88013abd8000 0000000000000000 ffff88013abd8000
ffff88013abd8000 ffff88013abdc000 ffff88013abd8000 0000000000000000
Call Trace:
[<ffffffff8112818b>] ? tick_nohz_idle_enter+0x5a/0x63
[<ffffffff81107e21>] ? cpu_startup_entry+0x41/0x2fc
rcu_sched kthread starved for 22028 jiffies!
--------------------------------------------------

and another:


rcu_sched kthread starved for 134365 jiffies!
INFO: rcu_sched self-detected stall on CPU
1: (1 GPs behind) idle=0a9/140000000000001/0 softirq=48244670/48244671 fqs=125806
(t=450036 jiffies g=12305330 c=12305329 q=2630683)
rcu_sched kthread starved for 188367 jiffies!
INFO: rcu_sched self-detected stall on CPU
1: (1 GPs behind) idle=0a9/140000000000001/0 softirq=48244670/48244671 fqs=125806
(t=504039 jiffies g=12305330 c=12305329 q=2630683)
rcu_sched kthread starved for 242371 jiffies!
INFO: rcu_sched self-detected stall on CPU
1: (1 GPs behind) idle=0a9/140000000000001/0 softirq=48244670/48244671 fqs=125806
(t=558043 jiffies g=12305330 c=12305329 q=2630683)
rcu_sched kthread starved for 296374 jiffies!
INFO: rcu_sched self-detected stall on CPU
1: (1 GPs behind) idle=0a9/140000000000001/0 softirq=48244670/48244671 fqs=125806
(t=612046 jiffies g=12305330 c=12305329 q=2630683)
rcu_sched kthread starved for 350378 jiffies!
INFO: rcu_sched self-detected stall on CPU
1: (1 GPs behind) idle=0a9/140000000000001/0 softirq=48244670/48244671 fqs=125806
(t=666050 jiffies g=12305330 c=12305329 q=2630683)
rcu_sched kthread starved for 404382 jiffies!
INFO: rcu_sched self-detected stall on CPU
1: (1 GPs behind) idle=0a9/140000000000001/0 softirq=48244670/48244671 fqs=125806
(t=720054 jiffies g=12305330 c=12305329 q=2630683)


Top
   
PostPosted: Wed Jul 15, 2015 2:22 am 
Offline
Newbie

Joined: Thu May 08, 2014 2:23 pm
Posts: 3
By the way - these Linodes all use Ubuntu 12.04.5 LTS, all patched up weekly to latest versions, always booting with the Linode "latest" 64 bit kernel.


Top
   
PostPosted: Tue Jul 21, 2015 7:19 am 
Offline
Senior Newbie
User avatar

Joined: Wed Oct 22, 2014 4:28 am
Posts: 11
Website: https://plushforums.com/
Location: London
Thank you for posting this. We've also experienced problems with KVM that may relate to yours. We've been in regular contact with Linode Support who are actively working on this.

In short, correctly performing KVM nodes perform as well or better than Xen. But we found some KVM hosts perform extremely poorly with our platform.

We managed to isolate HHVM as the 'source' of the problem, with the repro cases to 'prove' it. PHP is not affected, which probably explains the lack of KVM complaints. With the help of Linode devs, we ran Perf Top, which shows CPU time being completely consumed by kernel-related tasks:

Code:
7.91%  [kernel]                [k] trigger_load_balance
  7.15%  [kernel]                [k] native_write_msr_safe
  5.93%  [kernel]                [k] timerqueue_add
  5.91%  [kernel]                [k] run_posix_cpu_timers
  4.79%  [kernel]                [k] hrtimer_forward
  4.63%  libpthread-2.19.so      [.] __pthread_disable_asynccancel
  3.69%  libpthread-2.19.so      [.] __libc_send
  3.63%  [kernel]                [k] profile_tick
  3.43%  [kernel]                [k] task_cputime
  2.81%  [kernel]                [k] scheduler_tick
  2.73%  [kernel]                [k] hrtimer_interrupt
  2.60%  [kernel]                [k] fetch_task_cputime
  2.45%  libmemcached.so.10.0.0  [.] 0x0000000000017552
  2.41%  [kernel]                [k] perf_event_task_tick
  2.09%  [kernel]                [k] __run_hrtimer
  1.97%  hhvm                    [.] vio_write
  1.93%  [kernel]                [k] _raw_spin_lock
  1.54%  [kernel]                [k] tick_sched_timer
  1.48%  [kernel]                [k] _raw_spin_unlock
  1.40%  [kernel]                [k] apic_timer_interrupt
  1.37%  [kernel]                [k] x86_pmu_enable
  1.12%  [kernel]                [k] intel_pmu_enable_all


On a properly performing KVM node, Perf Top is dominated by typical user tasks: HHVM, memcached, nginx, etc.

Stranger still, the problem is roughly 8 times more likely to occur in Newark and Dallas than in London or Atlanta. It's roughly 4 times more likely to occur in Fremont and Singapore, though we've not tested those datacentres as extensively.

We are talking about identical KVM nodes spun up from the same image here. I cannot imagine why it varies with location, which seems to be suggestive of a hardware or host configuration aspect to this. But it does seem to be host related. For example, dallas1063 is always good and dallas1069 is always bad.

Unlike your experience, our KVM fleet continues to perform well after 30 days uptime. However, we rely on automated creates via the API, so we can't risk landing on 'bad' hosts. Therefore we've switched back to Xen for new deployments, which performs impeccably as ever.

_________________
PlushForums - Beautiful, modern discussion forums.


Top
   
PostPosted: Wed Jul 29, 2015 8:15 am 
Offline
Junior Member

Joined: Tue Apr 01, 2014 12:45 pm
Posts: 29
Website: http://centminmod.com
Location: Brisbane, Australia
what about using distro kernels and not Linode's custom kernels ? any differences ?

_________________
* Centmin Mod Nginx menu based auto installer (Nginx, PHP-FPM, MariaDB MySQL) :: Centmin Mod LEMP Stack - What's New


Top
   
PostPosted: Thu Jul 30, 2015 10:50 am 
Offline
Senior Newbie
User avatar

Joined: Wed Oct 22, 2014 4:28 am
Posts: 11
Website: https://plushforums.com/
Location: London
We ran a distro kernel to run Perf Top and that didn't change things.

_________________
PlushForums - Beautiful, modern discussion forums.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group