Experience: A Five-Year Retrospective of MobileInsight¶
主要回顾了 MobileInsight 这一开源社区工具在过去五年 (2015-2020年) 中的发展历程: MobileInsight 旨在让商用手机能够进行软件定义的、全栈的、运行时的移动网络监控与分析, 从而打破移动网络对用户而言的"黑盒"状态.
-
工具的演进历程: 详细介绍了 MobileInsight 如何从最初简单的控制面协议分析器, 逐步演变为支持以下高级特性的工具集:
- 跨层垂直分析 (Cross-layer vertical analytics): 通过状态机跟踪和缺失数据推断来分析控制面、用户面以及跨平面的交互.
- 高能效的实时用户面分析: 针对海量用户面消息, 提出了结合领域知识的跨层采样 (domain-specific cross-layer sampling) 技术, 在保证分析准确率的同时大幅降低了 CPU 和电池消耗.
- 用户友好的 KPI 分析器: 为了降低使用门槛, 引入了直观的、可扩展的性能指标 (KPI) API, 涵盖无线电、移动性、能量等多个维度.
-
5 年网络延迟纵向研究: 利用从 2016 年至 2020 年收集的 6.4 TB 庞大数据集 (包含 61 亿条空口消息), 对移动网络的端到端 (E2E) 延迟进行了深入分析. 研究揭示了近年来网络延迟降低的根本原因 (如信令处理加快、调度间隔缩短、载波聚合等), 并探讨了设备移动速度、位置和硬件型号等上下文对延迟的影响.
-
社区应用与经验总结: 总结了自 2016 年以来全球超过 350 个学术界和工业界机构使用 MobileInsight 的情况, 涵盖了性能优化、安全威胁分析、能量消耗分析等多种实际用例.
Introduction¶
The mobile network has been a critical global infrastructure for decades. Together with the wired Internet, it oers ubiquitous wireless network access and wide-area seamless mobility. The 4G LTE and upcoming 5G have successfully served billions of users today, and will enable trillions of Internet-of-Things in the foreseen future.
Despite its great success, the mobile network remains a complex "black box" for its users. To enable "anywhere, anytime" network services, it incorporates various wireless communication, mobility management, data transfer, and security functions on the control plane and user plane. These functions work together to enable network services, and involve complex interactions in a distributed environment. Moreover, the mobile network inherits the "smart core, dumb terminal" design philosophy from the telephony network: Most functions are placed inside the infrastructure, leaving limited visibility to the end devices. Such opaqueness prevents devices from understanding what goes on, why it happens, and how to deal with it. Furthermore, operators are reticent to share their insights from the infrastructure side. So it is hard for researchers and developers to understand and exploit the operational mobile network.
To open up the "black box" mobile network operations to devices, we started the MobileInsight project in 2015. Our goal was to build an open-source community software tool that enables software-dened full-stack, runtime mobile network monitoring and analytics inside our commodity phones. This tool should enable open access to operational mobile network data and oer extensible in-device analytics for runtime network behaviors. It should facilitate researchers and developers to readily and accurately understand and exploit the mobile network, without relying on the netwrok infrastructure or operators.
We released the rst version of MobileInsight to the community in 2016 [13, 53]. Since then, MobileInsight has evolved from a simple in-device network monitor to an enabler of device-based network analytics, diagnosis, and customization. We are thrilled to see numerous real uses with MobileInsight, such as performance boosting, energy analysis, conguration diagnosis, security threat detection, to name a few (see representative studies in Table 3). We continuously rene its design based on user feedback, extend it with advanced features, use it to build large-scale operational datasets, and repeatedly validate its value in diverse scenarios.
This paper is a retrospective of our experiences in building and using MobileInsight over the past ve years. We revisit the (un)successful lessons from MobileInsight as a community tool. Rather than focusing on MobileInsight's specic issues, we use MobileInsight as an example to address three general questions:
(1) How can an in-device software tool help analyze the "blackbox" mobile network, and enable various new applications that existing solutions cannot?
(2) Looking back, what design choices did the original MobileInsight design make right, and what did not?
(3) What are the potentials and limitations of device-based, data-driven mobile intelligence and customization? The rest of the paper will answer these questions from both the developers' and users' perspectives. We explain why it is hard to enable in-device mobile network analytics in §2. Then in §3, we overview MobileInsight's goals, initial design with limitations, and its evolutions and milestones thereafter. In §4, we elaborate on how MobileInsight evolves from a simple monitor to an advanced software tool with cross-layer analytics, energy-ecient real-time user-plane analytics, and user-friendly and extensible KPI analytics. In §5, we exemplify the powerfulness of these features with a 5-year longitudinal study for operational network latency, and review the experiences of using MobileInsight by the community. We compare MobileInsight with related work in §6, and summarize our visions of MobileInsight's past, present, and future in §7.
In summary, this work has three main contributions:
(1) We report our experiences of developing MobileInsight in the past ve years. We show how MobileInsight evolves to a community tool with advanced network analytics. We review our positive and negative lessons of development;
(2) We summarize the quantitative benets and lessons of using MobileInsight in diverse scenarios by the community, and demonstrate the potentials and limitations of device-based mobile network intelligence with MobileInsight;
(3) We exemplify MobileInsight's powerfulness with a 5-year longitudinal study of mobile network latency using a 6.4TB dataset with 6.1 billion over-the-air messages, and show how MobileInsight unveils various insights of the operational networks for the community, and by the community.
The source code of MobileInsight is public available and updated at [13, 17] and the dataset is released at [16].
这部分 (Introduction) 主要介绍了 MobileInsight 项目的研发背景、目标、发展历程, 以及这篇五年回顾性论文的核心探讨点和主要贡献. 核心内容可以概括为以下几个方面:
背景与问题痛点:
尽管移动网络 (如4G/5G) 取得了巨大成功, 但对用户和终端设备而言, 它仍然是一个复杂的"黑盒".
由于移动网络继承了"智能核心, 哑终端"的设计理念, 大部分核心功能都在基础设施端, 导致终端设备对网络底层运行机制缺乏可见性, 研究人员和开发者也很难深入了解和利用实际的网络运行状况.
MobileInsight 项目的目标:
为了打破这种"黑盒"状态, 研究团队于 2015 年启动了 MobileInsight 项目. 其核心目标是构建一个开源的社区软件工具, 使商用手机能够在设备内部进行软件定义的、全栈的、运行时的移动网络监控与分析.
发展历程与应用现状:
自 2016 年首次发布以来, MobileInsight 已从简单的端侧网络监控器, 演变为支持设备端网络分析、诊断和定制 (如性能提升、能耗分析、安全威胁检测等) 的强大工具. 团队根据用户反馈不断完善设计, 并利用它构建了大规模的运行数据集.
论文探讨的核心问题: 作为一篇五年回顾性文章, 本文主要借 MobileInsight 探讨三个一般性问题:
- 端侧软件工具如何帮助分析"黑盒"网络并赋能传统方案无法实现的新应用?
- 回顾过去, 最初的设计选择中有哪些是正确的, 哪些是失败的?
- 基于设备和数据驱动的移动智能与定制化, 其潜力与局限性分别是什么?
论文的三大主要贡献:
- 开发经验总结: 报告了过去五年开发 MobileInsight 的经验与教训, 展示其如何演进为具有高级分析能力的社区工具.
- 使用收益与局限: 总结了社区在多样化场景中使用该工具的量化收益与经验, 展示了端侧移动网络智能的潜力与局限.
- 案例展示: 通过一项长达 5 年的移动网络延迟纵向研究 (使用了包含 61 亿条空口消息、大小为 6.4TB 的数据集), 具体展示了 MobileInsight 的强大功能及其为社区揭示的实际网络洞察.
Why is in-device analysics hard¶

这部分主要探讨了为什么在设备端进行移动网络分析非常困难. 移动网络对终端设备而言是一个复杂的"黑盒", 限制了设备理解和利用网络的能力.
这一困境主要源于以下两大挑战:
挑战一: 复杂的网络架构 (Complex network architecture)
4G/5G 移动网络由包含基站的无线接入网和核心网组成.
如 Figure 1 所示, 移动网络与互联网类似, 定义了控制面、用户面以及分层协议栈, 但它需要容纳更多的功能, 因此更加复杂.
- 在控制面, 网络定义了信令协议来进行无线电资源控制 (RRC)、广域移动性管理 (MM) 以及用于 QoS 和计费的流量会话管理 (SM).
- 在用户面, 网络定义了物理层 (PHY) 的无线信道结构、MAC 层的流量调度与复用、RLC 层的数据分段与可靠交付, 以及 PDCP 层的数据加密与完整性保护.
user plane 层次服务
- PHY: define wireless channel structures
- MAC: traffic scheduling/multiplexing/error control
- RLC: data segmentation and reliable in-order delivery
- PDCP: data ciphering and integrity protection
为了实现无处不在的网络服务, 这些协议必须在分布式环境中进行复杂的交互与协同工作.
挑战二: 设备端获取网络信息的途径受限 (Limited in-device access to network information)
如 Figure 1 所示, 设备侧的移动网络协议是在调制解调器芯片组 (硬件层) 内部实现的.
- 这些底层协议对 操作系统内核和 Mobile Apps 几乎是不可见的.
- 操作系统只能通过无线接口层 (RIL) 访问最基础的网络信息, 例如数据/语音状态和无线电信号强度.
- 对于用户空间的应用程序, 操作系统仅仅通过 API (例如 Android 中的 TelephonyManager) 暴露了 RIL 功能的一小部分子集.
- 这使得普通应用程序根本无法获取到底层的网络运行状态和协议交互细节.
Tip
画图太漂亮了, 学习一下人家的绘图方法
对应 mobileinsight 原论文的 fig.1
Overview of MobileInsight¶
The goal of MobileInsight is to build a community software tool for full-stack, runtime mobile network monitoring and analytics in commodity mobile devices. Specically, it should enable
(1) In-device, full-stack runtime monitor of over-the-air messages between device and network;
(2) Real-time deep analytics of mobile network status, congurations, policies, and data transfers in devices;
(3) Open and extensible platform for community to customize analytics and accommodate emergent features (e.g., 5G/IoT). This section reviews MobileInsight's initial design and limitations, and summarizes its evolution milestones from 2016 to 2020.
MobileInsight 旨在为商用移动设备构建一个用于全栈、运行时移动网络监控与分析的社区软件工具. 具体目标包括:
- 设备端全栈运行时监控: 捕获设备与网络之间的空口消息.
- 实时深度分析: 在设备内实时分析移动网络的状态、配置、策略以及数据传输情况.
- 开放且可扩展的平台: 供社区自定义分析功能并适应 5G/IoT 等新兴特性.
3.1 Initial Design¶
Figure 2 illustrates the evolution of MobileInsight. At its initial phase, our objective was to quickly build basic blocks while retaining its long-term extensibility [53]. We intentionally kept MobileInsight simple and open with two modules:
• In-device, full-stack runtime monitor: For the rst time, MobileInsight exposed runtime over-the-air messages from the chipset to user-space. Table 2 summarizes these messages. They carry rich information of mobile network protocols' states, congurations, and operation logic that legacy APIs did not expose. To collect them, MobileInsight exploits the diagnostic mode, a second channel between the hardware chipset and software. The diagnostic mode uses a virtual interface (e.g., /dev/diag for Qualcomm chipsets, summarized in Table 1) to expose in-chipset messages to the USB port. It is available in major OSes and chipsets from Qualcomm, MediaTek, Samsung, and Huawei. To this end, MobileInsight emulates an external logger inside the device, pulls the binary raw logs from virtual interfaces, parses their metadata headers and message contents, and feeds them to protocol analyzers.
• Protocol analyzers: The initial MobileInsight focused on the analysis of individual control-plane signaling protocol. Given raw messages, MobileInsight infers each protocol's states, triggering conditions for state transitions, and taken actions. Moreover, it infers certain protocol operation logic that uses operator-dened policies and congurations. MobileInsight abstracts each protocol analytics as an analyzer class with open APIs. Users can customize their own analytics on top of MobileInsight's built-in analyzers.
最初的设计 (如 Figure 2 所示) 保持了简单和开放, 主要包含两个模块:

- 设备内全栈运行时监控器: 首次将底层的空口消息从芯片组暴露给用户空间. 它利用硬件的诊断模式 (通过虚拟接口, 如 Table 1 所示的
/dev/diag) 提取底层日志. 收集到的消息种类及其包含的配置信息可参考 Table 2. - 协议分析器: 最初侧重于单个控制面信令协议的分析, 通过原始消息推断协议的运行状态, 状态转换条件以及操作逻辑.
3.2 Why is Initial MobileInsight Not Enough?¶
We publicly released the initial MobileInsight in 2016. From user feedback and our own experiences, we realized the initial MobileInsight has not yet achieved all its aforementioned goals:
(1) In-device, full-stack runtime monitor: This feature has been successful since MobileInsight's rst release, with positive user feedback and high satisfaction. Our rst release only supported Qualcomm chipsets. Later we supported MediaTek chipsets, and more messages from new standards (from 3GPP Release 7 to Release 15). To support new chipsets and OSes, we rst verify whether they have provided similar diagnostic ports. If yes, we can follow the similar way in the initial design (§3.1) to enable in-device monitor. As summarized in Table 1, we have validated that similar diagnostic ports are indeed available for Qualcomm, MediaTek, Huawei, and Intel chipsets. We have also validated that similar in-device monitor can be realized in iOS (although jailbreak is needed). In the past ve years, we have explored new virtual interfaces to enable MobileInsight at more device models (with new chipsets and OS versions) and continuously upgraded MobileInsight accordingly to support new 3GPP standards (up to Release 15). Our experience is that MobileInsight is extensible to future 3GPP standards and device models, given its successful extension to new standards, chipsets, and mobile OS versions in the last years. We only need to acquire latest commodity phones for testing and exploit diagnostic ports' driver codes as the ground truth. Moreover, the monitor-analyzer design is exible for long-term extension across devices: the monitor can be extended independently due to device-specic characteristics, while most analyzers can be reused across the devices.
(2) Real-time deep mobile network analytics: The initial MobileInsight mainly analyzed individual signaling protocols in the control plane. This is not enough for two reasons. First, many usage scenarios involve multiple protocols across layers in a distributed environment. It has been widely reported [54, 71, 73] that, even if each individual protocol behaves well, the interactions between protocols can still be problematic in reality. Understanding these interplays calls for cross-layer, vertical analytics (§4.1). Second, the user-plane analytics was largely missing, especially for the link/physical-layer analytics below the TCP/IP stack. Without it, many issues in runtime data transfer remained mysterious for devices. However, dierent from the control-plane analytics, the user plane one faces an explosive growth of over-the-air messages. This poses challenges on energy-ecient, real-time analytics (§4.2).
(3) Open and extensible platform: The initial MobileInsight indeed oered open APIs for ne-grained protocol analytics, customizable data collection, and extensible plugins. However, according to numerous technical inquiries and feedback from the community, they were not friendly to new users due to their nature of low-level semantics. Using these APIs requires deep understanding of mobile network and its complex operations, which is dicult for most users. This limits MobileInsight's wide adoption (§4.3).
自 2016 年公开发布后, 团队结合用户反馈发现初始版本并未完全实现所有目标, 存在以下不足:
- 底层监控需要持续适配: 虽然全栈监控功能备受好评, 但仍需要不断投入精力去探索新的虚拟接口
- 以适配更多芯片组 (如联发科, Intel), iOS 系统以及更新的 3GPP 标准.
- 缺乏深度与跨层分析能力: 仅分析单个控制面协议是不够的, 现实场景中的网络问题往往涉及多个协议在分布式环境下的跨层交互
- 同时, 由于用户面消息量呈爆炸式增长, 极度缺乏高能效的实时用户面 (TCP/IP 以下的数据链路/物理层) 分析
- 平台使用门槛过高: 初始版本提供的 API 语义过于底层, 需要用户具备深厚的移动网络运行机制知识
- 这对大多数新用户极其不友好, 限制了工具的广泛采用
3.3 Five-year Milestones¶
To address these limitations, we have progressively enhanced MobileInsight since its rst public release in 2016. These renements follow MobileInsight's simple framework in §3.1. Now the latest MobileInsight (v6.0, released in December 2020) has 60,409 lines of code (33,001 lines of C++ and 27,408 lines of Python). Figure 2 shows MobileInsight's evolution roadmap and milestones in the past ve years, from both the developers' and primary users' perspectives.
• Developers' milestones: MobileInsight evolves as follows: # 2015–2016: Basic in-device monitor (§3.1). We built the alpha MobileInsight for the in-device full-stack monitoring. # 2016–2017: Control-plane protocol analytics (§3.1). With runtime over-the-air messages, we enabled basic analytics of each individual signaling protocol, including the protocol state tracking and operation logic inference.
-
2017–2018: Cross-layer vertical analytics (§4.1). We added crosslayer analytics on top of individual protocol's analytics. We started from control-plane analytics, and later extended it to user plane and interplay across control/user planes.
-
2018–2019: Energy-ecient runtime user-plane analytics (§4.2). We devised cross-layer sampling with missing data inference (§4.1) for energy-ecient, real-time user-plane analytics.
-
2019–2020: User-friendly, extensible analytics (§4.3). To broaden the adoption, we followed the user feedback to extend MobileInsight with user-friendly, extensible KPI analyzers to streamline its usage.
• Users' milestones: Since 2016, MobileInsight has attracted global uses from 350+ academia and industry institutes (Figure 3).
We are thrilled to see numerous new device-based designs of mobile network intelligence with MobileInsight, including but not limited to data speed boosting [32, 54, 74], energy saving [35], failure and misconguration diagnosis [36, 81], security threat detection [37, 41], and emergent scenarios such as VR/AR [71], 360 # video [75], high-speed trains [56, 74], and many more. Table 3 shows representative use cases of MobileInsight by the community. We will elaborate on the lessons of using MobileInsight in §5.
为了解决上述局限, MobileInsight 进行了逐步升级与优化 (演进路线图如 Figure 2 所示):
开发者视角的发展时间线:
- 2015–2016: 建立基础设备内监控器
- 2016–2017: 实现控制面单协议分析
- 2017–2018: 增加跨层 (垂直) 协议分析能力
- 2018–2019: 开发了带有缺失数据推断功能的高能效实时用户面分析
- 2019–2020: 根据用户诉求, 推出用户友好且易于扩展的 KPI 分析器以精简使用流程
用户视角的应用拓展:

自 2016 年以来, 该工具吸引了全球超过 350 个学术界和工业界机构使用 (地域与机构分布如 Figure 3 所示). 它被广泛应用于网络提速, 故障与配置诊断, 安全威胁检测, VR/AR 以及高铁移动网络优化等众多新兴研究场景 (具体代表性用例参见 Table 3).

Evolution of MobileInsight¶
这部分详细阐述了 MobileInsight 如何从一个简单的监控器演变为一个高级的网络分析软件工具. 核心内容分为以下三个主要方面:
4.1 Cross-layer Vertical Analytics¶
跨层交互的复杂性:
为了实现无处不在的服务, 移动网络通常需要在分布式环境中协同多个协议, 因此跨层交互是一种常态.
这不仅包括控制面的交互 (如 Figure 4a 所示的 RRC, MM 和 SM 状态机如何协同建立会话), 也包括用户面的包传递交互 (如 Figure 4b 所示, 数据包穿越 PDCP, RLC, MAC 和 PHY 层的过程), 以及控制面配置对用户面传输的跨面影响.


面临的挑战:
主要挑战在于处理复杂的跨层逻辑, 以及由于数据包丢失或损坏而导致的数据状态缺失问题.
核心技术方案:
- 跨层状态机跟踪: MobileInsight 提取标准协议的状态机, 通过建立跨层状态映射来追踪运行状态的传播与更新
- 本文图中展示的是 "两个known中间夹一个unknown" 的情况
- 实际中可能存在更多层次的状态缺失, MobileInsight 的设计也能适应更复杂的情况, 下面的tip会梳理为什么
- 基于包间依赖的缺失状态推断: 当用户面数据丢失时, 它利用前后已接收数据包的时间依赖关系来限制并推断缺失数据的可能状态, 如 Figure 5 所示
- 准确性验证: 与基础设施端 (如 OAI 建立的受控环境) 的基准事实对比, 其下行数据延迟的估计误差极小 (平均 0.19ms, 最大仅 4ms, 误差率 ≤1.4%), 如 Figure 6 所示


如果是两个 known 中间多个 unknown, 如何推断?
(1) 算法层面: 利用顺序交付机制提供 "边界 (Bounds)" 而非精确值
当出现连续多个 packet 丢失时, 论文并没有宣称能够精准还原中间每一个 packet 的确切状态机. 相反, 它利用了链路层 (RLC 层) in-order reliable delivery 的特性
- 因为 RLC 层保证了数据块的处理是有严格顺序的, 所以即使中间缺失了 pkt 2 到 pkt 9, 只要我们知道 pkt 1 (before) 和 pkt 10 (after) 的准确状态和时间戳, 就可以把 pkt 2 到 pkt 9 的所有可能状态转换 限制 (bounded) 在这个时间窗口内
- MobileInsight 通过这种方式为缺失数据提供的是 "有界限的信息 (bounded information)", 例如重传延迟的上下限
- 可以观察论文中的 Figure 6b, 在发生重传 (即存在缺失状态) 时, MobileInsight 输出的并不是一个确定的点, 而是 MobileInsight Min (下限) 和 MobileInsight Max (上限)
- 它承认了不确定性的存在, 但把误差框定在了一个极小的范围内
(2) 系统设计层面: 通过 Cross-layer Sampling 直接规避连续缺失
为了解决数据爆炸导致的性能问题, 如果在底层 (MAC/RLC 层) 进行独立的随机采样, 确实会制造出大量的 "连续多个 packets 缺失" 的极端情况.
为了解决这个问题, 论文在 §4.2 提出了一种非常聪明的工程解法:
- 自顶向下的锚定: MobileInsight 不再在底层盲目随机丢弃包, 而是首先在顶层 (PDCP 层) 根据目标比例对 IP 数据包进行均匀采样
- 提取完整垂直链路: 对于被选中的这个 IP 包, 系统会利用跨层依赖跟踪, 精准定位属于 这一个特定 IP 包 的所有底层 RLC 分段和 MAC 块消息
- 丢弃无关数据: 然后, 系统只解析这些相关联的消息, 为了提高效率, 剩下的底层消息全部被直接 drop
4.2 Efficient Real-time User-plane Analytics¶
性能与能耗瓶颈:
- 如 Figure 7 所示, 用户面的消息量比控制面高出 2 到 3 个数量级
- 初版的 MobileInsight 尽管能做到实时处理, 但会引发极高的 CPU 占用 (高达 23%) 和严重的电池消耗 (1 小时耗电 21%), 如 Figure 8 所示

传统独立采样的缺陷:
如果针对各层独立且均匀地进行采样, 会丢失 IP 数据包跨层的依赖关系, 从而导致分析极度不准确 (例如上行数据包延迟分析误差高达 34.2%), 如 Figure 9 所示
改进方法: 领域特定的跨层采样 (Domain-specific cross-layer sampling):
MobileInsight 设计了一种巧妙的方法: 首先在顶层 (PDCP 层) 按目标比例对 IP 数据包进行采样, 接着利用跨层依赖关系去定位这些 被选中 的 IP 包对应的底层 (RLC, MAC, PHY) 消息, 然后只解析这部分相关消息并丢弃其余的
优化效果:
如 Figure 9 所示, 这种跨层采样机制在保持目标采样率的同时, 将数据延迟估计误差大幅降低了 3.4 到 4.5 倍, 并且节省了高达 47.6% 的电池消耗

4.3 User-Friendly, Extensible Analytics¶
-
解决使用门槛过高的问题: 由于底层的协议状态机分析和跨层采样 API 的语义过于低级且复杂, 阻碍了该工具在社区的广泛采用
-
引入 KPI 分析器: 为了平衡全面性与易用性, 团队基于 3GPP 标准为 MobileInsight 扩展了用户友好的关键性能指标 (KPI) 分析器
- 涵盖了无线电, 可访问性, 移动性, 完整性和能量等多个类别
- 如 Table 4 所示
-
简化的调用方式: 如 Figure 10 所示, 用户仅需通过直观的层级名称 (如
Mobility.HANDOVER_LATENCY) 就能调用底层相应的状态机分析器- 这种设计既让新手能够轻松追踪核心指标, 又保留了高级用户深挖底层运行细节的通道

Related Work¶
通过对比现有技术和工具, 明确了 MobileInsight 在移动网络研究与分析领域的独特定位和优势. 其核心内容可以概括为以下几点:
-
与现有开源实验平台的对比: 现有的开放平台 (如 ORAN, Powder, srsLTE, OpenAirInterface 等) 很大程度上是在受控环境中运行的
- MobileInsight 通过提供真实的, 运行中的 (operational) 移动网络数据和分析, 对这些平台形成了补充
-
与传统基础设施端分析的对比: 传统的网络分析通常部署在网络的基础设施端
- MobileInsight 通过提供设备端 (in-device) 的分析能力, 与传统方法形成了互补
-
与其他设备端分析工具的对比: 虽然 QXDM, OWL 和 LTEye 等工具也支持设备端的分析
- 但它们都有一个共同的局限性: 需要依赖外部硬件 (例如台式机或 USRP 设备)
-
与其他移动端数据采集软件的对比: X-CAL Mobile 和 Network Signal Guru 具有与 MobileInsight 相似的数据采集功能
- 但是, 它们主要作为记录器用于离线分析 (offline analysis), 而不是在设备内进行运行时 (runtime) 实时分析
-
MobileInsight 的独特定位总结: 据作者所知, MobileInsight 是目前唯一能够在商用移动设备上提供开源, 全栈且实时运行状态分析的移动网络工具
Discussion and Conclusion¶
MobileInsight is the rst attempt to build an open community tool that enables in-device, software-dened mobile network analytics. It follows the end-to-end principle to facilitate the shift from infrastructure-based to device-based mobile network intelligence and customization. While encouraging, more eorts are needed to rene MobileInsightfor the community, and by the community. We conclude this work by summarizing our thoughts of the past, present, and future of MobileInsight.
Looking back: Rethinking choices in MobileInsight’s design. MobileInsight’s success is largely attributed to three key choices we made. First, we aimed at an in-device, software-dened solution. This ensures that MobileInsight can be readily deployed in commodity phones today, and meet demands from a broader community of researchers and developers. Second, we decided to keep MobileInsight’s framework simple, modular and extensible. This facilitates MobileInsight’s continuous evolution and renement as shown in §4. Last but not least, we chose to open-source MobileInsight. This not only results in wide adoption, but also encourages more users to contribute to MobileInsight’s development.
Of course, we also made some sub-optimal choices for MobileInsight. First, MobileInsight took a bottom-up evolution from low-level analytics to user-friendly KPIs (§3.3). In the early stages of developing MobileInsight, we focused on implementing a complete set of low-level analytics features but ignored most users’ real demands for simple APIs for intuitive mobile network analytics. This unnecessarily complicated the MobileInsight codebase for most users and delayed its wide adoption. Instead, a top-down evolution could broaden MobileInsight’s usage, i.e., interview and understand the users’ specic demands for mobile network analytics, enable the corresponding high-level KPIs rst to attract more users (rather than a complete yet complicated low-level primitives), educate them with hands-on KPI experiences, and then extend MobileInsight to low-level analytics. Second, to enable extensible analytics plugins, we built MobileInsight with Python because of its scriptlike semantics. This turns out to be painful. Without Android’s native support, we built MobileInsight with a 3rd-party Pythonfor-Android package [9]. This caused many unexpected bugs and slow Python2!Python3 migration in MobileInsight’s development. We are now migrating MobileInsight to Java and C/C++ using Android’s native support, and retain its extensible analytics plugin with Javascript. Third, MobileInsight was packaged as a standalone app, which is hard for 3rd-party apps to call and integrate. We plan to repackage MobileInsight as an Android SDK library to facilitate 3rd-party programming and integration.
Looking now: Potentials and limitations of using MobileInsight for device-based network intelligence. MobileInsight was originally designed for network analytics only. But it turns out that, MobileInsight has also facilitated diverse device-based mobile network customization and intelligence as shown in §5 and Table 3. These eorts unveil three general insights on empowering the device-based network intelligence with MobileInsight:
(1) Full-stack device-side customization: As a device-side solution, MobileInsight has the unique advantage of full-stack intelligence, from app to physical layers. This was not envisioned when initiating the MobileInsight project in 2016. MobileInsight facilitates appdriven network customization and network-aware app adaptation that infrastructure cannot. Specically, emergent scenarios (AR/VR, video surveillance, smart home, IoT, etc.) involve heavy uplink data transfer. By customizing the uplink network data transfer with local app information, MobileInsight can help achieve 25ms userplane latency with '95% probability for mobile VR [71], reduce the web loading time by 30% [76], and improve PSNR by up to 6dB in WebRTC-based video streaming [48, 75]. These improvements cannot be easily achieved by the infrastructure, which has no full access to the device-side app demands and uplink trac patterns.
(2) Inferring network-side operations: Even with MobileInsight, some network-side operations are still not fully visible to devices, such as the radio resource scheduling and handover decision policies. In this case, MobileInsight can infer device-perceived operation logic at best. Such inferred logics are indeed not fully identical to the ground truth, but they can be still helpful for devices. For example, with the runtime physical radio resource allocation information from MobileInsight, [32] achieves 93% accuracy of detecting if LTE downlink radio is the TCP bottleneck and [48] predicts the uplink radio bandwidth with the mean error rate as low as 7.67%. These inferences can guide TCP to avoid unnecessary data rate drops.
(3) Harnessing from mobility: Device mobility across the network nodes complicates analytics and optimization. To tackle it, existing infrastructure-side solutions [43, 65] must coordinate the network nodes. This is complex or sometimes impossible if network nodes belong to dierent operators (e.g., international roaming [55] and virtual operators like Google Fi [14]). Instead, our experience of using MobileInsight unveils a unique opportunity to address this issue: As a single vantage point across network nodes, a device with MobileInsight can reveal more network-side insights as it moves, simplify infrastructure-side solutions, or complement them with insights that network alone cannot gain. For example, with MobileInsight, [36, 49] can use commodity phones to conduct mobility misconguration analysis for 18,000+ cells and 32,000 handover instances as the phone moves across base stations, without relying on these base stations to coordinate or share their local congurations. Moreover, in the multi-carrier access such as Google Fi [14] (which combines T-Mobile and Sprint for better coverage), each individual operator does not have global view on all others to fully optimize their network services at the infrastructure side. Instead, by allowing the device to analyze each carrier with MobileInsight during its mobility, [50] realizes intelligent carrier selection with 3.74⇥ throughput increment and 1.9⇥ latency reduction, and [81] resolves Google Fi’s persistent handover oscillations due to the mobility management policy conicts between T-Mobile and Sprint.
Looking forward: The future of MobileInsight. MobileInsight will continue its evolution toward a comprehensive, ecient, and user-friendly open community analytics paradigm. In the foreseen future, we will extend MobileInsight to support upcoming 5G and cellular IoT technologies 2 . We will extend MobileInsight to the mobile devices beyond commodity phones, and customize its features and energy eciency for battery-constrained IoT devices (e.g., via application-driven intelligent sampling). Beyond a single device, MobileInsight will unleash more network intelligence by crowdsourcing massive devices and cooperating with software-dened radios. To scale to more devices, we will relax MobileInsight’s dependency on system privilege by exploring learning-based paradigms with coarse-grained data. In the long term, we envision MobileInsight could facilitate the users and operators to share their network knowledge and achieve collaborative mobile network intelligence. We wish more community eorts would join us to move toward a transparent and intelligent next-generation mobile network.
(1) 回顾过去: 设计选择的经验与教训
-
成功的设计选择:
- 端侧软件定义方案: 确保了工具能够轻松部署在现有的商用手机上, 满足了广大研究者和开发者的需求.
- 简单, 模块化且可扩展的架构: 为工具的持续演进和功能完善提供了便利.
- 开源策略: 不仅促成了该工具的广泛应用, 还鼓励了更多用户参与开发和贡献.
-
不完美的设计 (教训与改进方向):
- 自下而上的演进路线: 初期过于专注于复杂的底层协议分析, 忽视了用户对简单直观 API (如 KPI) 的需求, 这使得代码库变得不必要地复杂, 并延缓了推广.
- 作者反思, 自上而下 (先推高层 KPI 再扩展底层细节) 的路线会更好.
- 使用 Python 开发插件: 由于 Android 缺乏原生支持, 依赖第三方包导致了许多预料之外的 Bug 以及 Python 2 到 3 迁移缓慢的问题.
- 目前正迁移至原生支持的 Java/C++, 并使用 Javascript 作为插件语言.
- 作为独立 App 打包: 导致第三方应用难以调用和集成.
- 团队计划将其重新打包为 Android SDK 库, 以方便第三方编程.
- 自下而上的演进路线: 初期过于专注于复杂的底层协议分析, 忽视了用户对简单直观 API (如 KPI) 的需求, 这使得代码库变得不必要地复杂, 并延缓了推广.
(2) 立足现在: 端侧网络智能的潜力与局限
虽然最初只为 "网络分析" 设计, 但 MobileInsight 实际上赋能了多种设备驱动的网络定制与智能:
- 端侧全栈定制: 它具备从应用层到物理层的全栈视野, 能够实现基础设施无法做到的 "应用驱动的网络定制".
- 例如, 通过结合本地应用信息优化上行数据传输, 能显著降低 VR 延迟或提升视频流质量.
- 推断网络侧操作: 即使基础设施端的操作 (如资源调度和切换策略) 对设备不完全可见, MobileInsight 也能高度准确地推断出网络侧的运行逻辑 (例如预测可用带宽), 从而指导 TCP 避免不必要的降速.
- 利用移动性优势: 传统基础设施方案在设备跨基站 (尤其是跨不同运营商, 如 Google Fi) 移动时, 极难进行节点间的协调优化.
- 而装有 MobileInsight 的移动设备相当于一个统一的移动观测点, 能够在移动中分析大规模的网络配置错误, 并实现智能的多载波选择.
(3) 展望未来: MobileInsight 的发展方向
- 支持新技术: 未来将扩展支持 5G 以及蜂窝物联网 (IoT) 技术
- 拓展设备边界: 从商用手机延伸至更多设备, 并针对受限电池的 IoT 设备定制能效优化分析 (如应用驱动的智能采样)
- 规模化与群体智能: 结合众包模式和软件定义无线电技术, 释放更强大的网络智能
- 降低使用门槛: 通过探索基于粗粒度数据的学习范式, 减少工具对系统底层权限 (如 Root) 的依赖
- 最终愿景: 促进用户与运营商之间共享网络知识, 实现协同的移动网络智能