Sizing the Gateway Asset
How much CPU, memory, disk and bandwidth a gateway asset needs depends almost entirely on what it serves:
- Remote desktops in the browser (RDP, SSH and VNC applications of a portal) cost the most. Every open session runs its own process on the gateway asset, which draws the remote screen for the browser. Size for the sessions that are open at the same time, not for the number of people.
- Session recordings cost disk space on the gateway asset, or only a buffer when they go to a bucket.
- Web applications of a portal and traffic to Virtual Assets, Subnets and Exit Nodes cost CPU in proportion to the traffic that passes through, not to the number of people.
A gateway asset that serves no remote desktop application is light: the agent itself needs about 40 MB of memory and next to no CPU while idle.
Quick reference
For a gateway asset that serves RDP applications, sized for the sessions open at the same time, with room for one session in 25 that scrolls, plays video or animates the whole screen:
| Sessions at the same time | vCPU | Memory | Disk without recordings |
|---|---|---|---|
| Up to 10 | 4 | 2 GB | 2 GB |
| Up to 25 | 6 | 4 GB | 2 GB |
| Up to 50 | 12 | 6 GB | 2 GB |
| Up to 64 (the default limit) | 16 | 8 GB | 2 GB |
SSH and VNC sessions need less. Recordings come on top of the disk; see Disk for recordings. Then set the gateway asset's session limits to what you sized it for.
Calculator
Enter the sessions you expect at the same time in the busiest hour, and what you record. The calculator uses the figures below (see What a session costs), the agent's share and some headroom.
The bandwidth is what leaves the gateway asset while all of these sessions run. The bucket's uploads are spread over a working day of 8 hours.
What a session costs
A remote desktop session costs CPU and bandwidth for what changes on the screen, not for how long it is open: a desktop nobody touches costs next to nothing, typing in a form or a terminal a little, and scrolling, video and animations a lot. Memory, by contrast, is held for as long as the session is open.
Measured on the gateway asset (the agent's container image on a 6 vCPU virtual machine), with sessions recorded, at 1280x800 (VNC at 1024x768). Ordinary work is a terminal refreshing every second in a part of the screen, full-screen motion a screen that scrolls without pause:
| Per session | Ordinary work | Full-screen motion |
|---|---|---|
| RDP CPU | 0.05–0.12 vCPU | 1.5–2 vCPU |
| RDP memory | 45–65 MB | 50–60 MB |
| RDP to the browser | about 1 Mbit/s | about 22 Mbit/s |
| SSH CPU | about 0.1 vCPU | about 1 vCPU |
| SSH memory | about 22 MB | about 35 MB |
| SSH to the browser | about 0.5 Mbit/s | about 12 Mbit/s |
| VNC CPU | about 0.01 vCPU | about 1 vCPU |
| VNC memory | about 8 MB | about 16 MB |
| VNC to the browser | about 0.05 Mbit/s | about 10 Mbit/s |
- The figures add up. CPU, memory and bandwidth grew in step with the number of sessions, measured up to 16 RDP, 21 SSH and 32 VNC sessions at once. VNC came out cheapest because the test screen was smaller and the VNC server sent fewer, smaller updates; another VNC server, or a larger screen, can cost as much as RDP. The gateway asset needs no extra memory per person beyond their sessions.
- One session can take more than one core. A session with full-screen motion uses as much CPU as it gets, and the screen in the browser lags when there is not enough. The Quick reference leaves room for one such session in 25; in the calculator, enter how many you expect.
- Recording costs some CPU for RDP. Without recording, 8 RDP sessions used about a third less CPU; SSH sessions used the same, and memory was the same either way. The figures above are with recording, so they hold for both.
- The agent itself, which passes the sessions on to the browsers over HTTPS, needs about 40 MB of memory and adds about a tenth of the sessions' CPU.
The bandwidth to the browser leaves the gateway asset's internet
connection, or its tunnel for tunnel applications. The traffic between
the gateway asset and the target machine stays on the local network: for
RDP somewhat more than to the browser, for SSH much less.
People and sessions
A person can hold several sessions at once, for example two servers in two browser tabs, and every session counts. Size for the busiest hour: how many people work in remote desktop applications at the same time, times the sessions each of them keeps open.
A gateway asset serves the sessions of all of its portals together. If a single gateway asset would need more than you want to give one machine, spread the applications over several portals on several gateway assets.
Session limits
The gateway asset refuses new sessions beyond its limits, so it is never asked for more than it was sized for:
- Sessions on the gateway: 64 by default, 1 to 256.
- Sessions per person: 8 by default.
Set them to what you sized the gateway asset for, on the portal's detail page next to Remote desktop sessions; see Open sessions and session limits. A person beyond the limit sees The gateway runs as many remote desktop sessions as it can; try again later.
The target machines have limits of their own. An SSH server
accepts only about 10 logins that are under way at the same moment
(OpenSSH's MaxStartups) and refuses more, and the gateway asset then shows
The gateway could not reach …. Many people starting a session on the same
SSH server in the same second may run into it; a second attempt succeeds.
Disk
The agent and guacd need little: the agent's package is about 15 MB and the container image about 40 MB. guacd, which the agent downloads for remote desktop applications, takes about 30 MB, twice that for the moment of an update. 2 GB of free disk for the operating system's growth, the logs and the downloads is plenty.
Disk for recordings
A recording grows with what changes on the screen, like the CPU:
| Protocol | Idle | Ordinary work | Full-screen motion |
|---|---|---|---|
| SSH | 1.1 MB/h | 116 MB/h | 5.4 GB/h |
| RDP | 1.6 MB/h | 121 MB/h | 10.2 GB/h |
| VNC | 0.1 MB/h | 20 MB/h | 4.1 GB/h |
Plan with about 120 MB per hour of session for ordinary work, about 1 GB for a working day of one session. A session with video or constant scrolling fills gigabytes per hour.
Recordings kept on the gateway asset: Disk space for recordings has to hold everything the retention keeps:
sessions per day × hours per session × 120 MB × days kept
plus room for heavy sessions, and never less than the largest single session you expect, because a recording is removed only after its session ended. The disk needs that much free space on top of the 2 GB above, and the gateway asset refuses recorded sessions once less than 512 MiB of its disk is free.
Example: 20 people, each with one RDP session of 4 hours a day, kept for 30 days: 20 × 4 × 120 MB × 30 = 288 GB. With a fifth more for heavy sessions, set Disk space for recordings to 350 GiB and give the gateway asset a disk of about 380 GB. The calculator above starts with this example.
Recordings uploaded to a bucket: the gateway asset keeps a recording only until the bucket has it, so Disk space for recordings only has to hold the sessions that are running, plus what piles up while the bucket is not reachable. With the example above, a day of recordings (20 × 4 × 120 MB = about 10 GB) leaves room for an outage of a day; the default of 4 GiB holds less than two hours of these 20 sessions. Once the space is used up, recorded sessions are refused until the uploads catch up. The size of the bucket follows the formula for recordings on the gateway asset, with the retention set by the bucket's lifecycle rule.
The uploads add to the outgoing traffic of the gateway asset: 120 MB per session hour is about 0.3 Mbit/s for every recorded session that runs.
See Session recording for the settings.
Watching it
- Remote desktop sessions on a portal's detail page shows how many sessions run on the gateway asset against its limits.
- The line above Session recordings shows what the recordings take now and warns when the gateway asset refuses recorded sessions or uploads fail.
- The High Resource Usage card on the Dashboard lists the gateway asset when its CPU or memory has stayed above 95% for five minutes, with a notification. If it shows up there during working hours, give it more CPU or memory, or lower its session limits.