在语义查询服务中应对运行时动态性
Navigating Runtime Dynamism in Semantic Query Serving
AI总结:
本文针对语义查询服务中查询间与查询内的运行时动态性问题,提出SeqoFlow框架,通过联合适配查询计划与调度,结合轻量级推测估计,显著降低了端到端延迟。
摘要:
基于大语言模型(LLM)的语义查询正逐渐将关系处理与针对非结构化数据的多种LLM算子相结合。由于两个耦合层面的运行时动态性,高效服务此类查询颇具挑战:在查询之间,动态到达的查询以及异构的资源需求持续改变调度优先级;在单个查询内部,细粒度输入批次的异构特性导致算子成本与选择性在执行过程中不断变化,使得静态优化的查询计划不可靠。这两种动态性形成了循环依赖:查询间调度需要剩余LLM工作量的估计,而剩余工作量又依赖于仅在执行期间才能观测到成本的运行时计划选择。本文提出SeqoFlow,一种联合适配查询计划与并发语义查询调度的运行时框架。SeqoFlow在算子依赖下列举等价保留的计划备选方案,并将查询分解为细粒度单元,从而支持在批次边界进行安全的计划适配与查询抢占。为无需在目标LLM上详尽分析候选计划即可支持上述两类决策,SeqoFlow采用轻量级推测估计来捕捉运行时成本,这些估计共同指导计划适配与查询间调度,闭合了查询优化与LLM推理之间的循环。在不同查询结构、数据分布与到达率下开展的实验表明,与现有语义查询系统、自适应查询处理技术及传统调度策略相比,SeqoFlow可大幅降低端到端延迟。
英文摘要:
LLM-powered semantic queries increasingly combine relational processing with multiple LLM-based operators over unstructured data. Efficiently serving such queries is challenging due to runtime dynamism at two coupled levels. Across queries, dynamic arrivals and heterogeneous resource demands continuously change scheduling priorities. Within a query, heterogeneous characteristics across fine-grained input batches cause operator costs and selectivities to vary throughout execution, making a statically optimized plan unreliable. These two forms of dynamism create a circular dependency: inter-query scheduling requires estimates of remaining LLM work, while the remaining work depends on runtime plan choices whose costs become observable only during execution. We present SeqoFlow, a runtime framework that jointly adapts query plans and schedules concurrent semantic queries. SeqoFlow enumerates equivalence-preserving plan alternatives under operator dependencies and decomposes queries into fine-grained units, enabling safe plan adaptation and query preemption at batch boundaries. To support both decisions without exhaustively profiling candidate plans on the target LLM, SeqoFlow uses lightweight speculative estimation to capture runtime costs. These estimates jointly guide plan adaptation and inter-query scheduling, closing the loop between query optimization and LLM inference. Experiments across diverse query structures, data distributions, and arrival rates show that SeqoFlow substantially reduces end-to-end latency compared to existing semantic query systems, adaptive query processing techniques, and conventional scheduling policies.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。