SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Downloaden Sie, um offline zu lesen
Minimizing I/O Latency in Xen-ARM




       Seehwan Yoo, Chuck Yoo
            and OSVirtual
           Korea University
I/O Latency Issues in Xen-ARM
•    Guaranteed I/O latency is essential to Xen-ARM
     –    For mobile communication,
           •    Broken/missing phone calls, long network detection
           •    AP, CP are used for guaranteed communication
•  Virtualization premises transparent execution
      –  Not only instruction execution; access isolation
      –  But also performance; performance isolation

•    In practice, I/O latency is still an obstacle
      –  Lack of scheduler support
            •  Hierarchical scheduling nature
               i.e. hypervisor cannot impose task scheduling inside a guest OS
            •  The credit scheduler doesn’t match to time-sensitive applications
      –  Latency due to the split driver model
            •  Enhances reliability, but degrades performance (w.r.t. I/O latency)
            •  Inter-domain communication between IDD and user domain


•    We investigate these issues, and present possible remedies



Operating Systems Lab.                                                        http://os.korea.ac.kr   2
Related Work
•    Credit schedulers in Xen
      –  Task-aware scheduler (by Hwanjoo et. al. vee’08)
           •  Inspection of task execution at guest OS
           •  Adaptively use boost mechanism by VM workload characteristics
      –  Laxity-based soft RT scheduler (by Lee min et. al. vee’10)
           •  Laxity calculation by execution profile
           •  Assign priority based on the remaining time to deadline (laxity)
      –  Dynamic core-allocation (by Y. Hu et. al. hpdc’10)
           •  Core-allocation by workload characteristics (driver core, fast/slow tick core)
•    Mobile/embedded hypervisors
      –  OKL4 microvisor: microkernel-based hypervisor
           •  Has verified kernel – from sel4
           •  Presents good performance – commercially successful
           •  Real-time optimizations – slice donation, direct switching, reflective scheduling,
              threaded interrupt handling, etc.
      –  VirtualLogix – VLX: mobile hypervisor for real-time support
           •  Shared driver model – device sharing model among RT-guest OS and
              non-RT guest OSs
           •  Good PV performance



Operating Systems Lab.                                                           http://os.korea.ac.kr   3
Background – the Credit in Xen

•  Weighted round-robin based fair scheduler
•  Priority – BOOST, UNDER, OVER
     –  Basic principle: preserve fairness among all
        VCPUs
          •  Each vcpu gets credit periodically
          •  Credit is debited as vcpu consumes execution time
     –  Priority assignment
          •  Remaining credit <= 0 à OVER (lowest)
          •  Remaining credit > 0 à UNDER
          •  Event-pending VCPU : BOOST (highest)
     –  BOOST: for providing low response time
          •  Allows immediate preemption of the current vcpu

Operating Systems Lab.                             http://os.korea.ac.kr   4
Fallacies for the BOOST
                                      in the Credit
•    Fallacy 1) VCPU is always boosted by I/O event
      –  In fact, BOOST is sometimes ignored because
         VCPU is boosted only when it doesn’t break the fairness
           •  ‘Not-boosted vcpu’s are observed when the vcpu is in-execution
      –  Example 1)
           •  If a user domain has CPU job and waiting for execution, then
           •  It is not boosted since it will be executed soon, and tentative BOOST is easy to break
              the fairness


•    Fallacy 2) BOOST always prioritizes the VCPU
      –  In fact, BOOST is easy to be negated because
         multiple vcpus can be boosted simultaneously
           •  ‘Multi-boost’ happens quite often in split driver model
      –  Example 1)
           •  Driver domain has to be boosted, and then
           •  User domain also needs to be boosted
      –  Example 2)
           •  Driver domain has multiple pkts that are destined to multiple user domains, then
           •  All the designated user domains are boosted


Operating Systems Lab.                                                       http://os.korea.ac.kr     5
Xen-ARM’s
                                  Latency Characteristic
•  I/O latency measured throughout interrupt
   path
   –  Preemption latency :
           until code is preemptible
   –  VCPU dispatch latency :
           until the designated VCPU is scheduled
   –  Intra-VM latency :
           until IO completion
                                        Dom0                     DomU
                                        dispatch                 dispatch
      Phy intr.
                                             Dom0                    DomU
                  Xen-ARM                      Dom0                   DomU
                  Intr. handler                I/O task               I/O task

          Preemption                Vcpu                    Vcpu
                                  dispatch     Intra-VM   dispatch    Intra-VM
            latency
                                  latency       latency   latency      latency



 Operating Systems Lab.                                                     http://os.korea.ac.kr   6
Observed Latency thru intr. path
•  I/O latency measured throughout interrupt path
    –  Send ping request from external server to dom1
    –  VM settings
          •  Dom0 : the driver domain
          •  Dom1 : 20% cpu load + ping recv.
          •  Dom2 : 100% cpu load (CPU-burning workload)

 –  Xen-netback latency
 •  Large worst-case latency
 •  Dom0 vcpu dispatch lat.
    + intra-dom0 lat.

 –  Netback-domU
    latency
 •  Large average latency
 •  Dom1 vcpu dispatch lat.


 Operating Systems Lab.                              http://os.korea.ac.kr   7
Observed VCPU dispatch latency :
                          not-boosted vcpu
•    Experimental setting                                            (%)
                                                                                 100
       –    Dom1: varying CPU workload
       –    Dom2: burning CPU workload
       –    Another external host sends ping




                                               Cumulative latency distribution
                                                                                  80
            to Dom1
•    Not-boosted vcpus affect I/O latency
     distribution                                                                 60
       –    Dom1 CPU workload 20% : almost
            90% ping requests are handled
            within 1ms                                                            40
       –    Dom1 CPU workload 40% : 75%
            ping requests are handled                                                                                        20% CPU load @ dom1
                                                                                                                             40% CPU load @ dom1
            within 1ms                                                            20
                                                                                                                             60% CPU load @ dom1
       –    Dom1 CPU workload 60% : 65%                                                                                      80% CPU load @ dom1
            ping requests are handled
            within 1ms                                                             0
       –    Dom1 CPU workload 80% : only 60%                                           0   2    4        6        8        10       12        14
            ping requests are handled                                                          Latency distribution by CPU load
                                                                                                                                           Latency
                                                                                                                                              (ms)
            within 1ms


•    When Dom1 has more CPU load
     è larger I/O latency (self-disturbing by not-boosted vcpu)

     Operating Systems Lab.                                                                                     http://os.korea.ac.kr              8
Observed Multi-boost
•  At the hypervisor, we         vcpu state   priority       sched. out
                                                             count
   counted the number              Blocked    BOOST          275
   of “schedule out” of the                   UNDER          13
   driver domain                 Unblocked    BOOST          664,190
                                              UNDER          49


•  Multi-boost is specifically when
     –  the current VCPU is BOOST state, and
        it is unblocked
     –  Imply that there should be another BOOST vcpu, and
        the current vcpu is scheduled out

•  Large number of Multi-boosts

Operating Systems Lab.                             http://os.korea.ac.kr   9
Intra-VM latency
                                                         1


•  Latency




                             Cumulative distribution
                                                       0.95

   from usb_irq
   to netback
                                                        0.9
                                                                                Xen-usb_irq @ dom0
                                                                                Xen-netback @ dom0
                                                                                Xen-icmp @ dom1

 –  Schedule outs                                      0.85              Dom0 : IDD
                                                                         Dom1 : CPU 20%+ ping recv

    during dom0 execution
                                                                         Dom2 : CPU 100%
                                                        0.8
                                                              0   20         40          60          80

                                                                       Latency (ms)
                                                         1

•  Reasons



                             Cumulative distribution
                                                       0.95
 –  Dom0 : not always the
    higest prio.                                        0.9
                                                                                Xen-usb_irq @ dom0

 –  Asynch I/O handling :
                                                                                Xen-netback @ dom0
                                                                                Xen-icmp @ dom1
                                                       0.85              Dom0 : IDD

    bottom half, softirq,                                                Dom1 : CPU 80%+ ping recv
                                                                         Dom2 : CPU 100%

    tasklets, etc.                                      0.8
                                                              0   20         40          60          80

                                                                       Latency (ms)

Operating Systems Lab.                                                  http://os.korea.ac.kr   10
Virtual Interrupt Preemption
                                @ Guest OS
                                                                                      <At driver domain>

•    Interrupt enable/disable is not physically
                                                                         void default_idle(void) {
     operated within a guest OS
                                                    Hardware interrupt
                                                                             local_irq_disable();
       –  local_irq_disable(): disables
                                                     Set a pending bit
          only virtual intr.                                                                               Virtual
                                                      (because virtual       if (!need_resched())
                                                                                                           interrupt
                                                    intr. is disabled)       // blocks this domain         disabled
•    Physical intr. can be occurred                                               arch_idle();

       –  might trigger inter-VM                                             local_irq_enable();
          scheduling                                                     }



                                                                   Driver domain is scheduled out
•    Virtual interrupt preemption                                  having pending IRQ
       –  Similar to lock-holder preemption
       –  Perform driver function with
          interrupt disabled
       –  Physical timer intr. triggers
          inter-VM scheduling
       –  Virt. Intr. can be received only after
          the domain is scheduled again
          (as large as tens of ms)



     Note that the driver domain performs extensive I/O operation that disables interrupt
Operating Systems Lab.                                                        http://os.korea.ac.kr          11
Resolving I/O Latency
                          Problems for Xen-ARM
1.    Fixed priority assignment
      –  Let the driver domain always run with
         DRIVER_BOOST, which is the highest priority
          •  regardless of the CPU workload
           •  Resolves non-boosted VCPU and multi-boost
      –  RT_BOOST, BOOST for real-time I/O domain
2.    Virtual FIQ support
      –  ARM-specific interrupt optimization
      –  Higher priority than normal IRQ interrupt
      –  vPSR (Program status register) usage
3.    Do not schedule out the driver domain when it disables virtual
      interrupt
      –  It will be finished soon, and the hypervisor should give a chance to
         run the driver domain
          •  Resolves virtual interrupt preemption



Operating Systems Lab.                                       http://os.korea.ac.kr   12
Enhanced Latency :
   no dom1 vcpu dispatch latency
                                   1                                                                              1

                                  0.9                                                                            0.9




                                                                                       Cumulative distribution
        Cumulative distribution
                                  0.8                                                                            0.8

                                  0.7                                                                            0.7
                                                             Xen-netback @dom0                                                             Xen-netback @ dom0
                                                             Xen-icmp @ dom1                                                               Xen-icmp @ dom1
                                  0.6                                                                            0.6
                                                   Dom0 : IDD                                                                     Dom0 : IDD
                                  0.5              Dom1 : CPU 20%+ ping recv                                                      Dom1 : CPU 40%+ ping recv
                                                                                                                 0.5
                                                   Dom2 : CPU 100%                                                                Dom2 : CPU 100%
                                  0.4                                                                            0.4
                                        0   20         40             60          80                                   0   20         40            60           80
                                                 Latency (ms)                                                                   Latency (ms)

                                   1                                                                              1

                                  0.9                                                                            0.9
       Cumulative distribution




                                                                                       Cumulative distribution
                                  0.8                                                                            0.8

                                  0.7                                                                            0.7
                                                             Xen-netback @ dom0                                                            Xen-netback @ dom0
                                                             Xen-icmp @ dom1                                                               Xen-icmp @ dom1
                                  0.6                                                                            0.6
                                                   Dom0 : IDD                                                                     Dom0 : IDD
                                                   Dom1 : CPU 60%+ ping recv                                                      Dom1 : CPU 80%+ ping recv
                                  0.5                                                                            0.5
                                                   Dom2 : CPU 100%                                                                Dom2 : CPU 100%

                                  0.4                                                                            0.4
                                        0   20          40            60          80                                   0   20         40            60           80

                                                 Latency (ms)                                                                   Latency (ms)

Operating Systems Lab.                                                                                                           http://os.korea.ac.kr          13
Enhanced Interrupt Latency :
                    @ Driver Domain
•  Vcpu dispatch latency                                        1
    –  From intr. handler @ Xen
       to hard irq handler @ IDD                              0.99




                                    Cumulative distribution
    –  Fixed priority dom0 vcpu                               0.98
                                                                                   Dom0 : IDD
                                                                                   Dom1 : CPU 80%+ ping recv
    –  Virtual FIQ                                                                 Dom2 : CPU 100%

    –  No latency is observed!                                0.97
                                                                                        Xen-usb_irq - orig.
                                                                                        Xen-netback - orig.
                                                              0.96                      Xen-usb_irq - new
                                                                                        Xen-netback - new
•  Intra-VM latency
                                                              0.95
    –  From ISR to netback @ IDD                                     0   20        40              60         80

                                                                              Latency (ms)
    –  No virt. intr. preemption
        (dom0 highest prio.)

•  Among 13M intr.,
    –  56K are caught where
    virt intr preemption happened
    –  8.5M preemption occurred
        with FIQ optimization


Operating Systems Lab.                                                           http://os.korea.ac.kr        14
Enhanced end-user Latency :
                       overall result
•  Over 1 million ping tests,
     –  Fixed priority make the driver domain to run
        without additional latency
        (from inter-VM scheduling)
          •  Largely reduces overall latency
     –  99% interrupts                     (%)
                                                                 100



        are handled
                             Latency distribution (cumulative)
        within 1ms                                                95       reduced
                                                                           latency




                                                                  90



                                                                                                                         Xen-domU    (enhanced)
                                                                                                                         Xen-domU    (original)
                                                                  85




                                                                  80
                                                                       0             10     20          30          40          50            60
                                                                                          Latencies in all intervals (ms)

Operating Systems Lab.                                                                                       http://os.korea.ac.kr           15
Conclusion and
                                  Possible Future work
•    We analyzed I/O latency in Xen-ARM virtual machine
      –  Throughout the interrupt handling path in split driver model
•    Two main reasons for long latency
      –  Limitation of ‘BOOST’ in the Xen-ARM’s Credit scheduler
           •  Not-boosted vcpu
           •  Multi-boost
      –  Driver domain’s virtualized interrupt handling
           •  Virtual interrupt preemption (aka. lock-holder preemption)
•    Achieve under millisecond latency for 99% network packet interrupts
      –  DRIVER_BOOST; the highest priority for driver domain
      –  Modify scheduler in order for the driver domain not to be scheduled out while
         virtual interrupts are disabled
      –  Further optimizations (incl. virtual FIQ mode, softirq-awareness)
•    Possible future work
      –  Multi-core consideration/extension (core allocation, etc.)
           •  Other scheduler integration
      –  Tight latency guarantee for real-time guest OS
           •  Rest 1% holds the key


Operating Systems Lab.                                                     http://os.korea.ac.kr   16
Thanks for your attention




Credits to OSvirtual @ oslab, KU



                                   17
Appendix.
                                                                          Native comparison
  •  Comparison with native system – no cpuworkload
                      –  Slightly reduced handling latency, largely reduced max.
                                          Orig.	
                                     Orig.	
  	
             New	
  sched.	
         New	
  sched.	
  
                            Na#ve	
  
                                          dom0	
                                      domU	
                  Dom0	
                  DomU	
  
Min	
  	
  	
  	
           375	
         459	
                                       575	
                   444	
                   584	
  
Avg	
  	
  	
  	
           532.52	
      821.48	
                                    912.42	
                576.54	
                736.06	
  
Max	
                       107456	
      100782	
                                    100964	
                1883	
                  2208	
  
Stdev	
                     1792.34	
     4656.26	
                                   4009.78	
               41.84	
                 45.95	
  
                                                                               1




                                                    Cumulative distribution
                                                                              0.8

                                                                              0.6

                                                                              0.4
                                                                                                                                   native ping (eth0)
                                                                                                                                   orig. dom0
                                                                              0.2                                                  orig. domU
                                                                                                                                   new sched. dom0
                                                                                                                                   new sched. domU
                                                                               0
                                                                                300       400         500     600       700       800       900         1000

                                                                                                            Latency (us)
    Operating Systems Lab.                                                                                                    http://os.korea.ac.kr            18
Appendix.
                                                                       Fairness?
   •  is still good, and achieves high utilization
                                         CPU burning jobs’ utilization
  dom2	





  dom1	


                    NO I/O (ideal case)	

           Orig. credit	

       New scheduler	

* Setting
Dom1: 20, 40, 60, 80, 100% CPU load
       + ping receiver
Dom2: 100% CPU load
Note that the credit is work-conserving


                          Normalized
                                                  Orig. credit	

        New scheduler	

                          throughput
            =   ( Measured thruput/
                    ideal thruput            )
    Operating Systems Lab.                                               http://os.korea.ac.kr   19
Appendix.
                                                                                                      Latency in multi-OS env.
   •  3 domain cases with differentiated service
                     –  added RT_BOOST priority, between
                        DRIVER_BOOST and BOOST
                     –  Dom1 assuming RT
                     –  Dom2 and Dom3 for GP
              Credit’s latency dist. 3 domains for                                                                                                                                                    Enhanced latency dist. 3 doms. for
              10K ping tests (interval 10~40ms)                                                                                                                                                       10K ping tests (interval 10~40ms)
100.00%                                                                                                                                                                                 100.00%
90.00%                                                                                                                                                                                  90.00%
80.00%                                                                                                                                                                                  80.00%
70.00%                                                                                                                                                                                  70.00%
60.00%                                                                                                                                                                                  60.00%
50.00%                                                                                                                                                                           Dom1   50.00%                                                                                                                                                                           Dom1

40.00%                                                                                                                                                                           Dom2   40.00%                                                                                                                                                                           Dom2
30.00%                                                                                                                                                                           Dom3   30.00%                                                                                                                                                                           Dom3
20.00%                                                                                                                                                                                  20.00%
10.00%                                                                                                                                                                                  10.00%
 0.00%                                                                                                                                                                                   0.00%
                                                                                                                                                                                                  0
                                                                                                                                                                                                      6000
                                                                                                                                                                                                             12000
                                                                                                                                                                                                                     18000
                                                                                                                                                                                                                             24000
                                                                                                                                                                                                                                     30000
                                                                                                                                                                                                                                             36000
                                                                                                                                                                                                                                                     42000
                                                                                                                                                                                                                                                             48000
                                                                                                                                                                                                                                                                     54000
                                                                                                                                                                                                                                                                             60000
                                                                                                                                                                                                                                                                                     66000
                                                                                                                                                                                                                                                                                             72000
                                                                                                                                                                                                                                                                                                     78000
                                                                                                                                                                                                                                                                                                             84000
                                                                                                                                                                                                                                                                                                                     90000
                                                                                                                                                                                                                                                                                                                             96000
                                                                                                                                                                                                                                                                                                                                     102000
                                                                                                                                                                                                                                                                                                                                              108000
                                                                                                                                                                                                                                                                                                                                                       114000
                                                                                                                                                                                                                                                                                                                                                                120000
          0
              6000
                     12000
                             18000
                                     24000
                                             30000
                                                     36000
                                                             42000
                                                                     48000
                                                                             54000
                                                                                     60000
                                                                                             66000
                                                                                                     72000
                                                                                                             78000
                                                                                                                     84000
                                                                                                                             90000
                                                                                                                                     96000
                                                                                                                                             102000
                                                                                                                                                      108000
                                                                                                                                                               114000
                                                                                                                                                                        120000




    Operating Systems Lab.                                                                                                                                                                                                                                                      http://os.korea.ac.kr                                                                    20
Appendix.
                         Latency in multi-OS env.
•  3 domain cases with differentiated service
     –  added RT_BOOST priority, between DRIVER_BOOST and BOOST
     –  Dom1 assuming RT
     –  Dom2 and Dom3 for GP
          100.00%

           90.00%

           80.00%

           70.00%

           60.00%                                  Enh. Dom1
                                                   Enh. Dom2
           50.00%
                                                   Enh. Dom3
           40.00%
                                                   Credit Dom1
           30.00%                                  Credit Dom2

           20.00%                                  Credit Dom3

           10.00%

            0.00%




Operating Systems Lab.                           http://os.korea.ac.kr   21

Weitere ähnliche Inhalte

Was ist angesagt?

Track A-Shmuel Panijel, Windriver
Track A-Shmuel Panijel, WindriverTrack A-Shmuel Panijel, Windriver
Track A-Shmuel Panijel, Windriver
chiportal
 
Apache Hadoop India Summit 2011 talk "Profiling Application Performance" by U...
Apache Hadoop India Summit 2011 talk "Profiling Application Performance" by U...Apache Hadoop India Summit 2011 talk "Profiling Application Performance" by U...
Apache Hadoop India Summit 2011 talk "Profiling Application Performance" by U...
Yahoo Developer Network
 
Service Assurance for Virtual Network Functions in Cloud-Native Environments
Service Assurance for Virtual Network Functions in Cloud-Native EnvironmentsService Assurance for Virtual Network Functions in Cloud-Native Environments
Service Assurance for Virtual Network Functions in Cloud-Native Environments
Nikos Anastopoulos
 
vSphere APIs for performance monitoring
vSphere APIs for performance monitoringvSphere APIs for performance monitoring
vSphere APIs for performance monitoring
Alan Renouf
 
Windows server 8 hyper v networking (aidan finn)
Windows server 8 hyper v networking (aidan finn)Windows server 8 hyper v networking (aidan finn)
Windows server 8 hyper v networking (aidan finn)
hypervnu
 
Impact 2009 1783 Achieving Availability With W A Sz User Experience
Impact 2009 1783  Achieving  Availability With  W A Sz   User ExperienceImpact 2009 1783  Achieving  Availability With  W A Sz   User Experience
Impact 2009 1783 Achieving Availability With W A Sz User Experience
Elena Nanos
 
Multi-threaded Performance Pitfalls
Multi-threaded Performance PitfallsMulti-threaded Performance Pitfalls
Multi-threaded Performance Pitfalls
Ciaran McHale
 

Was ist angesagt? (20)

Link Virtualization based on Xen
Link Virtualization based on XenLink Virtualization based on Xen
Link Virtualization based on Xen
 
Linux PV on HVM
Linux PV on HVMLinux PV on HVM
Linux PV on HVM
 
Nakajima hvm-be final
Nakajima hvm-be finalNakajima hvm-be final
Nakajima hvm-be final
 
Session 7362 Handout 427 0
Session 7362 Handout 427 0Session 7362 Handout 427 0
Session 7362 Handout 427 0
 
Track A-Shmuel Panijel, Windriver
Track A-Shmuel Panijel, WindriverTrack A-Shmuel Panijel, Windriver
Track A-Shmuel Panijel, Windriver
 
XS Japan 2008 Services English
XS Japan 2008 Services EnglishXS Japan 2008 Services English
XS Japan 2008 Services English
 
Apache Hadoop India Summit 2011 talk "Profiling Application Performance" by U...
Apache Hadoop India Summit 2011 talk "Profiling Application Performance" by U...Apache Hadoop India Summit 2011 talk "Profiling Application Performance" by U...
Apache Hadoop India Summit 2011 talk "Profiling Application Performance" by U...
 
Service Assurance for Virtual Network Functions in Cloud-Native Environments
Service Assurance for Virtual Network Functions in Cloud-Native EnvironmentsService Assurance for Virtual Network Functions in Cloud-Native Environments
Service Assurance for Virtual Network Functions in Cloud-Native Environments
 
Linux PV on HVM
Linux PV on HVMLinux PV on HVM
Linux PV on HVM
 
vSphere APIs for performance monitoring
vSphere APIs for performance monitoringvSphere APIs for performance monitoring
vSphere APIs for performance monitoring
 
Munich 2016 - Z011601 Martin Packer - Parallel Sysplex Performance Topics topics
Munich 2016 - Z011601 Martin Packer - Parallel Sysplex Performance Topics topicsMunich 2016 - Z011601 Martin Packer - Parallel Sysplex Performance Topics topics
Munich 2016 - Z011601 Martin Packer - Parallel Sysplex Performance Topics topics
 
Linux Foundation Collaboration Summit 13 :10 years of Xen and Beyond
Linux Foundation Collaboration Summit 13 :10 years of Xen and BeyondLinux Foundation Collaboration Summit 13 :10 years of Xen and Beyond
Linux Foundation Collaboration Summit 13 :10 years of Xen and Beyond
 
XS Oracle 2009 Intro Slides
XS Oracle 2009 Intro SlidesXS Oracle 2009 Intro Slides
XS Oracle 2009 Intro Slides
 
Mobile Virtualization using the Xen Technologies
Mobile Virtualization using the Xen TechnologiesMobile Virtualization using the Xen Technologies
Mobile Virtualization using the Xen Technologies
 
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC clusterToward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
 
Windows server 8 hyper v networking (aidan finn)
Windows server 8 hyper v networking (aidan finn)Windows server 8 hyper v networking (aidan finn)
Windows server 8 hyper v networking (aidan finn)
 
Impact 2009 1783 Achieving Availability With W A Sz User Experience
Impact 2009 1783  Achieving  Availability With  W A Sz   User ExperienceImpact 2009 1783  Achieving  Availability With  W A Sz   User Experience
Impact 2009 1783 Achieving Availability With W A Sz User Experience
 
Multi-threaded Performance Pitfalls
Multi-threaded Performance PitfallsMulti-threaded Performance Pitfalls
Multi-threaded Performance Pitfalls
 
XS Boston 2008 Self IO Emulation
XS Boston 2008 Self IO EmulationXS Boston 2008 Self IO Emulation
XS Boston 2008 Self IO Emulation
 
prezentációt
prezentációtprezentációt
prezentációt
 

Ähnlich wie Minimizing I/O Latency in Xen-ARM

Perfomance tuning on Go 2.0
Perfomance tuning on Go 2.0Perfomance tuning on Go 2.0
Perfomance tuning on Go 2.0
Yogi Kulkarni
 
Buiding a better Userspace - The current and future state of QEMU and KVM int...
Buiding a better Userspace - The current and future state of QEMU and KVM int...Buiding a better Userspace - The current and future state of QEMU and KVM int...
Buiding a better Userspace - The current and future state of QEMU and KVM int...
aliguori
 
Blue host openstacksummit_2013
Blue host openstacksummit_2013Blue host openstacksummit_2013
Blue host openstacksummit_2013
Jun Park
 
Blue host using openstack in a traditional hosting environment
Blue host using openstack in a traditional hosting environmentBlue host using openstack in a traditional hosting environment
Blue host using openstack in a traditional hosting environment
OpenStack Foundation
 

Ähnlich wie Minimizing I/O Latency in Xen-ARM (20)

Real Time Support For Xen
Real Time Support For XenReal Time Support For Xen
Real Time Support For Xen
 
Introduction to Cloud Data Center and Network Issues
Introduction to Cloud Data Center and Network IssuesIntroduction to Cloud Data Center and Network Issues
Introduction to Cloud Data Center and Network Issues
 
Xen arm
Xen armXen arm
Xen arm
 
Xen arm
Xen armXen arm
Xen arm
 
Shalini xs10
Shalini xs10Shalini xs10
Shalini xs10
 
Perfomance tuning on Go 2.0
Perfomance tuning on Go 2.0Perfomance tuning on Go 2.0
Perfomance tuning on Go 2.0
 
Improving Xen idle power efficiency
Improving Xen idle power efficiencyImproving Xen idle power efficiency
Improving Xen idle power efficiency
 
XPDDS18: Real Time in XEN on ARM - Andrii Anisov, EPAM Systems Inc.
XPDDS18: Real Time in XEN on ARM - Andrii Anisov, EPAM Systems Inc.XPDDS18: Real Time in XEN on ARM - Andrii Anisov, EPAM Systems Inc.
XPDDS18: Real Time in XEN on ARM - Andrii Anisov, EPAM Systems Inc.
 
Bluetube
BluetubeBluetube
Bluetube
 
Tunning mobicent-jean deruelle
Tunning mobicent-jean deruelleTunning mobicent-jean deruelle
Tunning mobicent-jean deruelle
 
COLO: COarse-grain LOck-stepping Virtual Machines for Non-stop Service
COLO: COarse-grain LOck-stepping Virtual Machines for Non-stop ServiceCOLO: COarse-grain LOck-stepping Virtual Machines for Non-stop Service
COLO: COarse-grain LOck-stepping Virtual Machines for Non-stop Service
 
VMworld 2013: Silent Killer: How Latency Destroys Performance...And What to D...
VMworld 2013: Silent Killer: How Latency Destroys Performance...And What to D...VMworld 2013: Silent Killer: How Latency Destroys Performance...And What to D...
VMworld 2013: Silent Killer: How Latency Destroys Performance...And What to D...
 
Coupling Facility CPU
Coupling Facility CPUCoupling Facility CPU
Coupling Facility CPU
 
”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016”Bare-Metal Container" presented at HPCC2016
”Bare-Metal Container" presented at HPCC2016
 
Buiding a better Userspace - The current and future state of QEMU and KVM int...
Buiding a better Userspace - The current and future state of QEMU and KVM int...Buiding a better Userspace - The current and future state of QEMU and KVM int...
Buiding a better Userspace - The current and future state of QEMU and KVM int...
 
Blue host openstacksummit_2013
Blue host openstacksummit_2013Blue host openstacksummit_2013
Blue host openstacksummit_2013
 
Blue host using openstack in a traditional hosting environment
Blue host using openstack in a traditional hosting environmentBlue host using openstack in a traditional hosting environment
Blue host using openstack in a traditional hosting environment
 
VM Live Migration Speedup in Xen
VM Live Migration Speedup in XenVM Live Migration Speedup in Xen
VM Live Migration Speedup in Xen
 
Scaling habits of ASP.NET
Scaling habits of ASP.NETScaling habits of ASP.NET
Scaling habits of ASP.NET
 
Project ACRN CPU sharing BVT scheduler in ACRN hypervisor
Project ACRN CPU sharing BVT scheduler in ACRN hypervisorProject ACRN CPU sharing BVT scheduler in ACRN hypervisor
Project ACRN CPU sharing BVT scheduler in ACRN hypervisor
 

Mehr von The Linux Foundation

Mehr von The Linux Foundation (20)

ELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made SimpleELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made Simple
 
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
 
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
 
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
 
XPDDS19 Keynote: Unikraft Weather Report
XPDDS19 Keynote:  Unikraft Weather ReportXPDDS19 Keynote:  Unikraft Weather Report
XPDDS19 Keynote: Unikraft Weather Report
 
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
 
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
 
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, BitdefenderXPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
 
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
 
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
 OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making... OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
 
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, CitrixXPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
 
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltdXPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
 
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
 
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&DXPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
 
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM SystemsXPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
 
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
 
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
 
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
 
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSEXPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 

Minimizing I/O Latency in Xen-ARM

  • 1. Minimizing I/O Latency in Xen-ARM Seehwan Yoo, Chuck Yoo and OSVirtual Korea University
  • 2. I/O Latency Issues in Xen-ARM •  Guaranteed I/O latency is essential to Xen-ARM –  For mobile communication, •  Broken/missing phone calls, long network detection •  AP, CP are used for guaranteed communication •  Virtualization premises transparent execution –  Not only instruction execution; access isolation –  But also performance; performance isolation •  In practice, I/O latency is still an obstacle –  Lack of scheduler support •  Hierarchical scheduling nature i.e. hypervisor cannot impose task scheduling inside a guest OS •  The credit scheduler doesn’t match to time-sensitive applications –  Latency due to the split driver model •  Enhances reliability, but degrades performance (w.r.t. I/O latency) •  Inter-domain communication between IDD and user domain •  We investigate these issues, and present possible remedies Operating Systems Lab. http://os.korea.ac.kr 2
  • 3. Related Work •  Credit schedulers in Xen –  Task-aware scheduler (by Hwanjoo et. al. vee’08) •  Inspection of task execution at guest OS •  Adaptively use boost mechanism by VM workload characteristics –  Laxity-based soft RT scheduler (by Lee min et. al. vee’10) •  Laxity calculation by execution profile •  Assign priority based on the remaining time to deadline (laxity) –  Dynamic core-allocation (by Y. Hu et. al. hpdc’10) •  Core-allocation by workload characteristics (driver core, fast/slow tick core) •  Mobile/embedded hypervisors –  OKL4 microvisor: microkernel-based hypervisor •  Has verified kernel – from sel4 •  Presents good performance – commercially successful •  Real-time optimizations – slice donation, direct switching, reflective scheduling, threaded interrupt handling, etc. –  VirtualLogix – VLX: mobile hypervisor for real-time support •  Shared driver model – device sharing model among RT-guest OS and non-RT guest OSs •  Good PV performance Operating Systems Lab. http://os.korea.ac.kr 3
  • 4. Background – the Credit in Xen •  Weighted round-robin based fair scheduler •  Priority – BOOST, UNDER, OVER –  Basic principle: preserve fairness among all VCPUs •  Each vcpu gets credit periodically •  Credit is debited as vcpu consumes execution time –  Priority assignment •  Remaining credit <= 0 à OVER (lowest) •  Remaining credit > 0 à UNDER •  Event-pending VCPU : BOOST (highest) –  BOOST: for providing low response time •  Allows immediate preemption of the current vcpu Operating Systems Lab. http://os.korea.ac.kr 4
  • 5. Fallacies for the BOOST in the Credit •  Fallacy 1) VCPU is always boosted by I/O event –  In fact, BOOST is sometimes ignored because VCPU is boosted only when it doesn’t break the fairness •  ‘Not-boosted vcpu’s are observed when the vcpu is in-execution –  Example 1) •  If a user domain has CPU job and waiting for execution, then •  It is not boosted since it will be executed soon, and tentative BOOST is easy to break the fairness •  Fallacy 2) BOOST always prioritizes the VCPU –  In fact, BOOST is easy to be negated because multiple vcpus can be boosted simultaneously •  ‘Multi-boost’ happens quite often in split driver model –  Example 1) •  Driver domain has to be boosted, and then •  User domain also needs to be boosted –  Example 2) •  Driver domain has multiple pkts that are destined to multiple user domains, then •  All the designated user domains are boosted Operating Systems Lab. http://os.korea.ac.kr 5
  • 6. Xen-ARM’s Latency Characteristic •  I/O latency measured throughout interrupt path –  Preemption latency : until code is preemptible –  VCPU dispatch latency : until the designated VCPU is scheduled –  Intra-VM latency : until IO completion Dom0 DomU dispatch dispatch Phy intr. Dom0 DomU Xen-ARM Dom0 DomU Intr. handler I/O task I/O task Preemption Vcpu Vcpu dispatch Intra-VM dispatch Intra-VM latency latency latency latency latency Operating Systems Lab. http://os.korea.ac.kr 6
  • 7. Observed Latency thru intr. path •  I/O latency measured throughout interrupt path –  Send ping request from external server to dom1 –  VM settings •  Dom0 : the driver domain •  Dom1 : 20% cpu load + ping recv. •  Dom2 : 100% cpu load (CPU-burning workload) –  Xen-netback latency •  Large worst-case latency •  Dom0 vcpu dispatch lat. + intra-dom0 lat. –  Netback-domU latency •  Large average latency •  Dom1 vcpu dispatch lat. Operating Systems Lab. http://os.korea.ac.kr 7
  • 8. Observed VCPU dispatch latency : not-boosted vcpu •  Experimental setting (%) 100 –  Dom1: varying CPU workload –  Dom2: burning CPU workload –  Another external host sends ping Cumulative latency distribution 80 to Dom1 •  Not-boosted vcpus affect I/O latency distribution 60 –  Dom1 CPU workload 20% : almost 90% ping requests are handled within 1ms 40 –  Dom1 CPU workload 40% : 75% ping requests are handled 20% CPU load @ dom1 40% CPU load @ dom1 within 1ms 20 60% CPU load @ dom1 –  Dom1 CPU workload 60% : 65% 80% CPU load @ dom1 ping requests are handled within 1ms 0 –  Dom1 CPU workload 80% : only 60% 0 2 4 6 8 10 12 14 ping requests are handled Latency distribution by CPU load Latency (ms) within 1ms •  When Dom1 has more CPU load è larger I/O latency (self-disturbing by not-boosted vcpu) Operating Systems Lab. http://os.korea.ac.kr 8
  • 9. Observed Multi-boost •  At the hypervisor, we vcpu state priority sched. out count counted the number Blocked BOOST 275 of “schedule out” of the UNDER 13 driver domain Unblocked BOOST 664,190 UNDER 49 •  Multi-boost is specifically when –  the current VCPU is BOOST state, and it is unblocked –  Imply that there should be another BOOST vcpu, and the current vcpu is scheduled out •  Large number of Multi-boosts Operating Systems Lab. http://os.korea.ac.kr 9
  • 10. Intra-VM latency 1 •  Latency Cumulative distribution 0.95 from usb_irq to netback 0.9 Xen-usb_irq @ dom0 Xen-netback @ dom0 Xen-icmp @ dom1 –  Schedule outs 0.85 Dom0 : IDD Dom1 : CPU 20%+ ping recv during dom0 execution Dom2 : CPU 100% 0.8 0 20 40 60 80 Latency (ms) 1 •  Reasons Cumulative distribution 0.95 –  Dom0 : not always the higest prio. 0.9 Xen-usb_irq @ dom0 –  Asynch I/O handling : Xen-netback @ dom0 Xen-icmp @ dom1 0.85 Dom0 : IDD bottom half, softirq, Dom1 : CPU 80%+ ping recv Dom2 : CPU 100% tasklets, etc. 0.8 0 20 40 60 80 Latency (ms) Operating Systems Lab. http://os.korea.ac.kr 10
  • 11. Virtual Interrupt Preemption @ Guest OS <At driver domain> •  Interrupt enable/disable is not physically void default_idle(void) { operated within a guest OS Hardware interrupt local_irq_disable(); –  local_irq_disable(): disables Set a pending bit only virtual intr. Virtual (because virtual if (!need_resched()) interrupt intr. is disabled) // blocks this domain disabled •  Physical intr. can be occurred arch_idle(); –  might trigger inter-VM local_irq_enable(); scheduling } Driver domain is scheduled out •  Virtual interrupt preemption having pending IRQ –  Similar to lock-holder preemption –  Perform driver function with interrupt disabled –  Physical timer intr. triggers inter-VM scheduling –  Virt. Intr. can be received only after the domain is scheduled again (as large as tens of ms) Note that the driver domain performs extensive I/O operation that disables interrupt Operating Systems Lab. http://os.korea.ac.kr 11
  • 12. Resolving I/O Latency Problems for Xen-ARM 1.  Fixed priority assignment –  Let the driver domain always run with DRIVER_BOOST, which is the highest priority •  regardless of the CPU workload •  Resolves non-boosted VCPU and multi-boost –  RT_BOOST, BOOST for real-time I/O domain 2.  Virtual FIQ support –  ARM-specific interrupt optimization –  Higher priority than normal IRQ interrupt –  vPSR (Program status register) usage 3.  Do not schedule out the driver domain when it disables virtual interrupt –  It will be finished soon, and the hypervisor should give a chance to run the driver domain •  Resolves virtual interrupt preemption Operating Systems Lab. http://os.korea.ac.kr 12
  • 13. Enhanced Latency : no dom1 vcpu dispatch latency 1 1 0.9 0.9 Cumulative distribution Cumulative distribution 0.8 0.8 0.7 0.7 Xen-netback @dom0 Xen-netback @ dom0 Xen-icmp @ dom1 Xen-icmp @ dom1 0.6 0.6 Dom0 : IDD Dom0 : IDD 0.5 Dom1 : CPU 20%+ ping recv Dom1 : CPU 40%+ ping recv 0.5 Dom2 : CPU 100% Dom2 : CPU 100% 0.4 0.4 0 20 40 60 80 0 20 40 60 80 Latency (ms) Latency (ms) 1 1 0.9 0.9 Cumulative distribution Cumulative distribution 0.8 0.8 0.7 0.7 Xen-netback @ dom0 Xen-netback @ dom0 Xen-icmp @ dom1 Xen-icmp @ dom1 0.6 0.6 Dom0 : IDD Dom0 : IDD Dom1 : CPU 60%+ ping recv Dom1 : CPU 80%+ ping recv 0.5 0.5 Dom2 : CPU 100% Dom2 : CPU 100% 0.4 0.4 0 20 40 60 80 0 20 40 60 80 Latency (ms) Latency (ms) Operating Systems Lab. http://os.korea.ac.kr 13
  • 14. Enhanced Interrupt Latency : @ Driver Domain •  Vcpu dispatch latency 1 –  From intr. handler @ Xen to hard irq handler @ IDD 0.99 Cumulative distribution –  Fixed priority dom0 vcpu 0.98 Dom0 : IDD Dom1 : CPU 80%+ ping recv –  Virtual FIQ Dom2 : CPU 100% –  No latency is observed! 0.97 Xen-usb_irq - orig. Xen-netback - orig. 0.96 Xen-usb_irq - new Xen-netback - new •  Intra-VM latency 0.95 –  From ISR to netback @ IDD 0 20 40 60 80 Latency (ms) –  No virt. intr. preemption (dom0 highest prio.) •  Among 13M intr., –  56K are caught where virt intr preemption happened –  8.5M preemption occurred with FIQ optimization Operating Systems Lab. http://os.korea.ac.kr 14
  • 15. Enhanced end-user Latency : overall result •  Over 1 million ping tests, –  Fixed priority make the driver domain to run without additional latency (from inter-VM scheduling) •  Largely reduces overall latency –  99% interrupts (%) 100 are handled Latency distribution (cumulative) within 1ms 95 reduced latency 90 Xen-domU (enhanced) Xen-domU (original) 85 80 0 10 20 30 40 50 60 Latencies in all intervals (ms) Operating Systems Lab. http://os.korea.ac.kr 15
  • 16. Conclusion and Possible Future work •  We analyzed I/O latency in Xen-ARM virtual machine –  Throughout the interrupt handling path in split driver model •  Two main reasons for long latency –  Limitation of ‘BOOST’ in the Xen-ARM’s Credit scheduler •  Not-boosted vcpu •  Multi-boost –  Driver domain’s virtualized interrupt handling •  Virtual interrupt preemption (aka. lock-holder preemption) •  Achieve under millisecond latency for 99% network packet interrupts –  DRIVER_BOOST; the highest priority for driver domain –  Modify scheduler in order for the driver domain not to be scheduled out while virtual interrupts are disabled –  Further optimizations (incl. virtual FIQ mode, softirq-awareness) •  Possible future work –  Multi-core consideration/extension (core allocation, etc.) •  Other scheduler integration –  Tight latency guarantee for real-time guest OS •  Rest 1% holds the key Operating Systems Lab. http://os.korea.ac.kr 16
  • 17. Thanks for your attention Credits to OSvirtual @ oslab, KU 17
  • 18. Appendix. Native comparison •  Comparison with native system – no cpuworkload –  Slightly reduced handling latency, largely reduced max. Orig.   Orig.     New  sched.   New  sched.   Na#ve   dom0   domU   Dom0   DomU   Min         375   459   575   444   584   Avg         532.52   821.48   912.42   576.54   736.06   Max   107456   100782   100964   1883   2208   Stdev   1792.34   4656.26   4009.78   41.84   45.95   1 Cumulative distribution 0.8 0.6 0.4 native ping (eth0) orig. dom0 0.2 orig. domU new sched. dom0 new sched. domU 0 300 400 500 600 700 800 900 1000 Latency (us) Operating Systems Lab. http://os.korea.ac.kr 18
  • 19. Appendix. Fairness? •  is still good, and achieves high utilization CPU burning jobs’ utilization dom2 dom1 NO I/O (ideal case) Orig. credit New scheduler * Setting Dom1: 20, 40, 60, 80, 100% CPU load + ping receiver Dom2: 100% CPU load Note that the credit is work-conserving Normalized Orig. credit New scheduler throughput = ( Measured thruput/ ideal thruput ) Operating Systems Lab. http://os.korea.ac.kr 19
  • 20. Appendix. Latency in multi-OS env. •  3 domain cases with differentiated service –  added RT_BOOST priority, between DRIVER_BOOST and BOOST –  Dom1 assuming RT –  Dom2 and Dom3 for GP Credit’s latency dist. 3 domains for Enhanced latency dist. 3 doms. for 10K ping tests (interval 10~40ms) 10K ping tests (interval 10~40ms) 100.00% 100.00% 90.00% 90.00% 80.00% 80.00% 70.00% 70.00% 60.00% 60.00% 50.00% Dom1 50.00% Dom1 40.00% Dom2 40.00% Dom2 30.00% Dom3 30.00% Dom3 20.00% 20.00% 10.00% 10.00% 0.00% 0.00% 0 6000 12000 18000 24000 30000 36000 42000 48000 54000 60000 66000 72000 78000 84000 90000 96000 102000 108000 114000 120000 0 6000 12000 18000 24000 30000 36000 42000 48000 54000 60000 66000 72000 78000 84000 90000 96000 102000 108000 114000 120000 Operating Systems Lab. http://os.korea.ac.kr 20
  • 21. Appendix. Latency in multi-OS env. •  3 domain cases with differentiated service –  added RT_BOOST priority, between DRIVER_BOOST and BOOST –  Dom1 assuming RT –  Dom2 and Dom3 for GP 100.00% 90.00% 80.00% 70.00% 60.00% Enh. Dom1 Enh. Dom2 50.00% Enh. Dom3 40.00% Credit Dom1 30.00% Credit Dom2 20.00% Credit Dom3 10.00% 0.00% Operating Systems Lab. http://os.korea.ac.kr 21