Best Practices
Introduction
The end-to-end (E2E) operation latency of cloud phones and cloud gaming is a critical factor determining user experience. The BoostKit Kbox component provides the adaptive Vsync feature to optimize the Vsync mechanism of the Android graphics subsystem on the server, thereby reducing the latency during the rendering and capturing stage. Verification shows that this feature effectively reduces E2E operation latency in mainstream gaming scenarios.
Recommended Version
BoostKit Kbox 7.2.RC1 or later
Environment Setup
This practice requires the deployment of both the cloud phone server and client to ensure normal stream output from the cloud phone.
- Deploy the video-streaming cloud phone (7.2.RC1 or later) by following the Deployment and Installation Guide.
- Install the streaming client on a mobile phone or use other streaming methods to ensure normal stream output and cloud phone operation.
The Network transmission latency heavily impacts E2E latency. To ensure stable E2E latency measurement and accurate comparison of optimization effects in the following steps, ensure a stable network connection for the cloud phone stream output.
Feature Enablement
cd /home/kbox_videodocker cp android_1:/system/vendor/build.prop .echo "ro.vmi.adaptive.vsync=1" >> build.propdocker cp build.prop android_1:/system/vendor/build.prop./cfct_video restart 1- Check whether "
Enabling adaptive vsync." is printed in the logcat logs. If it is, adaptive Vsync has been successfully enabled.
Note:
android_1is a sample cloud phone container name. Adjust it based on your actual environment.- The adaptive Vsync feature is enabled when
ro.vmi.adaptive.vsyncis set to1. You can also use other methods (such as specifying this property value when compiling the Android image) to make it take effect upon container startup.
Verification
- Deploy the video-streaming cloud phone by following the instructions in the "Environment Setup" and "Feature Enablement" sections.
- Enable the crosshair cursor display on the phone (ensure that the crosshair appears on the local screen upon tapping). Run a common game application, such as Genshin Impact, and remain stationary at a fixed position after entering the game.
- Start cloud phone stream output.
- Prepare a stopwatch (or use a stopwatch app on another phone) and start timing.
- Use a recording device that supports 120/240 fps to simultaneously record the streaming phone screen and the stopwatch. Ensure that both the phone screen and the stopwatch clock are unobstructed in the video.
- Quickly click the in-game button multiple times with a 5-second interval between clicks. Stop recording after completing the clicks.
- In the recorded video, determine the time interval from the time when the crosshair appears (indicating a tap) to the time when the on-screen button responds. Record this interval as the tap latency. Calculate the average latency across multiple clicks.
- Repeat steps 2 to 7 after enabling adaptive Vsync, and record the average tap latency with adaptive Vsync active.
- Compare the average tap latency measured before and after enabling adaptive Vsync to observe its optimization effect on E2E latency.