Token导航 LogoToken导航

Agent Skill · 研究检索

gettys-bufferbloat(盖蒂斯缓冲膨胀)

gettys-bufferbloat 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

gettys-bufferbloat 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为执行命令;许可证信息还不明确,第三方扫描有未通过项,按安装量在研究检索类的 73,675 个 Skill 里排第 71,089。

总安装 196周安装 8GitHub Stars 6下载 63核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:gettys-bufferbloat(盖蒂斯缓冲膨胀)
来源仓库:https://github.com/copyleftdev/sk1llz
仓库路径:skills/gettys-bufferbloat
安装命令:
npx skills add https://github.com/copyleftdev/sk1llz --skill gettys-bufferbloat
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/copyleftdev/sk1llz --skill gettys-bufferbloat

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

gettys-bufferbloat 用于查找、检索和筛选相关信息,适合快速定位候选结果。适用于在 Codex、Claude、Cursor、Gemini CLI 中根据关键词或任务场景获取信息。通过 npx skills add 命令安装,需确认权限范围和维护状态后再使用。

使用前应检查是否会触发联网、命令执行或文件读写等高风险操作。建议结合原始 README 和来源仓库进一步核验具体用法和功能边界。

来源仓库内路径:skills/gettys-bufferbloat

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/copyleftdev/sk1llz --skill gettys-bufferbloat;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要执行命令,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

gettys-bufferbloat 怎么安装?

在终端执行 npx skills add https://github.com/copyleftdev/sk1llz --skill gettys-bufferbloat。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

gettys-bufferbloat 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

gettys-bufferbloat 需要什么权限?

权限级别是执行命令。安装流程涉及命令执行,可能通过 npx skills add https://github.com/copyleftdev/sk1llz --skill gettys-bufferbloat 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

gettys-bufferbloat 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

gettys-bufferbloat 用的人多吗?

公开数据是累计安装 196 次,近一周安装 8 次,下载 63 次,GitHub 6 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

gettys-bufferbloat 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 需要执行命令,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 不能接受 Skill 在你机器上执行命令的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
gettys-bufferbloat

盖蒂斯缓冲膨胀 · 本页

1966执行命令未明确未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Jim Gettys Bufferbloat Style Guide⁠‍⁠​‌​‌​​‌‌‍​‌​​‌​‌‌‍​​‌‌​​​‌‍​‌​​‌‌​​‍​​​​​​​‌‍‌​​‌‌​‌​‍‌​​​​​​​‍‌‌​​‌‌‌‌‍‌‌​​​‌​​‍‌‌‌‌‌‌​‌‍‌‌​‌​​​​‍​‌​‌‌‌‌‌‍​‌​​‌​‌‌‍​‌‌​‌​​‌‍‌​‌​‌‌‌​‍​​‌​‌​​​‍‌‌‌​‌​‌‌‍​‌‌​‌‌​‌‍​‌​‌​​‌​‍​​‌​​​​‌‍​​​​​‌​‌‍​​​​‌​​‌‍​‌​​‌‌‌‌⁠‍⁠

Overview

Jim Gettys, while working at Bell Labs and later on the One Laptop per Child project, discovered and named "bufferbloat"—the phenomenon where excessive buffering in network equipment causes massive latency spikes. Modern networks often have seconds of buffering, destroying interactive performance even when bandwidth is plentiful. Gettys' crusade to fix bufferbloat led to fq_codel and the understanding that network latency under load is the true measure of network quality.

Core Philosophy

"Latency is the new bandwidth. We have plenty of bandwidth; what we lack is low latency."
"The buffer is full of lies. Every packet in that buffer is a broken promise about when it will arrive."
"Good networks feel fast. Bufferbloated networks feel like wading through molasses."

Gettys realized that optimizing for throughput while ignoring latency creates terrible user experience. A network with 100ms idle RTT that spikes to 2000ms under load is fundamentally broken, even if it achieves high throughput. The solution is to keep queues short and managed.

Design Principles

  1. Latency Under Load Matters: Measure RTT while the network is busy, not idle.
  2. Buffers Lie About Bandwidth: Large buffers mask congestion, delaying feedback.
  3. Queues Should Be Short: Aim for milliseconds of buffering, not seconds.
  4. Flow Isolation: One greedy flow shouldn't destroy latency for others.
  5. Active Queue Management: Don't just drop when full—manage proactively.

The Bufferbloat Problem

Without Bufferbloat (healthy network):
─────────────────────────────────────
Idle RTT:    20ms
Load RTT:    25ms  (slight increase)
Difference:   5ms  ✓ Good!

With Bufferbloat (broken network):
──────────────────────────────────
Idle RTT:    20ms
Load RTT:  2000ms  (100x increase!)
Difference: 1980ms ✗ Terrible!

Why does this happen?

┌─────────────────────────────────────────────────────────────┐
│                                                              │
│   Sender                    Router                Receiver   │
│   ──────                    ──────                ────────   │
│                                                              │
│   100 Mbps  ─────────►  ┌─────────┐  ─────────►  10 Mbps    │
│                         │ BUFFER  │                          │
│                         │█████████│ ← 2 seconds of packets! │
│                         │█████████│                          │
│                         │█████████│                          │
│                         └─────────┘                          │
│                                                              │
│   Packets queue up waiting for the slow link.               │
│   TCP doesn't know—it sees ACKs arriving (eventually).      │
│   User sees lag, even with "good bandwidth."                │
│                                                              │
└─────────────────────────────────────────────────────────────┘

When Engineering Low-Latency Networks

Always

  • Measure latency UNDER LOAD, not just idle
  • Use fq_codel or similar AQM on bottleneck queues
  • Size buffers based on BDP, not maximum possible
  • Test with realistic traffic patterns
  • Monitor queue depth, not just throughput
  • Prioritize latency for interactive traffic

Never

  • Assume more buffering is better
  • Measure only idle RTT as "ping time"
  • Optimize only for throughput benchmarks
  • Use deep buffers "just in case"
  • Ignore latency complaints with "bandwidth is fine"
  • Conflate bandwidth with network quality

Prefer

  • Shallow queues over deep buffers
  • Fair queuing over FIFO
  • AQM over tail-drop
  • Latency metrics over throughput
  • Per-flow isolation
  • Measuring under load

Code Patterns

Bufferbloat Detection

class BufferbloatDetector:
    """
    Detect bufferbloat by comparing idle vs loaded RTT.
    Gettys' insight: the difference tells you everything.
    """

    def __init__(self, target_host: str):
        self.target = target_host
        self.idle_samples = []
        self.loaded_samples = []

    def measure_idle_rtt(self, samples: int = 20) -> float:
        """
        Measure RTT when network is idle.
        """
        rtts = []
        for _ in range(samples):
            rtt = self._ping(self.target)
            if rtt is not None:
                rtts.append(rtt)
            time.sleep(0.1)

        self.idle_samples = rtts
        return min(rtts) if rtts else None

    def measure_loaded_rtt(self,
                            samples: int = 20,
                            load_generator: Callable = None) -> float:
        """
        Measure RTT while generating load.
        """
        # Start background load
        if load_generator:
            load_thread = threading.Thread(target=load_generator)
            load_thread.start()

        time.sleep(1)  # Let load stabilize

        rtts = []
        for _ in range(samples):
            rtt = self._ping(self.target)
            if rtt is not None:
                rtts.append(rtt)
            time.sleep(0.1)

        self.loaded_samples = rtts
        return sum(rtts) / len(rtts) if rtts else None

    def diagnose(self) -> BufferbloatDiagnosis:
        """
        Diagnose bufferbloat severity.
        """
        if not self.idle_samples or not self.loaded_samples:
            return BufferbloatDiagnosis(status='insufficient_data')

        baseline = min(self.idle_samples)
        loaded_avg = sum(self.loaded_samples) / len(self.loaded_samples)
        loaded_max = max(self.loaded_samples)

        bloat = loaded_avg - baseline
        bloat_ratio = loaded_avg / baseline if baseline > 0 else float('inf')

        # Gettys' thresholds
        if bloat < 5:
            grade = 'A'
            status = 'excellent'
            recommendation = 'Network is well-tuned'
        elif bloat < 30:
            grade = 'B'
            status = 'good'
            recommendation = 'Minor bufferbloat, acceptable for most uses'
        elif bloat < 100:
            grade = 'C'
            status = 'moderate'
            recommendation = 'Noticeable lag under load, enable fq_codel'
        elif bloat < 300:
            grade = 'D'
            status = 'poor'
            recommendation = 'Significant bufferbloat, enable AQM immediately'
        else:
            grade = 'F'
            status = 'severe'
            recommendation = 'Severe bufferbloat, network unusable for interactive use'

        return BufferbloatDiagnosis(
            grade=grade,
            status=status,
            baseline_rtt=baseline,
            loaded_rtt=loaded_avg,
            bloat_ms=bloat,
            bloat_ratio=bloat_ratio,
            recommendation=recommendation,
        )

    def _ping(self, host: str) -> Optional[float]:
        """Send ICMP ping and return RTT in ms."""
        try:
            result = subprocess.run(
                ['ping', '-c', '1', '-W', '1', host],
                capture_output=True,
                text=True
            )
            # Parse RTT from ping output
            match = re.search(r'time=(\d+\.?\d*)', result.stdout)
            if match:
                return float(match.group(1))
        except Exception:
            pass
        return None

def run_bufferbloat_test(target: str = '8.8.8.8') -> BufferbloatDiagnosis:
    """
    Run a complete bufferbloat test.
    """
    detector = BufferbloatDetector(target)

    print("Measuring idle RTT...")
    detector.measure_idle_rtt()

    print("Measuring RTT under load...")

    def generate_load():
        # Download something large
        subprocess.run(
            ['curl', '-o', '/dev/null', '-s',
             'http://speedtest.tele2.net/100MB.zip'],
            timeout=30
        )

    detector.measure_loaded_rtt(load_generator=generate_load)

    return detector.diagnose()

fq_codel Implementation

class FQCoDel:
    """
    Fair Queuing with Controlled Delay (fq_codel).
    The solution to bufferbloat: per-flow fair queuing + CoDel AQM.

    Key innovations:
    1. Flow isolation: one flow can't bloat another
    2. Per-flow AQM: CoDel applied to each flow
    3. Fair sharing: all flows get equal share of bandwidth
    """

    def __init__(self,
                 num_queues: int = 1024,
                 target_ms: float = 5.0,
                 interval_ms: float = 100.0,
                 quantum: int = 1514):
        self.num_queues = num_queues
        self.target = target_ms
        self.interval = interval_ms
        self.quantum = quantum  # Bytes per round

        self.queues = [FlowQueue(target_ms, interval_ms)
                       for _ in range(num_queues)]
        self.active_list = []  # Flows with packets
        self.flow_states = {}  # Per-flow state

    def hash_flow(self, packet: Packet) -> int:
        """
        Hash packet to a queue based on flow (5-tuple).
        """
        flow_id = (
            packet.src_ip,
            packet.dst_ip,
            packet.src_port,
            packet.dst_port,
            packet.protocol
        )
        return hash(flow_id) % self.num_queues

    def enqueue(self, packet: Packet, now_ms: float) -> bool:
        """
        Enqueue a packet to its flow's queue.
        """
        queue_idx = self.hash_flow(packet)
        queue = self.queues[queue_idx]

        packet.enqueue_time = now_ms

        was_empty = queue.is_empty()
        success = queue.enqueue(packet)

        if success and was_empty:
            # Flow became active, add to round-robin
            self.active_list.append(queue_idx)

        return success

    def dequeue(self, now_ms: float) -> Optional[Packet]:
        """
        Dequeue using deficit round-robin with CoDel.
        """
        if not self.active_list:
            return None

        # Try each active queue in round-robin order
        for _ in range(len(self.active_list)):
            queue_idx = self.active_list[0]
            queue = self.queues[queue_idx]

            # Apply CoDel to this flow's queue
            packet = queue.codel_dequeue(now_ms)

            if packet is not None:
                # Got a packet, update deficit
                queue.deficit += self.quantum
                queue.deficit -= len(packet.data)

                if queue.deficit < 0:
                    # Exhausted quantum, move to back of active list
                    self.active_list.append(self.active_list.pop(0))
                    queue.deficit = 0

                return packet
            else:
                # Queue empty, remove from active list
                self.active_list.pop(0)
                queue.deficit = 0

        return None

class FlowQueue:
    """
    Per-flow queue with CoDel.
    """

    def __init__(self, target_ms: float, interval_ms: float, max_size: int = 10240):
        self.packets = deque()
        self.max_size = max_size
        self.deficit = 0

        # CoDel state
        self.target = target_ms
        self.interval = interval_ms
        self.first_above_time = None
        self.drop_next = 0
        self.count = 0
        self.dropping = False

    def is_empty(self) -> bool:
        return len(self.packets) == 0

    def enqueue(self, packet: Packet) -> bool:
        if len(self.packets) >= self.max_size:
            return False
        self.packets.append(packet)
        return True

    def codel_dequeue(self, now_ms: float) -> Optional[Packet]:
        """
        Dequeue with CoDel logic.
        """
        if not self.packets:
            self.dropping = False
            return None

        packet = self.packets[0]
        sojourn_time = now_ms - packet.enqueue_time

        if sojourn_time < self.target:
            # Good: below target
            self.first_above_time = None
        else:
            if self.first_above_time is None:
                self.first_above_time = now_ms + self.interval
            elif now_ms >= self.first_above_time:
                # Persistent delay: consider dropping
                pass

        if self.dropping:
            if sojourn_time < self.target:
                # Delay recovered, stop dropping
                self.dropping = False
            elif now_ms >= self.drop_next:
                # Time to drop
                self.packets.popleft()  # Drop
                self.count += 1
                self.drop_next = now_ms + self.interval / (self.count ** 0.5)
                return self.codel_dequeue(now_ms)  # Try next
        elif self.first_above_time and now_ms >= self.first_above_time:
            # Start dropping
            self.dropping = True
            self.count = 1
            self.drop_next = now_ms + self.interval
            self.packets.popleft()  # Drop
            return self.codel_dequeue(now_ms)  # Try next

        return self.packets.popleft()

Network Quality Score

class NetworkQualityScore:
    """
    Score network quality the Gettys way: latency under load.
    """

    @staticmethod
    def calculate_score(measurements: NetworkMeasurements) -> QualityScore:
        """
        Calculate a network quality score.

        Key insight: combine baseline latency, bloat, and jitter.
        """
        baseline = measurements.baseline_rtt
        loaded = measurements.loaded_rtt
        jitter = measurements.jitter
        loss = measurements.packet_loss

        # Bloat penalty
        bloat = loaded - baseline
        bloat_factor = 1.0 / (1.0 + bloat / 50.0)  # Penalize heavily

        # Baseline penalty (prefer low latency)
        baseline_factor = 1.0 / (1.0 + baseline / 100.0)

        # Jitter penalty
        jitter_factor = 1.0 / (1.0 + jitter / 20.0)

        # Loss penalty (severe)
        loss_factor = (1.0 - loss) ** 2

        # Combined score (0-100)
        raw_score = (bloat_factor * 0.5 +
                     baseline_factor * 0.2 +
                     jitter_factor * 0.2 +
                     loss_factor * 0.1)

        score = int(raw_score * 100)

        # Grade
        if score >= 90:
            grade = 'A'
        elif score >= 75:
            grade = 'B'
        elif score >= 60:
            grade = 'C'
        elif score >= 40:
            grade = 'D'
        else:
            grade = 'F'

        return QualityScore(
            score=score,
            grade=grade,
            baseline_rtt=baseline,
            bloat=bloat,
            jitter=jitter,
            loss=loss,
            bottleneck=identify_bottleneck(measurements),
        )

def identify_bottleneck(measurements: NetworkMeasurements) -> str:
    """
    Identify what's hurting network quality most.
    """
    bloat = measurements.loaded_rtt - measurements.baseline_rtt

    if bloat > 100:
        return 'bufferbloat'
    elif measurements.baseline_rtt > 100:
        return 'high_base_latency'
    elif measurements.jitter > 30:
        return 'jitter'
    elif measurements.packet_loss > 0.01:
        return 'packet_loss'
    else:
        return 'none'

Buffer Sizing

class BufferSizing:
    """
    Size buffers correctly to avoid bloat while maintaining throughput.
    """

    @staticmethod
    def calculate_optimal_buffer(bandwidth_mbps: float,
                                  rtt_ms: float,
                                  num_flows: int = 1) -> BufferRecommendation:
        """
        Calculate optimal buffer size.

        Rule of thumb (for N flows):
            Buffer = BDP / sqrt(N)

        Where BDP = Bandwidth × RTT
        """
        # Bandwidth-Delay Product
        bandwidth_bytes_per_sec = bandwidth_mbps * 1_000_000 / 8
        rtt_sec = rtt_ms / 1000
        bdp_bytes = bandwidth_bytes_per_sec * rtt_sec

        # Buffer size
        if num_flows == 1:
            buffer_bytes = bdp_bytes
        else:
            # Appenzeller et al: BDP / sqrt(N)
            buffer_bytes = bdp_bytes / (num_flows ** 0.5)

        # Convert to practical units
        buffer_packets = int(buffer_bytes / 1500)  # MTU
        buffer_ms = rtt_ms / (num_flows ** 0.5) if num_flows > 1 else rtt_ms

        return BufferRecommendation(
            bdp_bytes=int(bdp_bytes),
            recommended_bytes=int(buffer_bytes),
            recommended_packets=buffer_packets,
            recommended_ms=buffer_ms,
            explanation=(
                f"For {bandwidth_mbps} Mbps link with {rtt_ms}ms RTT "
                f"and ~{num_flows} flows, buffer {buffer_packets} packets "
                f"(~{buffer_ms:.1f}ms of data)"
            )
        )

    @staticmethod
    def linux_buffer_settings(buffer_bytes: int) -> dict:
        """
        Generate Linux sysctl settings for buffer sizes.
        """
        return {
            'net.core.rmem_max': buffer_bytes,
            'net.core.wmem_max': buffer_bytes,
            'net.ipv4.tcp_rmem': f'4096 87380 {buffer_bytes}',
            'net.ipv4.tcp_wmem': f'4096 65536 {buffer_bytes}',
            'net.core.netdev_max_backlog': 1000,  # Reduce from default
        }

    @staticmethod
    def enable_fq_codel(interface: str) -> str:
        """
        Generate command to enable fq_codel on an interface.
        """
        return f"""
# Enable fq_codel on {interface}
tc qdisc del dev {interface} root 2>/dev/null
tc qdisc add dev {interface} root fq_codel

# Verify
tc -s qdisc show dev {interface}
"""

Mental Model

Gettys approaches network performance by asking:

  1. What's the RTT under load? That's the true latency
  2. How deep are the buffers? Seconds of buffering = seconds of lag
  3. Is there flow isolation? One flow shouldn't ruin others
  4. Is AQM enabled? fq_codel should be everywhere
  5. Would I notice lag? User experience is the metric

The Bufferbloat Checklist

□ Measure RTT under load, not idle
□ Compare loaded RTT to baseline (>10x = severe bloat)
□ Enable fq_codel on all bottleneck queues
□ Size buffers based on BDP, not maximum
□ Test with interactive + bulk traffic together
□ Monitor queue depth, not just throughput
□ Grade with dslreports.com/speedtest or similar
□ Check router, modem, AND ISP equipment

Signature Gettys Moves

  • Bufferbloat diagnosis (idle vs loaded RTT)
  • fq_codel as the universal solution
  • "Latency is the new bandwidth"
  • Flow isolation requirement
  • Queue depth monitoring
  • BDP-based buffer sizing
  • User experience as the metric
  • Crusading for AQM everywhere

平台分布

Codex

37.5%
按下载量换算24

Claude

29.31%
按下载量换算18

Cursor

17.74%
按下载量换算11

Gemini CLI

9.26%
按下载量换算6

安全审计

Gen Agent Trust Hub

未通过

Socket

未通过

Snyk

可疑

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/copyleftdev/sk1llz --skill gettys-bufferbloat 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills