In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
1. Overview
This paper mainly introduces the performance calculation method of CPU in SylixOS.
2. Introduction
BogoMips is a standard in SylixOS to measure the running speed of CPU, but it can only be used to roughly calculate the performance of CPU, which is not very accurate.
The method of CPU performance calculation in SylixOS is located in the kernel file "libsylixos/SylixOS/kernel/interface/CpuPerf.c".
3. Interface and its implementation
The relevant interfaces for calculating the speed of CPU operations are defined in the SylixOS kernel.
3.1 Interface introduction
# include
ULONG API_CpuBogoMips (ULONG ulCPUId, ULONG * pulKInsPerSec)
Function API_CpuBogoMips prototype analysis:
This function returns ERROR_NONE for success and ERROR_CODE for failure.
Parameter ulCPUId is CPU ID
The parameter pulKInsPerSec is the number of instructions executed per second (in thousands of instructions).
3.2 specific implementation process
The speed of computing CPU in SylixOS needs to consider the difference between single-core and multi-core processors. The single-core processor only needs to directly execute a certain number of counting cycles, which can be converted into the number of instructions per second according to the number of tick consumed to execute the counting cycle, while the multi-core processor needs to bind the counting loop thread to a specific CPU to ensure that it runs into the CPU and improve the accuracy of the calculation results. The specific implementation process is shown in figure 3.1.
Figure 3.1 flowchart of CPU performance calculation
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.