[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-84655-en":3,"doc-seo-84655-105":29,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":13,"seo_description":14,"update_tm":27,"read_time":28},84655,4810365810221,"Aurora","https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d",8,"Research & Report","GLM-5 Serving Parameter Tuning for OpenClaw Single-Deployment MaaS Inference Optimization for Long-Context Agent Workloads","OpenClaw requests are dominated by long, tool-augmented prefixes with large system prompts, accumulated conversation history, and tool outputs fed back into the context window. With roughly 28k–30k input tokens and ~500 output tokens per request, serving quality depends on throughput, time-to-first-token (TTFT), and tail latency. The report places tuning within a MaaS multi-model inference optimization architecture, focusing on the Single-Node Optimization block for one GLM-5 deployment using a two-node, sixteen-GPU cluster.","arXiv :2607 .02518v1 [ cs .DC] 27 Apr 2026  \nTechnical Report  \nGLM-5 Serving Parameter Tuning for OpenClaw Single-Deployment MaaS Inference Optimization for Long-Context Agent Workloads  \nMinjie Hua, Ning Wang, Peijun Yang, Kai Wang, and Shiguo Lian  \nChina Unicom  \nJuly 7, 2026  \n[huamj5@chinaunicom.cn](huamj5@chinaunicom.cn), [wangn85@chinaunicom.cn](wangn85@chinaunicom.cn), [yangpj16@chinaunicom.cn](yangpj16@chinaunicom.cn)  \n[wangk115@chinaunicom.cn](wangk115@chinaunicom.cn), [liansg@chinaunicom.cn](liansg@chinaunicom.cn)  \nAbstract  \nOpenClaw requests are dominated by long, tool-augmented prefixes: a sizable system prompt, accumulated conversation history, and tool outputs that are fed back into the context window [5, 6] . Under this workload shape—approximately 28000 to 30000 input tokens per request and about 500 output tokens—serving quality is governed jointly by throughput, time-to-first-token (TTFT), and tail latency rather than by raw short-prompt throughput alone [7, 11] .  \nThis report positions the tuning work inside a Model-as-a-Service (MaaS) multi-model inference optimization architecture. The broader architecture spans domain applications, MaaS platform performance optimization, multi-model orchestration, inference optimization, and compute-stack adaptation; the scope of this report is the Single-Node Optimization block in the inference-optimization layer, where serving parameters such as chunked prefill, tensor parallelism (TP), pipeline parallelism (PP), and max-running-request concurrency are tuned for one GLM-5 serving deployment. In this report, SingleNode Optimization is the architecture-block label, not a restriction to one physical server; the measured deployment uses the two-node, sixteen-GPU cluster described in Section 4.  \nWithin the tested parameter space, the best measured configuration is chunked-prefill-size=3072 , tp=4 , pp-size=4, and max-running-requests=24 . Relative to the conservative 2048/4/4/16 baseline, this setting improves request throughput from 0.43 to 0.48 req/s and total token throughput from 9029.64 to 9993.23 tok/s, while reducing TTFT average from 8.98 to 6.69 seconds and latency P90 from 40.23 to 32.64 seconds. Under a fixed hardware footprint, that corresponds to an estimated 10 .4% lower serving cost per request and 9 .6% lower serving cost per token. Relative to the 4096/4/4/16 comparison profile, normalized serving cost falls by about 20 .8% per request and 21 . 1% per token.  \nAccordingly, we recommend 3072 / tp4 / pp4 / max24 as the default deployment profile for OpenClaw. The data also show that the optimum is not monotonic: larger chunk sizes (4096, 6144) and deeper queueing (32, 48) do not further improve this workload. The results indicate a workload-specific sweet spot rather than a simple “larger is always better” rule.  \n1 Background and Problem Definition  \nOptimizing serving parameters using “raw model throughput”(e.g., short prompts, single-turn, synthetic load) can be misleading for OpenClaw. OpenClaw constructs a per-run context that includes: (i) a system prompt describing tools/skills/runtime constraints, (ii) the full conversation history, and (iii) tool calls and tool outputs; all of these consume tokens inside the model context window [5, 6] . As a result, even when the user prompt is brief, the effective model input can become very long, especially as multi-turn interactions accumulate and tool outputs (command output, file snippets, web/tool results) are reinjected [5] .  \nThis yields three business-relevant characteristics for OpenClaw agent serving:  \nLong system prompt and high context overhead. Tool schemas and injected workspace content add non-trivial context cost each turn [6] . This increases the probability of “long prefix”requests even in routine usage.  \nMulti-turn accumulation and tool-heavy traces. Multi-round agent sessions are inherently prefix-growing: each turn appends assistant outputs and tool transcripts [5] . Long-prefix reques","cbCaircR9gweYnkA","https://ap.wps.com/l/cbCaircR9gweYnkA","pdf",571844,1,10,"English","en",105,"# Abstract\n# 1 Background and Problem Definition\n# 2 MaaS Multi-Model Inference Optimization Architecture","[{\"question\":\"Why can raw model throughput be misleading for OpenClaw serving?\",\"answer\":\"OpenClaw constructs per-run context from a system prompt, full conversation history, and reinjected tool calls and tool outputs. This inflates effective input length and changes prefill and KV-cache pressure even when the user prompt is short.\"},{\"question\":\"Which serving parameters are tuned in this report for the GLM-5 deployment?\",\"answer\":\"The tuned parameters include chunked prefill size, tensor parallelism (TP), pipeline parallelism (PP), and max-running-request concurrency, optimized within the Single-Node Optimization block.\"},{\"question\":\"What is the best measured configuration and how does it affect performance?\",\"answer\":\"The best configuration is chunked-prefill-size=3072, tp=4, pp-size=4, and max-running-requests=24. Compared with a 2048/4/4/16 baseline, it raises throughput and token throughput while reducing average TTFT and P90 latency, leading to lower estimated serving cost per request and per token.\"}]",1784197507,25,{"code":4,"msg":30,"data":31},"ok",{"site_id":24,"language":23,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":27},"glm-5-serving-parameter-tuning-for-openclaw-single-deployment-maas-inference-optimization-for-long-context-agent-workloads","",{"@graph":35,"@context":85},[36,53,68],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,50],{"item":40,"name":41,"@type":42,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":49},"https://docshare.wps.com/document/research-report/",3,{"item":51,"name":13,"@type":42,"position":52},"https://docshare.wps.com/document/glm-5-serving-parameter-tuning-for-openclaw-single-deployment-maas-inference-optimization-for-long-context-agent-workloads/84655/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":40,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-17","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"Why can raw model throughput be misleading for OpenClaw serving?","Question",{"text":75,"@type":76},"OpenClaw constructs per-run context from a system prompt, full conversation history, and reinjected tool calls and tool outputs. This inflates effective input length and changes prefill and KV-cache pressure even when the user prompt is short.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"Which serving parameters are tuned in this report for the GLM-5 deployment?",{"text":80,"@type":76},"The tuned parameters include chunked prefill size, tensor parallelism (TP), pipeline parallelism (PP), and max-running-request concurrency, optimized within the Single-Node Optimization block.",{"name":82,"@type":73,"acceptedAnswer":83},"What is the best measured configuration and how does it affect performance?",{"text":84,"@type":76},"The best configuration is chunked-prefill-size=3072, tp=4, pp-size=4, and max-running-requests=24. Compared with a 2048/4/4/16 baseline, it raises throughput and token throughput while reducing average TTFT and P90 latency, leading to lower estimated serving cost per request and per token.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,123,128,131,134],{"id":20,"doc_module":4,"doc_module_name":45,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":45,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":45,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":45,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":45,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":121,"slug":122},30,"research-report",{"id":124,"doc_module":4,"doc_module_name":45,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":45,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":21,"doc_module":4,"doc_module_name":45,"category_name":132,"show_sort_weight":21,"slug":133},"Lifestyle","lifestyle",{"id":135,"doc_module":4,"doc_module_name":45,"category_name":136,"show_sort_weight":106,"slug":137},19,"General","general"]