Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
init.rc: Disable native stats collection service
When opening and closing activities in Settings, a measurably significant amount of CPU time is spent processing and logging stats events in statsd: 0.02% /apex/com.android.os.statsd/lib64/libstatspull.so @plt 0.01% /apex/com.android.os.statsd/bin/statsd @plt 0.01% /apex/com.android.os.statsd/bin/statsd SocketListener::runListener() 0.01% /apex/com.android.os.statsd/bin/statsd android::os::statsd::LogEvent::parseBuffer(unsigned char*, unsigned long) 0.01% /apex/com.android.os.statsd/bin/statsd android::os::statsd::LogEvent::parseAnnotations(unsigned char, int) Over longer device uptimes with real-world usage, statsd uses a substantial amount of total CPU time. We have no use for the stats recorded by statsd, so disable the service entirely to save CPU in potential hotpaths. This is the system/core part of the change; changes to frameworks/base are also required. Test: simpleperf record -a; verify that statsd no longer appears in sample hits Change-Id: Idf6fdb0eff987169bd5f370dd72315e831a669e6 Tested-By: SakuraiLH-MergeBot <quantalogic@outlook.com>
- Loading branch information