160 likes | 252 Views
Resource Management for Robotic Applications. Yi-Zong Ou Department of Computer Science National Tsing-Hua University, Taiwan. ICESS-11 Changsha, China Nov.16-18. E. T.-H. Chu, Wen-Wei Lu, Jane W. S. Liu, Ta-Chih Hung, Jwu-Sheng Hu. Collage of Service & Social Robots. Commonalities.
E N D
Resource Management for Robotic Applications Yi-Zong Ou Department of Computer Science National Tsing-Hua University, Taiwan ICESS-11 Changsha, China Nov.16-18 E. T.-H. Chu, Wen-Wei Lu, Jane W. S. Liu, Ta-Chih Hung, Jwu-Sheng Hu
Commonalities • Low cost • Responsive and easy to use • Short time to market • Easy to configure and customize Built from components on open platform
Difficulties • Components are developed independently • Their resource contention degrades responsiveness Our tools: • Without source code: RAAPT-HV Resource Allocation and Application Partition Tool • With source code: RC SS Robotic Class Scheduling Service
Scenario – Delivery Robot Yes. Mr. Chen, may I help you? Yes sir! Will go to library to get your book Hi, Anderson!! Go to library and get my book. Face Detection Speech Recognition Got it! Path Planning Video Surveillance Go this way!
RAAPT-HV CPU Resource Determination Partitions Management Performance Tuning Performance Monitoring Microsoft Hyper-V Face Detection Response time : 88 ms CPU Reserve : 70% Partition C Partition C 2 CPUs 40% Reserve Partition A Partition A 2 CPUs 50% Reserve Partition B 1 CPU 20% Reserve Partition B Partition C 2 CPUs 40% Reserve Partition D 1 CPU 10% Reserve Partition A 2 CPUs 50% Reserve Partition B 1 CPU 20% Reserve Response time (ms) CPU Reserve (%) CPU Utilization 50% 45% 30%
Microsoft Hyper-V Child Partitions Parent Partition User Mode VM worker process Time Critical Components Normal Components Windows Server 2008R2 Windows XP Windows XP Kernel Mode Microsoft Hyper-V (hypervisor) Physical Hardware We use Hyper-V for isolation and protection of performance critical components
Resource Allocation Processor Number of logical processor CPU reserve (%) CPU limit (%) Relative weight: 0~100
Scenario - ComputeMinimumCPUReserve ` RAAPT-HV Developers Partition A Partition B Specify experiments parameters Initial and Connect Partitions Return Status Return Status Check status and Run experiments Issue the Partitions Adjust Resources Adjust Resources Generate Config (.xml) Executes CoIs Execute ILPs Ask for Summary Read Config and Logs Generate logs (.txt) Generate Summary (.xls) Ask for Plot Read Config. and Summary files Plot the charts on GUI
800 Average response times of FDP (ms) VS percentage CPU reservation 600 400 200 0 10 20 30 40 50 60 70 80 90 100 GUI - Determination of Required Bandwidth Generate Summary 0 410 Select files Plot charts Select Log files (.txt) : 0 50 Generate Summary Increase APT 88 Decrease APT 70 Current Status APT: CPU Reserve: 88 ms, 70% Options Set CPU reserve Do it again 3:24 PM : 10 log files have been selected. 3:24 PM : CMCPUR_001.xls is generated.
Functionalities for Performance Tuning • Decrease the CPU resource usage by combing components in the same partition. • Decrease the overhead of switching between partitions. • Provide TunePerformanceToUseLessResource (TPTULR) to decrease the overall CPU usage If Sum of all CPU reserve < 100% then exit; Else, do CombineComponents If it is successful, declare successful; exit; Else, declare “Unable to reduce total CPU reserve by combining CoIs”; exit;
Scenario - CombineComponents ` RAAPT-HV Developers ILPs CoI-NL CoI-L Input a list of CoIs Create and Initialize Partitions Partition 1 Partition 2 Sort CoIs Core Core Core Core Assign CoI-L to P1 Start ILPs on P2 CoI-L CoI-NL CPU Reserve: CR% = Reserve-L + Reserve-NL CPU Reserve: 100% - CR% ※Assign CoI-NL to P1 Set reservation Run CoI-L and CoI-NL If Unsorted components list Non-increasing order (according to performance criticality) worse than APT PI-NL PI-L CoI-L: The Last CoI APTs CoI-NL:Next to CoI-L Compare PI-NL and PI-L to APTs respectively then do TryAgain macro CoI-NL CoI-NL CoI-L else TryAgain Macro Update the list of CoIs, go to ※ invoke CMCPUR Non-increasing order
Robotic Class Scheduler Service • Prioritize components according to their timing requirements. • Built on Microsoft Multi-Media Class Scheduler Service (MMC SS). • Specify the component types rather than priority. • Give higher boost to components with more stringent timing requirements.
Scenario of RC SS Obstacle Avoidance Motion Control Speech Recognition Compete for CPU resource P = Normal P = Normal P = Normal AvSetMmThreadCharacteristics(ObstacleAvoidance) AvRevertMmThreadCharacteristics() Time Critical Component Set Thread Priority Level to HIGH Set Thread Priority Level to Normal Obstacle Avoidance Robotic Class Scheduler Service (RC SS) P = HIGH P = Normal P = Normal Priority High Type of Tasks ObstacleAvoidnce , Localization MotionControl, ObjectIdentification SpeechRecognition Low
Summary • RAAPT-HV supports a semi-automatic iterative configuration and performance assessment and tuning process. • RAAPT-HV offers a way to reduce the ill-effects of resource contention when source code is not available. • RC SS offers the applications with the easiest and most light-weight mechanism for improved real-time performance with slight modification of source code.