plasma control system pcs server
play

plasma control system (PCS) server environment based on MRG-R - PowerPoint PPT Presentation

Performance test of new real time plasma control system (PCS) server environment based on MRG-R Yeonjung Kim a , S. H. Hahn a , W. R. Lee a , H.Han a , M. H. Woo a , B. G. Penaflor b and Y. S. Bae a a National Fusion Research Institute(NFRI),


  1. Performance test of new real time plasma control system (PCS) server environment based on MRG-R Yeonjung Kim a , S. H. Hahn a , W. R. Lee a , H.Han a , M. H. Woo a , B. G. Penaflor b and Y. S. Bae a a National Fusion Research Institute(NFRI), Daejeon, Korea b General Atomics, San Diego, CA, USA 1

  2. Table of Contents 1 . Introduction - Why Performance T est ? - MRG-R 2. Method for MRG-R System Tuning 3. Conditions for Performance T est - Input values & setting - Measurement of Time Register 4. Results of Performance T est 5. Summary and Future Plan 2

  3. Introduction(1)  Why the performance test ?  The real-time control environment of KSTAR Plasma Control System(PCS) requires fast control cycles up to 20 KHz, which is very difficult to support at the standard Linux OS scheduler.  KSTAR uses a customized Linux kernel which is not influenced by any external interrupts in the real-time operation mode( rtmode) .  The MRG-R[http://www.redhat.com/products/mrg/realtime] is an ITER-compatible real-time Operation System (OS) which showed the most excellent performance.  We want to confirm that the MRG-R is suitable as the real- time OS environment for the KSTAR PCS. 3

  4. Introduction(2)  Red Hat Enterprise MRG Realtime (MRG-R)  BENEFITS & FEATURES of MRG-R  Highly deterministic performance  High-resolution actions  Full application compatibility with standard Red Hat Enterprise Linux.  Uninterrupted services for high-priority processes.  MRG-R replaces the standard Red Hat Enterprise Linux kernel in order to provide extra support for real-time computing. 4

  5. MRG-R System Tuning (1)  PCSRT6 Version : RHEL 6.3 (2.6.32-279.el6.x86_64) MRG-R (3.8.13-rt27.33.el6rt.x86_64)  Disable the graphic desktop: Set runlevel 3  Disable the irqbalance deamon - Use chkconfig to ensure that irqbalance does not restart on boot. - Open /etc/sysconfig/irqbalance in editor and find the section of the file titled FOLLOW_ISOLCPUS and remove the # character. - change the values to yes . 5

  6. MRG-R System Tunning(2)  Booting by the MRG Realtime kernel (a) Open the /etc/grub.conf file and add crashkernel =128M (b) Add the parameter for TSC timer synchronizaton clocksource=tsc powernow-k8.tscsysn=1 (c) isolcpus = 13-23 is boot kernel option for CPU isolation. 6

  7. Conditions for Performance T est(1)  Run the test program (testrtmode.c) at the isolated CPU to match the conditions of KSTAR RT process running  Input values setting - CPU number =13 - Test period for test program (NUMSECOND)=5 seconds  Main settings - Number of sample cycles : 5000 or 20000cycle - Threshold value (=unit for control cycle) : 1/10/20/50 µs  Method of performance measurement - Measures total running time more than the threshold value. - Do the test for threshold 10/20/50µs as well. 7

  8. Conditions for Performance T est(2)  Measurement of total running time by the Time Register  Use the internal 64-bit clock counter as the time register.  Read into Register(EDX:EAX) using the instruction of RDTSC (read time stamp counter)[http://en.wikipedia.org/wiki/Time_Stamp_Counter]  Using the readclock() function call , get the count values.  Counters are converted as physical time using the CPU clock cycle. (For pcsrt6, the CPU clock cycle is measured as 2300MHz)  Calculation of the total running time  total count values is divided by CLOCKMICROSECOND(2300) 8

  9. Conditions for Performance T est(3) * Optimization of test program (testrtmode.c) while (NUMSECOND & max_sample_cnt< MAX_SAMPLE ) { Readtick(t_diff= t_current - t_last); /* get the count values of each section */ total_clock_val=+ t_diff; /*accumulation of running count values */ max_sample_cnt++; If(t_diff > THRESHOLD*CLOCKMICROSECOND) /* excess threshold*/ { save_elapsed_seconds[num_delays] = elapsed_seconds save_elapsed_milliseconds[num_delays] = elapsed_milliseconds save_t_diffs[num_delays] =t_diff/CLOCKMICROSECONDS; save_excess_time += save_t_diffs[num_delays]; num_delays++; /* number of excess threshold values */ } else num_lower_delays++; /* number of less than threshold values */ } 9

  10. Conditions for Performance T est(4)  Explain the Variable used the test program(testrtmode.c) Variable & synonym explain CLOCKMICROSECOND CPU clock cycle per 1µs =2300 max_sample_cnt num_delays + num_lower_delay MAX_SAMPLE(synonym) sample cycle(synonym) total_running_time Total_clock_val /CLOCKMICROSECOND Response time (synonym) average_excess_cnt ( num_delays/max_sample_cnt )*100 average excess rate(synonym) 10

  11. Results of Performance T est(1)  Result of test  Basic test: only measure the counters  Dummy load test : add the additional load using a printf() between two measurements in repetitive statement while().  Expected Total Running Time Threshold ( µs) sample 5000 cycle Sample 20000cycle 1µs 5000 µs 20000 µs 10µs 50000 µs 200000 µs 20µs 100000 µs 400000 µs 50µs 250000 µs 10000000 µs 11

  12. Results of Performance T est(2)  Average excess rate of basic test Threshold ( µs) sample 5000 cycle Sample 20000cycle 1µs 0 % 0 ~0.01% 10µs 0 % 0 % 20µs 0 % 0 % 50µs 0 % 0 % * Total test number is 10 times *  No sample cycles behind the threshold are found at the first 5000 sample cycles  0.01% of sample cycles behind the threshold are found at the first 20000 sample cycles at threshold 1µs (20% of total test number)  From the basic test, the MRG-R environment is capable to perform a single process up to 10µs(=100 kHz) of the control cycles without delay 12

  13. Results of Performance T est(2)  Average excess rate of dummy test Threshold ( µs) sample 5000 cycle Sample 20000cycle 1µs 0~56 % 0~89% 10µs 0 % 0 % 20µs 0 % 0 % 50µs 0 % 0 % * Number of total test is 10 times *  Minimum value is 0, Maximum value is 89.  Addition of the printf() (calls interrupts for display) makes the test program performance slower  However, the test program did not have performance delay up to 10 µs of control cycle by the additional dummy load  The 1 µs threshold is seriously affected by this interrupt calling 13

  14. Summary and Future Plan  Performance test for real-time PCS process under MRG-realtime (MRG-R) environment is done at pcsrt6 system.  The system is optimized following the official tuning guide of MRG-R  A special test program of measuring response time is used for testing performance at control cycles of 1/10/20/50 us  For a single isolated process, the MRG-R is capable of safely running control cycles up to 10 us  Future plan :  Test compatibility of the communication hardware (RFM or digitizer)  Test performace of the new PCS process for NTM mode detection acquisition 14

Recommend


More recommend