각 전원 레일에는 표준 값이 없습니다. 전력 소모량이 많은 전원 레일을 식별하기 위해 Kuro Games는 유휴, 실행, 전투 등 다양한 테스트 사례를 사용하여 A/B 테스트를 만들었습니다. 값이 분명히 높은 특정 전원 레일은 동일한 전원 레일의 값을 비교하여 식별할 수 있습니다. 다양한 테스트 사례 간의 동작 차이를 비교하면 전원 소모 문제의 근본 원인을 점진적으로 파악할 수 있습니다.
최적화
Kuro Games는 ODPM 데이터를 사용하여 각 최적화 시나리오의 개선사항을 측정할 수 있습니다.
CPU 코어 예약 전략을 변경하고 여러 스레드의 우선순위를 조정하여 대용량 코어의 워크로드를 줄입니다.
PSO (파이프라인 상태 객체)를 사전 컴파일하여 CPU의 런타임 셰이더 컴파일 워크로드 줄이기
GPU 렌더링 워크로드를 줄이기 위해 PVS (잠재적으로 표시 가능한 세트) 컬링 구현
GPU 렌더링 워크로드를 줄이기 위해 오프라인 그림자 가림 컬링을 베이킹
동일하고 재현 가능한 조건에서 테스트 결과를 비교하기 위해 Kuro Games는 동일한 3D 장면과 동일한 길이의 카메라 관점을 사용하여 테스트 사례에서 ODPM 데이터를 검색했습니다.
결과
Kuro Games는 ODPM 및 전원 프로파일링의 데이터를 활용하여 총 전원 소모량을 9.68% 줄였습니다. 9월 출시 (버전 0904)의 3233mW에서 11월 출시 (버전 1.4 최종)의 2920mW로 줄었습니다. 다음 그림은 일관된 FPS 및 그래픽 설정에서의 전원 절감 효과를 자세히 보여줍니다.
그림 3. 9월 버전과 11월 버전의 전원 레일 데이터 차이
ODPM 데이터는 현재 Pixel 6 이상 기기에서만 사용할 수 있지만 CPU 사용량, GPU 사용량, Batterystats를 비롯한 다른 측정항목을 통해 모든 Android 기기에서 개선사항을 확인할 수 있습니다. 예를 들어 Kuro Games에서도 Oppo Reno 5의 동일한 장면에서 GPU 사용량이 전반적으로 9.6% 감소했습니다.
ODPM 전원 레일 이름은 기기별로 다릅니다. 레일 이름은 'S2S_VDD_G3D'와 같을 수 있습니다. 해당 전원 모니터 데이터를 해석하려면 기기 하드웨어에 관한 구체적인 지식이 필요합니다. Android API 수준 35부터는 getSupportedPowerMonitors에서 PowerMonitor를 사용할 수 있습니다.
PowerMonitor를 사용하면 사람이 읽을 수 있는 라벨과 각 개별 OEM에서 설정한 원시 전원 레일 이름 간의 매핑을 검색할 수 있습니다.
ODPM이 없는 기기에서 개선사항을 확인하려면 CPU 클럭, GPU 클럭, 메모리 대역폭 추정치를 전원 소모량의 대리 변수로 사용할 수 있습니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-01-15(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-01-15(UTC)"],[],[],null,["# Kuro Games reduces 9.68% power consumption through Android Studio Power Profiler and ODPM for Wuthering Waves\n\n[Wuthering Waves](https://play.google.com/store/apps/details?id=com.kurogame.wutheringwaves.global)\nis a high fidelity action RPG game developed by Kuro Games.\nOptimizing the power consumption is very important to sustainably deliver a\npremium user experience for long gaming sessions.\n**Figure 1.** Wuthering Waves Screenshot\n\nAndroid Studio introduced the [Power Profiler](/studio/profile/power-profiler)\nfrom Hedgehog (2023.1.1) that can help developers understand power consumption\ndata based on On Device Power Rails Monitor (ODPM).\n\nWith power profiling capabilities in Android Studio, you can also\n[effectively A/B test power consumption](https://android-developers.googleblog.com/2024/04/how-to-effectively-ab-test-power-consumption-for-your-android-app-features.html)\nfor your Android app's features (as shown below).\n**Figure 2.** Android Studio Power Profiler Screenshot\n\nWhat they did\n-------------\n\nKuro Games began by using the Android Studio Power Profiler to understand how\ngame behaviors impact device power consumption. This experience led them to\ndevelop a customized tool based on Perfetto and ODPM, incorporating the\nfollowing enhancements:\n\n- Customized views - the developer can filter power rails and preset flexible time ranges.\n- Better maintenance - the developer can upload the power consumption data to their customized QA system and compare data across game versions.\n\n### Process ODPM data\n\nTo access ODPM data, Kuro Games used\n[Perfetto Trace Processor (Python) Metric API](https://perfetto.dev/docs/analysis/trace-processor-python#metric)\nto process `avg_used_power_mw data` of 30-second session from\n`android_powerrails` metric, which is defined as `AndroidPowerRails` in\n[Pertetto metrics proto](https://android.googlesource.com/platform/external/perfetto/+/main/protos/perfetto/metrics/perfetto_merged_metrics.proto),\ninto the following format:\n\n| Power Rail | Graphics Quality | FPS | Brightness | Average Power consumption | Percentage(Per Rail / Total) |\n|-----------------------|------------------|-----|------------|---------------------------|------------------------------|\n| power.rail.cpu.big | High | 30 | Low | 474.158mW | 14.70% |\n| power.rail.cpu.mid | High | 30 | Low | 470.916mW | 14.60% |\n| power.rail.cpu.little | High | 30 | Low | 438.662mW | 13.60% |\n| power.rail.gpu | High | 30 | Low | 346.761mW | 10.70% |\n| ... | ... | ... | ... | ... | ... |\n\n| **Note:** Screen brightness contributes significantly to power consumption, so it is important to set the same brightness throughout power consumption testing.\n\n### Identify high-power-consumed power rails\n\nThere is no standard value for each power rail. To identify high-power-consumed\npower rails, Kuro Games created A/B tests using different test cases including\nidle, running and combating. Specific power rails with obviously high values\ncan be identified by comparing values of the same power rails. By comparing the\nbehavioral differences across various test cases, the root cause of the power\nconsumption issue will be figured out gradually.\n\n### Optimizations\n\nWith ODPM data, Kuro Games can measure the improvement of each\noptimization scenario:\n\n- Changing the CPU core scheduling strategy and adjusting priority of different threads to reduce the workload of big cores\n- Pre-compiling the PSO (Pipeline State Object) to reduce the runtime shader compiling workload of CPU\n- Implementing PVS (Potentially Visible Sets) culling to reduce the GPU rendering workload\n- Baking offline shadow occlusion culling to reduce the GPU rendering workload\n\nTo compare test results under identical and reproducible conditions, Kuro Games\nretrieved the ODPM data in a test case using the same 3D scene and camera\nperspective with the same duration.\n| **Note:** If you don't have a customized profile system, you can refer to this [blog post](https://android-developers.googleblog.com/2024/04/how-to-effectively-ab-test-power-consumption-for-your-android-app-features.html) about how to compare power consumption ODPM data of different tests with the same duration through Power Profiler.\n\nResults\n-------\n\nBy leveraging data from ODPM and power profiling, Kuro Games reduced total power\nconsumption by 9.68%, from 3233mW in the September release (version 0904) to\n2920mW in the November release (version 1.4 final). The following figure details\nthis power reduction under consistent FPS and graphics settings.\n**Figure 3.** Power rail data differences between September version and November version\n\nODPM data is currently only available for Pixel 6 and higher devices, but\nimprovements can be seen on all Android devices through other metrics including\nCPU Usage, GPU Usage and Batterystats. For example, Kuro Games also saw an\noverall 9.6% reduction in GPU usage in the same scene for Oppo Reno 5.\n\nGet started\n-----------\n\nYou can start from [Power Profiler](/studio/profile/power-profiler), or\n[Perfetto Power Rails](https://perfetto.dev/docs/reference/trace-packet-proto#PowerRails)\ndata for advanced use cases.\n\nODPM Power Rail names are device-specific. A rail name may be something like\n\"S2S_VDD_G3D\"; specific knowledge of the device hardware is required to\ninterpret the corresponding power monitor data. From Android API level 35, you\ncan use [`PowerMonitor`](/reference/android/os/PowerMonitor) from\n[`getSupportedPowerMonitors`](/reference/android/os/health/SystemHealthManager#getSupportedPowerMonitors(java.util.concurrent.Executor,%20java.util.function.Consumer%3Cjava.util.List%3Candroid.os.PowerMonitor%3E%3E)).\nWith PowerMonitor, you can retrieve the mapping between human-readable labels\nand the raw power rails names set by each individual OEMs.\n\nTo verify improvement on devices without ODPM, you can use CPU clocks, GPU\nclocks, and memory bandwidth estimates as a proxy for power consumption.\n\nAdditional resources\n--------------------\n\n[Optimize power efficiency](/games/optimize/power)"]]