Skip to content

WuChao-2024/Performance_Skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

English| 简体中文

Performance Node

The Performance Node application is a web-based tool accessible via any computer or mobile device's browser regardless of brand. To set up and use the application:

desktop_demo

mult_device

  1. Installation Install required packages, primarily Flask and psutil, using the following command:

    pip install -r requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
  2. Running the Application Execute the app.py file with:

    python3 app.py
  3. Accessing the Application By default, the application listens on port 7999 within the same local network; access it via:

    http://192.168.xxx.xxx:7999
    
  4. Command Line Arguments Users can manually specify parameters when running the application:

python3 app.py --device 1 --port 6666 --debug 1 --log 1

options:
  -h, --help       show this help message and exit
  --device DEVICE  0: RDK X3 (Module), 1: RDK Ultra, 2: RDK X5, 3: RDK S100
  --port PORT      enter the port you like.
  --debug DEBUG    Flask Debug Mode, 0:false, 1:true.
  --log LOG        Flask log, 0:false, 1:true.
  1. Data Collection

    • CPU Data: The CPU usage percentages for each logical processor are obtained using psutil.cpu_percent(percpu=True). A list of float values is returned, with each entry corresponding to the utilization of a specific CPU core, maintaining the same order across calls even when invoked from different threads.

    • BPU Data: BPU utilization data comes from files specific to the devices:

      • For RDK X3, RDK X3 Module, and RDK Ultra: /sys/devices/system/bpu/bpu0/ratio and /sys/devices/system/bpu/bpu1/ratio.
      • For RDK S100: /sys/devices/system/bpu/bpu0/ratio.
    • GPU Data:GPU utilization data comes from files specific to the devices:

      • For RDK X5: /sys/kernel/debug/gc/load
    • Memory Data: Memory usage stats are gathered through psutil.virtual_memory(), returning a named tuple with details such as available memory, which is the amount immediately allocatable to processes without swapping, and used memory, which is calculated differently across platforms and intended for informational purposes.

    • Temperature Data: Temperature readings come from different paths for each device:

      • RDK X3, RDK X3 Module: /sys/class/hwmon/hwmon0/temp1_input
      • RDK X5 :
            DDR:/sys/class/hwmon/hwmon0/temp1_input
            BPU:/sys/class/hwmon/hwmon0/temp2_input
            CPU:/sys/class/hwmon/hwmon0/temp3_input
      • RDK Ultra: /sys/devices/virtual/thermal/thermal_zone8/temp (among others)
    • Frequency Data:

      • RDK X3, RDK X3 Module, RDK X5read frequency data from one file: /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq.
      • RDK Ultra doesn't collect this data due to its impact on system load.
    • Disk Usage Data: Disk usage statistics are retrieved with psutil.disk_usage(), providing information about total capacity, used space, free space, and usage percentage for a specified directory. The used field indicates total used space while free represents available space for regular users.

  2. Performance Mode Settings Performance modes can be changed by sending commands to the command line via os.system():

    • For RDK X3 and RDK X3 Module, setting the CPU governor to 'performance' mode involves echoing the word 'performance' to a specific file.
    • For RDK X5, setting the CPU governor to 'performance' mode involves echoing the word 'performance' to a specific file.
    • For RDK Ultra, similar commands are run for all eight CPU policies.

The application includes various power/performance modes such as 'performance' (highest frequency), 'powersave' (lowest frequency), and 'schedutil' (Linux 4.7+ strategy adjusting frequency based on scheduler-provided CPU utilization info).

Users encountering issues can submit issues or pull requests. There's also a satisfaction survey for the Performance Node, displayed as an image link.

survey

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors