Increasing Timing Resolution for Processes and Threads in Linux
نویسندگان
چکیده
The goal of the project was to develop a method for obtaining timing information for Linux processes and threads that is more precise than the one currently provided by getrusage(). The getrusage() system call is a fairly standard one, that returns the time a process has been running (CPU time) in terms of seconds and microseconds. With even the most recent builds of the stable Linux 2.2.14 kernel, the timing is obtained by sampling the internal clock tick of the Linux operating system. This type of sampling can lead to imprecision in the timing of processes and threads as the basic clock tick unit in Linux (the constant HZ) is only operating at 100Hz. With this 100Hz system tick, it is possible to only approximate times within 10ms of the actual time for each sampled time period. Thus several of the digits in the microsecond portion of the getrusage() return values are inaccurate from the beginning. The current implementation of getrusage() uses these ticks to calculate the actual user time spent on a process. Whenever data is collected in this fashion, there is always the possibility that a sampling error is induced. When the Linux kernel samples this 100Hz system tick, it is possible to obtain inaccurate timing results, as the process may swap in right before the tick and swap out right after the tick. This situation will then cause an incorrect 10ms to be added to the user time of the process, when in fact the actual time spent is much less than 10ms. With any long term process it is apparent that this imprecision in data acquisition might not amount to much of a difference, however with very fast operations, this error can add up quickly, and the accuracy of the timing can be affected greatly.
منابع مشابه
Effects of Digital Elevation Models (DEM) Spatial Resolution on Hydrological Simulation
Digital Elevation Model is one of the most important data for watershed modeling whit hydrological models that it has a significant impact on hydrological processes simulation. Several studies by the Soil and Water Assessment Tool (SWAT) as useful Tool have indicated that the simulation results of this model is very sensitive to the quality of topographic data. The aim of this study is evaluati...
متن کاملScalable Tools for Non-Intrusive Performance Debugging of Parallel Linux Workloads
There are a variety of tools to measure the performance of Linux systems and the applications running on them. However, the resulting performance data is often presented in plain text format or only with a very basic user interface. For large systems with many cores and concurrent threads, it is increasingly difficult to present the data in a clear way for analysis. Moreover, certain performanc...
متن کاملWhere ’ s all the time going ?
In a UNIX system, time command reports real, system and user time used by command. For various reasons, the reported times are likely to be at variance with the actual resources used by the program. We added high resolution timing of the actual time spent in various states in the kernel to Linux 2.5.
متن کاملUser-Level Socket-Based Checkpointing for Distributed and Parallel Computation
We present a preliminary description of a user-level checkpointing package, DMTCP, for Linux. The socket-based approach presents a novel method for checkpointing distributed processes. This includes checkpointing of any dynamically created POSIX threads and forked child processes. It also includes checkpointing of remotely spawned processes via ssh and other mechanisms. As with all user-level c...
متن کاملA Scheduling of Periodically Active Rank of DRAM to Optimize Power Efficiency
Main memory is expected to grow significantly in both speed and capacity for it is a major shared resource among cores in a multi-core system, which will lead to increasing power consumption. Therefore, it is critical to address the power issue without seriously decreasing performance in the memory subsystem. In this paper, we propose a periodically active rank scheduling (PARS) to optimize pow...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2003