Open Access iconOpen Access

ARTICLE

crossmark

SP-Sketch: Persistent Flow Detection with Sliding Windows on Programmable Switches

Yuqian Huang1, Luyi Chen2, Zilun Peng1, Lin Cui1,*

1 Department of Computer Science, Jinan University, Guangzhou, 510632, China
2 Department of ICNOC, China Telecom Corporation Shenzhen Branch, Shenzhen, 518000, China

* Corresponding Author: Lin Cui. Email: email

Computers, Materials & Continua 2025, 84(3), 6015-6034. https://doi.org/10.32604/cmc.2025.066717

Abstract

Persistent flows are defined as network flows that persist over multiple time intervals and continue to exhibit activity over extended periods, which are critical for identifying long-term behaviors and subtle security threats. Programmable switches provide line-rate packet processing to meet the requirements of high-speed network environments, yet they are fundamentally limited in computational and memory resources. Accurate and memory-efficient persistent flow detection on programmable switches is therefore essential. However, existing approaches often rely on fixed-window sketches or multiple sketches instances, which either suffer from insufficient temporal precision or incur substantial memory overhead, making them ineffective on programmable switches. To address these challenges, we propose SP-Sketch, an innovative sliding-window-based sketch that leverages a probabilistic update mechanism to emulate slot expiration without maintaining multiple sketch instances. This innovative design significantly reduces memory consumption while preserving high detection accuracy across multiple time intervals. We provide rigorous theoretical analyses of the estimation errors, deriving precise error bounds for the proposed method, and validate our approach through comprehensive implementations on both P4 hardware switches (with Intel Tofino ASIC) and software switches (i.e., BMv2). Experimental evaluations using real-world traffic traces demonstrate that SP-Sketch outperforms traditional methods, improving accuracy by up to 20% over baseline sliding window approaches and enhancing recall by 5% compared to non-sliding alternatives. Furthermore, SP-Sketch achieves a significant reduction in memory utilization, reducing memory consumption by up to 65% compared to traditional methods, while maintaining a robust capability to accurately track persistent flow behavior over extended time periods.

Keywords

Sketch; persistent flow; sliding window; programmable switches; probability subtraction

Cite This Article

APA Style
Huang, Y., Chen, L., Peng, Z., Cui, L. (2025). SP-Sketch: Persistent Flow Detection with Sliding Windows on Programmable Switches. Computers, Materials & Continua, 84(3), 6015–6034. https://doi.org/10.32604/cmc.2025.066717
Vancouver Style
Huang Y, Chen L, Peng Z, Cui L. SP-Sketch: Persistent Flow Detection with Sliding Windows on Programmable Switches. Comput Mater Contin. 2025;84(3):6015–6034. https://doi.org/10.32604/cmc.2025.066717
IEEE Style
Y. Huang, L. Chen, Z. Peng, and L. Cui, “SP-Sketch: Persistent Flow Detection with Sliding Windows on Programmable Switches,” Comput. Mater. Contin., vol. 84, no. 3, pp. 6015–6034, 2025. https://doi.org/10.32604/cmc.2025.066717



cc Copyright © 2025 The Author(s). Published by Tech Science Press.
This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
  • 694

    View

  • 476

    Download

  • 0

    Like

Share Link