6 research outputs found

    Linux Low-Latency Tracing for Multicore Hard Real-Time Systems

    Get PDF
    Real-time systems have always been difficult to monitor and debug because of the timing constraints which rule out any tool significantly impacting the system latency and performance. Tracing is often the most reliable tool available for studying real-time systems. The real-time behavior of Linux systems has improved recently and it is possible to have latencies in the low microsecond range. Therefore, tracers must ensure that their overhead is within that range and predictable and scales well to multiple cores. The LTTng 2.0 tools have been optimized for multicore performance, scalability, and flexibility. We used and extended the real-time verification tool rteval to study the impact of LTTng on the maximum latency on hard real-time applications. We introduced a new real-time analysis tool to establish the baseline of real-time system performance and then to measure the impact added by tracing the kernel and userspace (UST) with LTTng. We then identified latency problems and accordingly modified LTTng-UST and the procedure to isolate the shielded real-time cores from the RCU interprocess synchronization routines. This work resulted in extended tools to measure the real-time properties of multicore Linux systems, a characterization of the impact of LTTng kernel and UST tracing tools, and improvements to LTTng

    Runtime Verification of Real-Time Applications Using Trace Data and Model Requirements

    Get PDF
    RÉSUMÉ Surveiller les systèmes multi-cœurs est difficile en raison des processus s'exécutant en parallèle, et pouvant interférer les uns avec les autres lorsqu'il s'agit d'accéder aux ressources du système, ou simplement d'avoir du temps processeur. Un tel système peut avoir à suivre des principes temps réel, ajoutant des contraintes de temps qui invalident les résultats dès qu'une date limite est manquée. Sur ce genre de système, des données précises n'auront ainsi de valeur que si elles peuvent être produites en respectant un délai donné. Le traçage peut fournir une grande quantité d'informations d'exécution de haute précision, à la fois sur le système et les applications. Il est ainsi souvent l'outil le plus précis et fiable pour étudier et analyser des systèmes ainsi contraints. Cependant, les utilisateurs doivent disposer d'une grande expertise du système afin de comprendre les évènements du noyau du système et leur signification. De plus, il peut être très long d'analyser et étudier manuellement de volumineuses traces d'exécution de haute précision. Dans cette thèse, nous proposons les méthodes et algorithmes permettant d'automatiquement détecter et identifier l'origine de comportements inattendus dans des applications, et ce à l'aide de traces de leurs exécutions et de modèles des exigences. Nous décrivons la structure interne des modèles, la méthodologie pour suivre l'exécution d'une application à travers ses évènements de l'espace utilisateur, et les structures de données nécessaires pour vérifier les contraintes. Nous détaillons ensuite le processus utilisé pour détecter et finalement comprendre la source du comportement non désiré. Nous proposons aussi une approche pour construire automatiquement les modèles pour des applications temps réel courantes. L'hypothèse servant de point de départ pour ce travail est que les traces d'exécution du système et de l'application à analyser peuvent être utilisées pour automatiquement suivre l'exécution de cette application, y détecter les anomalies et trouver leurs sources. Les résultats de ce travail sont les concepts, méthodologies et structures de données utilisés pour suivre et contraindre des applications, ainsi que les méthodes et algorithmes qui permettent de détecter et identifier les comportements inattendus dans ces applications. Ces derniers ont été testés sur de réelles applications temps réel, et ont permis avec succès de détecter et identifier l'origine des irrégularités à leur exécution. De plus, nous avons pu automatiquement, et de façon précise, construire des modèles pour ces applications. Cette dernière étape rend l'utilisation des méthodes de traçage beaucoup plus accessible aux utilisateurs non-experts. Le résultat final est que la détection automatique et la localisation automatique de la source des comportements inattendus dans une application est une option viable et fonctionnelle, qui accélère et simplifie le travail des utilisateurs pour analyser les exécutions de leurs applications.----------ABSTRACT Monitoring multi-core systems is hard because of the concurrently running processes that can contend with each other to access resources of the system or CPU time. Such a system may have to follow real-time principles, adding time constraints that invalidate results as soon as a deadline is missed. This means that accurate data will only be valuable if it can be produced in a timely fashion. Tracing is often the most accurate and reliable tool to study and analyze those systems, as it can provide a lot of high precision runtime information about both the system and applications. Nevertheless, a deep level of expertise of the system is required in order for the users to understand the kernel events and their meaning. Moreover, it can be time consuming to manually analyze and study voluminous high precision execution traces. In this thesis, we propose methods and algorithms to automatically detect and identify the origin of unwanted behaviors in applications, by using traces of their execution and models of the requirements. We describe the internal structure of the models, the methodology to follow an application runtime through its userspace events, and the data structures needed to verify constraints. We then detail the process followed to detect and finally understand the root cause of the unwanted behavior. We also propose an approach to automatically build the models for common real-time applications. The hypothesis serving as starting point for this work is that execution traces of both the system and the application to analyze can be used to automatically follow this application's execution, detect its anomalies and find their root causes. The results of this work are the concepts, methodologies and data structures used to follow and constrain applications, as well as the methods and algorithms allowing to detect and identify unexpected behaviors in those applications. These have been applied on actual real-time applications and succeeded in detecting and identifying the root causes of the irregularities in their runtime. Moreover, we were able to automatically and accurately build models for those applications, making it even easier for non-expert users to take advantage of tracing methods. The final result is that automatically detecting and pinpointing the origin of unwanted behaviors, in an application, is a valid and interesting option, making it faster and easier for users to analyze executions of their applications

    Traçage de systèmes linux multi-coeurs en temps réel

    Get PDF
    RÉSUMÉ Le traçage est une méthode d’analyse de plus en plus populaire compte tenu de la précision des données qu’il permet de réunir concernant les activités d’un système. Nombre de systèmes demandent cependant aujourd’hui de fonctionner dans des conditions restreintes : c’est le cas des systèmes temps réel. Ces systèmes reposent sur le respect d’échéances dans le traitement de données. Autrement dit, une donnée exacte n’aura de valeur dans un système de ce type qu’à condition qu’elle soit obtenue dans les délais, sans quoi le système sera considéré défaillant. Ces conditions excluent par conséquent tout outil d’analyse impactant de manière significative la latence et les performances du système. Le traçage repose sur l’ajout de points de trace au sein de l’application ou du système d’exploitation tracé. Ces derniers vont générer des évènements lorsqu’ils sont atteints durant l’exécution et ainsi permettre de suivre l’état d’un système au fur et à mesure de son exécution. Cependant, la génération de ces données implique une modification dans le déroulement normal de l’application ou du système tracé, et par conséquent un impact. Il devient alors important de pouvoir quantifier cet impact de manière à savoir sous quelles conditions une application temps réel pourra ou ne pourra pas être tracée, autrement dit, de savoir si l’ajout de ce délai de traitement rendra le système défaillant, et par conséquent inadéquat au traçage. L’objectif de cette recherche est de montrer qu’il est tout à fait possible d’utiliser le traçage pour analyser de telles applications, et ce avec un impact en terme de latence que nous souhaitons quantifier pour le pire cas. Pour ce faire, nous allons définir un environnement de travail temps réel en étudiant les divers systèmes et configurations spéciales mis à disposition. Ensuite nous verrons quels sont les outils permettant de valider la qualité de notre environnement de travail et quel est leur fonctionnement. Nous comparerons par la suite les différents outils mettant à disposition des traceurs, et lesquels parmi eux nous permettent de corréler des traces du noyau et de l’espace utilisateur. Une fois l’environnement défini et vérifié et l’outil de traçage choisi, notre méthode expérimentale reposera sur un étalonnage du système temps réel permettant par la suite d’évaluer l’impact du traceur sous différents angles à l’aide de la création de différent scénarios d’analyse. Cette méthode expérimentale prendra en compte la latence ajoutée sur le système par l’instrumentation, le traçage mais aussi la qualité des traces obtenues. Ces éléments seront les marqueurs de qualité du traçage dans des conditions temps réel. L’hypothèse servant de point de départ de ce travail est qu’en isolant le fonctionnement du traceur de celui de l’application temps réel tracée, l’impact de l’outil de traçage sur l’application pourra être radicalement réduit. Les résultats de ce travail sont la découverte et l’intégration aux outils existants d’un modèle pour supprimer les communications entre l’application tracée et le traceur durant la période active de traçage, permettant ainsi de n’ajouter qu’une interférence minimale sur l’exécution normale de l’application, permettant ainsi de rendre le traçage apte à fonctionner dans nombre de conditions temps réel, du moment que le délai maximal qu’il ajoute entre dans l’échéance de celle-ci. De plus, l’outil npt créé comme outil d’étalonnage et d’analyse de l’impact a évolué au fur et à mesure de nos recherches et est maintenant un logiciel disposant de différentes options pour simuler de multiples scénarios d’exécution d’une application temps réel. Enfin, la méthodologie d’analyse de l’impact du traçage sur le système temps réel constitue elle aussi un des résultats de cette étude. Le résultat final est que l’utilisation du traçage pour une application temps réel s’exécutant dans l’espace utilisateur est viable pour la plupart des systèmes temps réel avec une latence ajoutée de seulement quelques microsecondes.----------ABSTRACT Tracing is an analysis method increasingly popular. It provides a lot of information of high precision about a system or application. However, many systems need to operate under restricted conditions. This is the case of real-time systems. These systems are based on meeting deadlines in data processing. In other words, accurate data will only have a value if we can poduce it in a timely fashion, otherwise we will consider the system as defective. These conditions therefore exclude any analysis tool which could impact significantly the system latency or performance. Tracing is based on the addition of tracepoints directly in the application or operating system source code. There tracepoints will generate events when they are reached as part of the execution, and allow to monitor the system or application state during its run. Still, the generation of this data involves a change in the normal course of the traced system, hence an impact. It then becomes important to quantify this impact in order to know the conditions for tracing a real-time application, in other words, to know whether the added latency will invalidate the real-time condition, hence force to consider tracing as inedequate or not. The objective of this research is to prove that it is possible to use tracing to analyze such applications, thus quantifying the maximum impact in terms of latency. In order to do that, we will define a real-time work environment by studying the various systems and special configurations available, then we will see what tools allow to validate the quality of our work environment and how they work. We will then compare the various tracing tools and identify which allow us to correlate the kernel and userspace traces. Once we have setup and verified our real-time environment and selected our tracing tool, our experimental method will be based on real-time system calibration to subsequently assess the impact of the tracer from different use cases, using different analysis scenarios. This experimental method will take into account the latencies added by the instrumentation and the tracing of the system, but also the quality of the generated traces. These elements will be considered as quality markers of real-time tracing. The hypothesis serving as starting point for this work is that, by isolating the work of the tracer from that of the real-time application, the impact of the tracing tool on the application can radically be reduced. The results of this work are the discovery and integration in existing tools of a model to remove the direct connections, between the traced application and the tracer, while the tracing operations are active. This allows to only add a minimal interference to the normal execution of the application, thereby making tracing able to operate multiple real-time cases, as long as the maximum latency added can be supported by the traced application. In addition, the npt tool created as the calibation and impact analysis tool has evolved during our research and now offers options allowing to simulate multiple execution scenarios of real-time applications. Finally, the real-time tracing impact analysis methodology we developed is also one of the results of this study. The final result is that using tracing to analyze real-time applications running in userspace is a valid and good option for most real-time systems, adding latencies in the low microsecond range

    Detection of Common Problems in Real-Time and Multicore Systems Using Model-Based Constraints

    Get PDF
    Multicore systems are complex in that multiple processes are running concurrently and can interfere with each other. Real-time systems add on top of that time constraints, making results invalid as soon as a deadline has been missed. Tracing is often the most reliable and accurate tool available to study and understand those systems. However, tracing requires that users understand the kernel events and their meaning. It is therefore not very accessible. Using modeling to generate source code or represent applications’ workflow is handy for developers and has emerged as part of the model-driven development methodology. In this paper, we propose a new approach to system analysis using model-based constraints, on top of userspace and kernel traces. We introduce the constraints representation and how traces can be used to follow the application’s workflow and check the constraints we set on the model. We then present a number of common problems that we encountered in real-time and multicore systems and describe how our model-based constraints could have helped to save time by automatically identifying the unwanted behavior

    Enhanced state history tree (eSHT): a stateful data structure for analysis of highly parallel system traces

    Get PDF
    Behaviors of distributed systems with many cores and/or many threads are difficult to understand. This is why dynamic analysis tools such as tracers are useful to collect run-time data and help programmers debug and optimize complex programs. However, manual trace analysis on very large traces with billions of events can be a difficult problem which automated trace visualizers and analyzers aim to solve. Trace analysis and visualization software needs fast access to data which it cannot achieve by searching through the entire trace for every query. A number of solutions have adopted stateful analysis which rearranges events into a more query friendly structures after a single pass through the trace. In this paper, we look into current implementations and model the behavior of previous work, the State History Tree (SHT), on traces with many thread creation and deletion. This allows us to identify which properties of the SHT are responsible for inefficient disk usage and high memory consumption. We then propose a more efficient data structure, the enhanced State History Tree (eSHT), to store and query computed states, in order to limit disk usage and reduce the query time for any state. Next, we compare the use of SHT and eSHT on traces with many attributes. We finally verify the scalability of our new data structure according to trace size. As shown by our results, the proposed solution makes near optimal use of disk space, reduces the algorithm's memory usage logarithmically for previously problematic cases, and speeds up queries on traces with many attributes by an order of magnitude. The proposed solution builds upon our previous work, enabling it to easily scale up to traces containing a million threads

    Linux Low-Latency Tracing for Multicore Hard Real-Time Systems

    Get PDF
    Real-time systems have always been difficult to monitor and debug because of the timing constraints which rule out any tool significantly impacting the system latency and performance. Tracing is often the most reliable tool available for studying real-time systems. The real-time behavior of Linux systems has improved recently and it is possible to have latencies in the low microsecond range. Therefore, tracers must ensure that their overhead is within that range and predictable and scales well to multiple cores. The LTTng 2.0 tools have been optimized for multicore performance, scalability, and flexibility. We used and extended the real-time verification tool rteval to study the impact of LTTng on the maximum latency on hard real-time applications. We introduced a new real-time analysis tool to establish the baseline of real-time system performance and then to measure the impact added by tracing the kernel and userspace (UST) with LTTng. We then identified latency problems and accordingly modified LTTng-UST and the procedure to isolate the shielded real-time cores from the RCU interprocess synchronization routines. This work resulted in extended tools to measure the real-time properties of multicore Linux systems, a characterization of the impact of LTTng kernel and UST tracing tools, and improvements to LTTng
    corecore