Interested in tuning your Intel® RealSense™ Technology application to reduce power consumption, but don't know what tests are worth running? And what do you do with the results? There are multiple tools available to check for high power draw and some that will check for calls that are known to hog power. Info on some of these tools is available in the Resources section of this document.
Or you can just jump in and check for some of these known power consumers.
Don't draw unneeded power.
- Pause the camera when it’s not needed (see Strategies for Battery-Friendly Intel® RealSense™ Applications).
- Turn off unused SDK modalities (especially Speech engines). The Intel® RealSenseTM SDK provides a PauseModule function.
- Only call the specific functions required.(Especially only enable actually used gestures.
- Use separate threads for different modalities, including within hands or face mode, except for 2 hand gestures.
- Cache when possible to avoid component lookup overhead. You don't need to create data structures/objects per frame.
- Set the power state of Intel RealSense SDK modules with PXCPowerState.
Don't peg the CPU nor the GPU. Either can keep the system from entering Turbo Mode which means slower processing. A common causes of high GPU use is excessive rendering. Consider the following:
- Render close objects first and don't render overlapped objects (Avoid overlapping transparency).
- Reduce rendering per frame, refresh rates, and reduce textures on frequently rendered objects.
- Reduce frame refresh rate, especially at idle (This is also a way to save on monitor power draw.)
-;Limit floating point calls.
- Use Direct X* or OpenCL* optimizations.
Don't waste power and time with switching between 32 ad 64 bit libs .
Note: Unity* 4 uses 32 bit, Unity 5 uses 64 bit - the SDK defaults to using 32 bit, so you will need to add the 64 bit libraries if using Unity 5. You can use the Personal (free) edition if you add the .signature libraries to your project.
- Reduce screen resolution (suggest 1368x768) but be sure to provide scaling.
- Provide a better user experience through alignment of app and SDK.
- Cap the App’s FPS rate (30/60). This helps synchronize the app activity with slower RSSDK FPS, (only when camera active).•
- Don't wait for RSSDK frames.
- Watch out for waiting.
- Don't use a busy wait loop, but on the other hand, don't use all sleep calls. Instead use the SSE2 Pause API to balance the load between worker threads and get thread synchronization from mutex/semaphores as well as sleep(0).
- Use SpinWait WITH pause.
- Don't poll, use event driven logic.
- For WaitForSingleObject, use TryEnterCriticalSection WITH spin count).
- For PeekMessage , add WaitMessage API.
- Don't mess with the platform timer (or be sure to restore it to default). Consider using timer coalescing.
Here are some indicators of excessive power use that can be found using power and performance analyzers:
- Near full utilization of the CPU or GPU (not overall average but repeated peaks during app use).
- Non concurrent CPU/GPU use. (Can be seen with Intel® Graphics Performance Analyzer (Intel® GPA). Try SetMaximumFrameLatency(1)
- During idle, CPU is not entering lower C states. Find out if there's set periodic activity or refreshes keeping them out of idle.
- High timer Resolution. Usually the default timer is enough but if need high res timer use QueryPerformanceCounter or the RDTSC API instead of GetXXXTime APIs. Look at the Timer Coalescing.
- Excessive I/O, IRQ rates >10k/second.
- Context switching > 7k/active thread. Try reducing the # active threads, add more balancing, reduce waits.
- Systems class calls >45k/active thread. Look at timer rez and driver calls (including RealSense DCM).
- NTDelayExecution in ring 0 (context switching).
- DirectX apps that are always animating might need to process input on another thread to get the best input latency. Consider using waitable swap chains and disabling touch visualizations to get additional input latency savings.
- Intel® Graphics Performance Analyzer https://software.intel.com/gpa
- Intel® Platform Power Estimation Tool (IPPET) from https://software.intel.com/file/ippet-v123-setupzip.
- Power Gadget is available at https://software.intel.com/en-us/articles/intel-power-gadget-20.
- Tools from Microsoft*: Windows Performance Analyzer*, Perfmon* and Task Manager