# Configure CPU, GPU, and memory It's essential to configure your device’s basic settings before analyzing system performance. The settings play a significant role in the performance of the device. You can configure the CPU, GPU, and memory settings. Caution Any configuration changes can impact the power and the performance of the device. Ensure that you verify the impact across all relevant use cases before any modifications. ## Configure CPU You can check and modify the CPU configurations using the commands specified in the following table: Note The commands specified in the following table should be run on the device. The unit of the output value for these commands is in KHz. Note The commands containing `policy7` aren't supported on QCS5430 FP1. To configure a CPU for Qualcomm Dragonwing^™^ IQ-9075, Qualcomm Dragonwing^™^ IQ-8275, and Qualcomm Dragonwing^™^ IQ-615, see the corresponding addendum. - [Qualcomm Linux Performance Guide - Addendum for Qualcomm Dragonwing IQ-9075](https://docs.qualcomm.com/bundle/resource/topics/80-70030-10A/overview.html) - [Qualcomm Linux Performance Guide - Addendum for Qualcomm Dragonwing IQ-8275](https://docs.qualcomm.com/bundle/resource/topics/80-70030-10B/overview.html) - [Qualcomm Linux Performance Guide - Addendum for Qualcomm Dragonwing IQ-615](https://docs.qualcomm.com/bundle/resource/topics/80-70030-10C/overview.html) Table : Commands to configure the CPU | Command | Purpose | | --- | --- | | cat /sys/devices/system/cpu/online
Copy to clipboard | Checks the online CPU cores. | | echo 1 > /sys/devices/system/cpu/cpuX/online
Copy to clipboard | Turns on a CPU core.



>
>
> In cpuX, X represents the number of cores, which ranges from
0 to 7. | | echo 0 > /sys/devices/system/cpu/cpuX/online
Copy to clipboard | Turns off a CPU core.
In cpuX, X represents the number of cores, which ranges from
0 to 7. | | cat /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq
Copy to clipboard


cat /sys/devices/system/cpu/cpufreq/policy4/scaling_cur_freq
Copy to clipboard


cat /sys/devices/system/cpu/cpufreq/policy7/scaling_cur_freq
Copy to clipboard | Reads the current CPU frequency. | | cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies
Copy to clipboard


cat /sys/devices/system/cpu/cpufreq/policy4/scaling_available_frequencies
Copy to clipboard


cat /sys/devices/system/cpu/cpufreq/policy7/scaling_available_frequencies
Copy to clipboard | Reads the supported CPU frequencies. | | cat /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
Copy to clipboard


cat /sys/devices/system/cpu/cpufreq/policy4/scaling_min_freq
Copy to clipboard


cat /sys/devices/system/cpu/cpufreq/policy7/scaling_min_freq
Copy to clipboard | Reads the minimum CPU frequency. | | echo > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
Copy to clipboard


echo > /sys/devices/system/cpu/cpufreq/policy4/scaling_min_freq
Copy to clipboard


echo > /sys/devices/system/cpu/cpufreq/policy7/scaling_min_freq
Copy to clipboard | Sets the minimum CPU frequency. Replace
`` with the required frequency and run
the commands. | | cat /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
Copy to clipboard


cat /sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq
Copy to clipboard


cat /sys/devices/system/cpu/cpufreq/policy7/scaling_max_freq
Copy to clipboard | Reads the maximum CPU frequency. | | echo > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
Copy to clipboard


echo > /sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq
Copy to clipboard


echo > /sys/devices/system/cpu/cpufreq/policy7/scaling_max_freq
Copy to clipboard | Sets the maximum CPU frequency. Replace
`` with the required frequency and run
the commands. | | cat /sys/devices/system/cpu/cpufreq/policy0/stats/trans_table
Copy to clipboard


cat /sys/devices/system/cpu/cpufreq/policy4/stats/trans_table
Copy to clipboard


cat /sys/devices/system/cpu/cpufreq/policy7/stats/trans_table
Copy to clipboard | Checks the CPU residency. | | For example, to set the CPU frequency of the Silver core
at 1.5 GHz, run the following commands:


echo 1516800 > /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq
Copy to clipboard


echo 1516800 > /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq
Copy to clipboard | Sets the CPU frequency. Set `scaling_min_freq` and `scaling_max_freq` to the same frequency to keep the CPU frequency at the required level. | ## Configure GPU You can check and modify the GPU configurations on the device using the commands specified in the following table: Note The commands specified in the following table should be run on the device. The unit of the output value for these commands is in Hz. Table : Commands to configure the GPU | Command | Purpose | | --- | --- | | cat /sys/class/kgsl/kgsl-3d0/gpuclk
Copy to clipboard | Reads the current GPU frequency. | | cat /sys/class/kgsl/kgsl-3d0/gpu_available_frequencies
Copy to clipboard | Reads the supported GPU frequencies. | | cat /sys/class/kgsl/kgsl-3d0/devfreq/min_freq
Copy to clipboard | Reads the minimum GPU frequency. | | echo > /sys/class/kgsl/kgsl-3d0/devfreq/min_freq
Copy to clipboard | Sets the minimum GPU frequency. Replace `` with the required frequency in Hz and run the command. | | cat /sys/class/kgsl/kgsl-3d0/devfreq/max_freq
Copy to clipboard | Reads the maximum GPU frequency. | | echo /sys/class/kgsl/kgsl-3d0/devfreq/max_freq
Copy to clipboard | Sets the maximum GPU frequency. Replace `` with the required frequency in Hz and run the command. | | cat /sys/class/kgsl/kgsl-3d0/gpu_busy_percentage
Copy to clipboard | Reads the GPU percentage usage. | | For example, to set the GPU frequency at 600000000 Hz, run
the following commands:


echo 600000000 > /sys/class/kgsl/kgsl-3d0/devfreq/min_freq
Copy to clipboard


echo 600000000 > /sys/class/kgsl/kgsl-3d0/devfreq/max_freq
Copy to clipboard | Sets the GPU frequency at a required level, both `min_freq`
and `max_freq` should be set to the same frequency level. | | cat /sys/class/kgsl/kgsl-3d0/max_pwrlevel
Copy to clipboard


cat /sys/class/kgsl/kgsl-3d0/min_pwrlevel
Copy to clipboard | Reads the GPU power levels.



>
>
> Power level 0 corresponds to the maximum GPU clock frequency. As the power level value increases, the GPU clock frequency decreases. | | echo 0 > /sys/class/kgsl/kgsl-3d0/min_pwrlevel
Copy to clipboard | Sets the GPU frequency to maximum frequency. | ## Configure memory Memory configuration is crucial to conserve memory, make space available for processes, and balance the existing data in RAM when the physical memory reaches its limits. ### Set ZRAM disk size ZRAM is a RAM partition to swap memory space. It stores the inactive anonymous pages in a compressed form in RAM to conserve memory. The ZRAM disk size indicates the maximum amount of memory that can be swapped from RAM to ZRAM. It's recommended to set the ZRAM disk size to half the size of RAM. For example, to configure the ZRAM disk size to 1 GB for a RAM size of 2 GB, run the following commands on the device: swapoff /dev/zram0 Copy to clipboard echo 1 > /sys/block/zram0/reset Copy to clipboard echo 1073741824 > /sys/block/zram0/disksize Copy to clipboard mkswap /dev/zram0 Copy to clipboard swapon /dev/zram0 Copy to clipboard cat /proc/meminfo | grep -i "swap" Copy to clipboard The following is the command output: SwapCached: 0 kB SwapTotal: 1048572 kB SwapFree: 1048572 kB You can configure the ZRAM disk size at compile time by modifying the `-s` argument value in the `zram-swap-init-update` bash script in the source code in the following path: `layers/meta-qcom-hwe/dynamic-layers/openembedded-layer/recipes-extended/zram/zram` To change the size in the script, update the `` parameter: zramctl -a ${ZRAM_ALGORITHM} -s $device Copy to clipboard The following example shows the ZRAM size set to 1 GB: zramctl -a ${ZRAM_ALGORITHM} -s 1048576KB $device Copy to clipboard ### Enable/disable proactive compaction Compaction is a process that collects all the free memory spaces in the form of fragments into a large memory block. Proactive compaction determines the level of aggressiveness with which memory compaction happens in the background. It accepts a value between 0 and 100, with the default value set to 20. When the fragmentation score of the node exceeds a high threshold, the corresponding kcompactd thread initiates the proactive compaction process. The compaction process remains active until the score of the node falls below the low threshold. The thresholds for proactive compaction are as follows: - Low = 100 - proactiveness - High = low + 10% For instance, if the low threshold is 80, the high threshold would be 90. To enable proactive compaction, run the following command on the device: echo 20 > /proc/sys/vm/compaction_proactiveness Copy to clipboard To disable proactive compaction, which also turns off the periodic kcompactd wake-ups, run the following command on the device: echo 0 > /proc/sys/vm/compaction_proactiveness Copy to clipboard For more information, see [Proactive compaction for the kernel](https://lwn.net/Articles/817905/). ### Swappiness Swap space is a secondary storage that functions similar to the main memory or RAM. The primary parameter of swap space is swappiness. - This parameter determines how aggressively the kernel swap daemon (kswapd) swaps out [anonymous memory](https://www.kernel.org/doc/html/latest/admin-guide/mm/concepts.html#anonymous-memory) relative to the system page cache. - This parameter can take a value between 0 and 200. Increasing the value augments the amount of anonymous swapping. The configured value is 100, indicating that both anonymous and cache memories are reclaimed equally. To adjust the swappiness value, run the following command on the device: echo 100 > /proc/sys/vm/swappiness Copy to clipboard For more information about memory parameters, see [Documentation for /proc/sys/vm/](https://www.kernel.org/doc/Documentation/admin-guide/sysctl/vm.rst). ## Next steps - [Customize for performance tuning](https://docs.qualcomm.com/doc/80-70030-10/topic/18-customize.html#customize) Last Published: Jul 20, 2026 [Previous Topic Analyze performance with tools](https://docs.qualcomm.com/bundle/publicresource/80-70030-10/topics/13-performance_tools.md) [Next Topic Customize for performance tuning](https://docs.qualcomm.com/bundle/publicresource/80-70030-10/topics/18-customize.md)