Zum Hauptinhalt springen
Echtzeit-Radar & Feeds
Alle RSS Feeds ➔
👥 Community & Social
YouTube Security VideosVisual Studio Code: VS Code Learn: Extending Agents(24.09.2026 um 21:00 Uhr)
•
YouTube Security VideosGoogle Cloud Tech: Turn Audio into Action with Gemini 3.5 Transcribe(24.09.2026 um 21:00 Uhr)
••••
Unix & Linux ServerUSN-8815-1: libass vulnerabilities(24.09.2026 um 16:57 Uhr)
•••••
YouTube Security VideosVisual Studio Code: VS Code Learn: Extending Agents(24.09.2026 um 21:00 Uhr)
•
YouTube Security VideosGoogle Cloud Tech: Turn Audio into Action with Gemini 3.5 Transcribe(24.09.2026 um 21:00 Uhr)
••••
Unix & Linux ServerUSN-8815-1: libass vulnerabilities(24.09.2026 um 16:57 Uhr)
•••••
Intelligence View
⚡ tsecurity.de Intelligence

vLLM On-Demand Gateway: Zero-VRAM Standby for Local LLMs on Consumer GPUs

The Problem: vLLM Hogs Your GPU 24/7 If you run a local LLM with vLLM, you know the pain. The moment you start the server, it claims ~90% of your VRAM and never lets go — even when nobody's asking it anything. On a dedicated inference s…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




The Problem: vLLM Hogs Your GPU 24/7



If you run a local LLM with vLLM, you know the pain. The moment you start the server, it claims ~90% of your VRAM and never lets go — even when nobody's asking it anything.



On a dedicated inference server, that's fine. But on a single consumer GPU (RTX 5090 in my case), I also need VRAM for:




  • Shogi engine (DL-based, needs ~4GB VRAM)

  • Whisper transcription (large-v3, GPU-accelerated)

  • Training runs, experiments, occasional gaming



Running vLLM permanently means everything else fights for scraps. Killing and restarting vLLM manually every time is not a workflow — it's a chore.






The Solution: A Gateway That Manages vLLM's Lifecycle



I wrote a single-file FastAPI gateway (vllm_gateway.py, ~390 lines) that:





  1. Listens on port 8000 with near-zero VRAM usage


  2. Auto-starts vLLM on an internal port (8100) when a request arrives


  3. Auto-stops vLLM after 10 minutes of idle, fully freeing VRAM


  4. Rewrites tool calls from Nemotron's <TOOLCALL> format to OpenAI-compatible tool_calls



From the client's perspective, it's just a normal OpenAI-compatible API on port 8000. The lifecycle management is completely invisible.




Client → :8000 (Gateway, always running, ~0 VRAM)
↓ proxy
:8100 (vLLM, started on-demand, stopped when idle)









Architecture






Startup Flow






Request arrives at :8000
→ Gateway checks: is vLLM running?
→ No: spawn vLLM process on :8100
poll /health every 2s (up to 3 min timeout)
once healthy → proxy the request
→ Yes: proxy immediately









Shutdown Flow






Idle watchdog runs every 30s
→ Last request was >10 min ago?
→ SIGTERM to vLLM process group
→ Wait 15s, SIGKILL if needed
→ VRAM fully released









Key Design Decisions





  • Process group kill (os.killpg): vLLM spawns child processes. Killing just the parent leaves zombies holding VRAM.


  • Internal port separation: Gateway owns :8000. vLLM gets :8100. No port conflicts during restart.


  • Health check polling: Don't proxy until vLLM is actually ready. Model loading takes 30-90s depending on size.






Core Implementation



Here's the stripped-down version of the essential parts:




VLLM_INTERNAL_PORT = 8100
GATEWAY_PORT = 8000
IDLE_TIMEOUT_SECONDS = 10 * 60

VLLM_CMD = [
".venv/bin/vllm", "serve", "nvidia/NVIDIA-Nemotron-Nano-9B-v2-Japanese",
"--trust-remote-code",
"--port", str(VLLM_INTERNAL_PORT),
"--enable-auto-tool-choice",
"--tool-call-parser", "nemotron_json",
]

async def start_vllm() -> bool:
global vllm_process, vllm_ready
vllm_process = subprocess.Popen(
VLLM_CMD, preexec_fn=os.setsid,
stdout=subprocess.DEVNULL, stderr=subprocess.PIPE,
)
# Poll health endpoint until ready
deadline = time.time() + 180
async with httpx.AsyncClient() as client:
while time.time() < deadline:
try:
resp = await client.get(
f"http://localhost:{VLLM_INTERNAL_PORT}/health", timeout=5
)
if resp.status_code == 200:
vllm_ready = True
return True
except (httpx.ConnectError, httpx.ReadTimeout):
pass
await asyncio.sleep(2)
return False

async def stop_vllm():
global vllm_process, vllm_ready
if vllm_process and vllm_process.poll() is None:
os.killpg(os.getpgid(vllm_process.pid), signal.SIGTERM)
try:
vllm_process.wait(timeout=15)
except subprocess.TimeoutExpired:
os.killpg(os.getpgid(vllm_process.pid), signal.SIGKILL)
vllm_process = None
vllm_ready = False

async def idle_watchdog():
while True:
await asyncio.sleep(30)
if vllm_ready and time.time() - last_request_time > IDLE_TIMEOUT_SECONDS:
await stop_vllm()









Tool Call Rewriting (Bonus)



Nemotron outputs tool calls as raw text:




<TOOLCALL>[{"name": "ddg_search", "arguments": {"query": "NVIDIA stock"}}]</TOOLCALL>






The gateway intercepts this and rewrites it to the OpenAI format:




{
"tool_calls": [{
"id": "call_abc123",
"type": "function",
"function": {
"name": "ddg_search",
"arguments": "{\"query\": \"NVIDIA stock\"}"
}
}],
"finish_reason": "tool_calls"
}






This works for both streaming and non-streaming responses. Clients never see the raw <TOOLCALL> tags.






Status Endpoint



The gateway exposes a simple status API:




$ curl localhost:8000/gateway/status
{
"vllm_running": false,
"vllm_ready": false,
"idle_seconds": 7145,
"pid": null
}






And manual controls:




curl -X POST localhost:8000/gateway/start   # Force start
curl -X POST localhost:8000/gateway/stop # Force stop









Real-World Numbers (RTX 5090, Nemotron 9B)
























State VRAM Usage
Gateway only (vLLM stopped) ~200 MB
vLLM running (Nemotron 9B FP16) ~22 GB
Cold start time ~60s


The 60s cold start is the tradeoff. For interactive chat, the first message after idle has a delay. For batch/API workloads, it's negligible.






When You'd Want This





  • Single GPU, multiple workloads: Share your GPU between LLM inference and other tasks


  • Development machine: Run vLLM only when you're actively using it


  • Cost/power savings: No point heating your GPU for an idle model


  • Home server: The RTX card can serve LLM requests AND run other GPU tasks






When You Wouldn't





  • Dedicated inference server: Just run vLLM directly


  • Low-latency requirements: 60s cold start is unacceptable for some use cases


  • Multi-user serving: Frequent requests mean vLLM stays up anyway






Full Source



The complete vllm_gateway.py is ~390 lines including streaming support and TOOLCALL rewriting. The approach works with any vLLM model — just change VLLM_CMD.



Dependencies: fastapi, httpx, uvicorn (all likely already installed if you use vLLM).






Running Nemotron Nano 9B v2 Japanese on RTX 5090 + WSL2. The gateway pattern turned "I can't use my GPU for anything else" into "vLLM is there when I need it and gone when I don't."

SOC Incident Playbook: Remote Code Execution (RCE) Defense
Syntax validiert (0 Fehler)
title: Detect Exploitation - vLLM On-Demand Gateway: Zero-VRAM Standby for Local LLMs on Consumer GPUs
id: 0ee03966-b48c-4b20-b9aa-12024ff8e999
status: experimental
description: Automatisch generierte SIEM-Erkennungsregel basierend auf CTI Intelligence
references:
  - https://tsecurity.de/
author: iShareStuff CTI Automated Detection Engine
date: 2026-09-24
logsource:
  category: network_connection
  product: any
detection:
  selection:
      CommandLine|contains:
        - 'exploit'
  condition: selection
falsepositives:
  - Legitime administrative Zugriffe oder Penetrationstests
level: high
tags:
  - attack.initial_access
Syntax validiert (0 Fehler)
rule CTI_Threat_Indicator {
    meta:
        author = "iShareStuff CTI Automated Detection Engine"
        date = "2026-09-24"
        description = "YARA Signature for "
    strings:
        $str = "vLLM On-Demand Gateway: Zero-V" ascii wide
    condition:
        any of them
}
Syntax validiert (0 Fehler)
index=security sourcetype IN ("cisco:asa", "pan:traffic", "zeek_conn", "suricata", "WinEventLog:Security")
("vLLM On-Demand Gateway Zero-VRAM Standby")
| stats count earliest(_time) as first_seen latest(_time) as last_seen by src_ip, dest_ip, dest_host, signature
| eval first_seen=strftime(first_seen, "%Y-%m-%d %H:%M:%S"), last_seen=strftime(last_seen, "%Y-%m-%d %H:%M:%S")
| sort - count
Syntax validiert (0 Fehler)
message: "*vLLM On-Demand Gateway Zero-VRAM Standby*"
Syntax validiert (0 Fehler)
CommonSecurityLog
| where Message has "vLLM On-Demand Gateway Zero-VRAM Standby"
| summarize EventCount = count(), FirstSeen = min(TimeGenerated), LastSeen = max(TimeGenerated) by SourceIP, DestinationIP, DestinationPort, Activity
| extend DetectionRule = "iShareStuff-CTI-Compiled"
| sort by EventCount desc
🎯
MITRE ATT&CK Matrix Navigator 14 Taktiken
Reconnaissance
-
Resource Development
-
Initial Access
Execution
Persistence
-
Privilege Escalation
Defense Evasion
Credential Access
-
Discovery
-
Lateral Movement
-
Collection
-
Command and Control
Exfiltration
-
Impact
tsecurity.de Cognitive Threat RAG
Fokus-Vektor:

Kognitive Analyse für identifizierte Bedrohung: Erhöhte Bedrohungslage im Bereich vLLM On-Demand Gateway: Zero-VRAM Standb.... Basierend auf 368k Vektor-Korrelationen werden sofortige Isolationsmaßnahmen für betroffene Endpunkte empfohlen.

🛡️ Angriffsfläche & Exposure

Netzwerk/Remote-Zugriff ohne Vorauthentifizierung möglich.

⚡ Empfohlene Sofortmaßnahmen
  • 1. Perimeter-Inspektion: Relevante Portfreigaben und exponierte Endpunkte unverzüglich scannen.
  • 2. Patch-Applikation: Hersteller-Hotfix einspielen oder betroffene Daemons in isolierte DMZ-Segmente überführen.
  • 3. Telemetrie & EDR-Alerts: Prozessaufrufe und Child-Processes auf anomale Shell-Spawns überwachen.
🔗 Semantisch verwandte Zero-Days MariaDB 11.7 VEC
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten vLLM On-Demand Gateway: Zero-VRAM Standby for Local LLMs on Consumer GPUs

Thematisch verwandte Begriffe: vLLM, OnDemand, Gateway, ZeroVRAM · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-61782 | Rsdoctor is a build analyzer tailored for projects built with Rspack. Pr…
Advisory →
tsecurity.de Icon
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel • Rechts: nächster Artikel • unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel TTP ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...
↗ Original-Quelle