Baselining an AVD workload for Nerdio autoscale and the Nerdio Modeler

Baselining an AVD workload for Nerdio autoscale and the Nerdio Modeler

Why I baseline before I configure anything

Auto-scale in Nerdio Manager and a model in the Nerdio Modeler both ask for numbers about the users and the hosts that you rarely have at hand. When those numbers are guessed, the auto-scale settings follow the guess and the cost model inherits it.

Most of those numbers are already in Azure. The AVD diagnostics log every connection, and the AVD Insights data collection rule logs CPU, memory, sessions and input delay per session host. With a handful of KQL queries on that data you get a baseline of the workload as it runs today.

In this post I share the six queries I use and show which Nerdio Manager auto-scale setting and which Modeler field each result feeds. The principle is simple: every value you type into Nerdio should be traceable to a measurement, with the query that produced it.

What feeds what

This table is the map for the rest of the post. Each row is one measurement, where it comes from, and where it ends up in Nerdio. The auto-scale names follow how Nerdio documents the auto-scale settings of a dynamic host pool, and the Modeler names are the fields of Advisor > Modeler.

MeasurementSourceNerdio Manager auto-scaleNerdio Modeler
Users who connected, average daily usersQuery 1Total number of users in this host pool, Absent users percent
Pool type and connection typeQuery 1Desktop experience
Concurrent sessions and logons per local hourQuery 2Work Days, Start of Work Hours, Host to be Active by Start of Work Hours, Min Active Host Capacity, Available sessionsWork hours
Users who work outside the standard hoursQuery 3Some users work outside standard hours
CPU and memory per number of active sessionsQuery 4Average active sessions, CPU usage, RAM usageMaximum users per vCPU
Input delay per sessionQuery 5Guard rail for the density you chooseGuard rail for the users per vCPU
Round-trip timeQuery 6Guard rail for the Azure region
Outbound traffic of the session hostsAzure Monitor metricsNetwork egress per user
Size of the profile containersAzure Files metricsProfile size (GiB)
Peak hosts needed per VM size and regionConcurrency query from my previous post [add link]Base Host Pool Capacity, Burst Beyond Base CapacityReserved Instances

The Modeler asks for the total number of users with access, explicitly not the concurrent number, and asks separately for work hours, absence and outside hours. Auto-scale works per host pool and per hour. That is why I measure both the population and the pattern, and why every query works per host pool.

Step 1: Switch on the data sources

A baseline is only as good as the weeks of data behind it, so I switch everything on first and start measuring a month later. Three sources feed the queries, and all three land in the same Log Analytics workspace.

Three existing data sources feed both Nerdio toolsHost pool diagnosticsConnections, Network Data LogsAVD Insights ruleAzure Monitor Agent, countersPlatform metricsSession host VMs, Azure FilesLog AnalyticsWVDConnectionsWVDConnectionNetworkDataPerfread by Queries 1 to 6Metrics explorerNetwork Out, File CapacityNerdio Manager auto-scaleSizing, scaling, pre-stageNerdio ModelerUsers, hours, density, storage

The logs carry users, sessions, counters and network quality. Storage and outbound traffic come from platform metrics, which need no setup.

What must already be in place

This baseline needs more than the concurrency measurement, because it adds an agent on every session host. Check these before you switch anything on.

  • A Log Analytics workspace, and session hosts that can reach the AVD diagnostic endpoint *.prod.warm.ingest.monitor.core.windows.net on TCP 443, as listed in the required endpoints for AVD. Diagnostic data only exists from the moment the setting is enabled.
  • A managed identity on every session host. The Azure Monitor Agent requires it: system-assigned is fine for a test, Microsoft recommends user-assigned for large deployments.
  • Outbound access for the agent on TCP 443 to global.handler.control.monitor.azure.com, <region>.handler.control.monitor.azure.com, <workspace-id>.ods.opinsights.azure.com and global.prod.microsoftmetrics.com, without HTTPS inspection. With service tags, both AzureMonitor and AzureResourceManager are required.
  • Disk space on the session hosts. Microsoft suggests up to 10.5 GB for the agent cache on Windows, and the requirement doubles briefly during an agent upgrade.
  • Permissions to deploy the agent: Virtual Machine Contributor on the session hosts, and a role with Microsoft.Resources/deployments/* when you deploy through templates or Azure Policy, for example Log Analytics Contributor. You also need to be able to create the data collection rule in the resource group you pick for it.
  • A way to give new session hosts the agent and the rule. Hosts that auto-scale creates or re-images miss both unless something adds them. The built-in Azure Policy initiative Configure Windows machines to run Azure Monitor Agent and associate them to a Data Collection Rule does this, and Microsoft describes that the association also covers new resources as they are created. Existing hosts only follow after you run a remediation task.
  • FSLogix profile containers on Azure Files for the profile measurement in step 6. On other storage, use the capacity metrics of that service.
  • Read access to the metrics of the session hosts and the storage account. Monitoring Reader can view all monitoring data in a subscription.
  • For step 7 and step 8: Nerdio Manager deployed and the host pools imported. For an existing host pool that means the AVD workspace associated, the session hosts associated with their VMs, and the pool converted from static to dynamic. Auto-scale is off by default for imported host pools and only becomes available after that conversion.

Diagnostic setting on each host pool

The connection events give you users, sessions and logons. The network data gives you round-trip time per connection.

  • Host pool > Diagnostic settings > Add diagnostic setting
  • Categories: Connections, and Network Data Logs for the WVDConnectionNetworkData table
  • Destination details: Send to Log Analytics workspace

AVD Insights data collection rule

This rule makes the Azure Monitor Agent on each session host send performance counters to the Perf table. I create it through the configuration workbook of AVD Insights, which sets the counters AVD Insights expects.

  • Host pool > Insights > Open Configuration Workbook > Session host data settings
  • Workspace destination: the same Log Analytics workspace
  • DCR resource group: the resource group for the data collection rule, then Create data collection rule
  • Deploy association, Add extension and Add system managed identity, so every session host runs the agent and is linked to the rule

The counters I use from that rule are Processor Information(_Total)\% Processor Time, Memory(*)\% Committed Bytes in Use, Terminal Services(*)\Active Sessions and User Input Delay per Session(*)\Max Input Delay. All four are in Microsoft’s list of AVD Insights counters, with a sample rate of 30 or 60 seconds.

Azure portal, a host pool > Insights > Configuration Workbook, the Session host data settings tab with a data collection rule selected and all session hosts showing the agent installed

Retention and permissions

Analytics tables keep data for 30 days by default. For a baseline I raise WVDConnections, WVDConnectionNetworkData and Perf to 90 days under Tables > Manage table, so a second run can cover a full quarter.

The Perf table grows fast with these counters, and ingestion is billed per GB. Microsoft has a page to estimate the AVD Insights costs before you switch it on for a large estate.

Step 2: Count the users and how often they show up

The first question is how many people use each host pool, and how many of them are there on a normal working day. This query gives both, plus the pool type and the connection type that tell you which desktop experience to pick in the Modeler.

// ---------- Query 1: users and attendance per host pool ----------
// Modeler: Total number of users in this host pool, Absent users percent
let lookback = 30d;
let timeZone = "Europe/Amsterdam";
let connected = materialize(
    WVDConnections
    | where TimeGenerated > ago(lookback) and State == "Connected"
    | extend HostPool = tolower(tostring(split(_ResourceId, "/")[-1])),
             LocalDay = startofday(datetime_utc_to_local(TimeGenerated, timeZone))
    | extend Weekday  = toint(dayofweek(LocalDay) / 1d)
    | project HostPool, UserName, LocalDay, Weekday, SessionHostPoolType, ConnectionType
);
let totals = connected
    | summarize TotalUsers      = array_length(make_set(UserName)),
                PoolType        = take_anyif(SessionHostPoolType, isnotempty(SessionHostPoolType)),
                ConnectionTypes = strcat_array(array_sort_asc(make_set_if(ConnectionType, isnotempty(ConnectionType))), ", ")
            by HostPool;
let workdays = connected
    | where Weekday between (1 .. 5)
    | summarize DayUsers = array_length(make_set(UserName)) by HostPool, LocalDay
    | summarize WorkingDaysMeasured = count(),
                AvgDailyUsers = round(avg(DayUsers), 1),
                MaxDailyUsers = max(DayUsers)
            by HostPool;
totals
| lookup kind=leftouter workdays on HostPool
| extend AbsentPercent = round(100.0 * (1 - AvgDailyUsers / TotalUsers), 1)
| project HostPool, PoolType, ConnectionTypes, TotalUsers, WorkingDaysMeasured, AvgDailyUsers, MaxDailyUsers, AbsentPercent
| order by HostPool asc

TotalUsers is everyone who connected in the period. The Modeler asks for the users who have access to the pool, so treat this number as a floor and compare it with the members of the assigned groups. Someone with access who never logs in still counts for the Modeler.

AbsentPercent compares the average working day with the whole population. It includes holidays, leave and people who only use the pool now and then, which is what the Modeler means by its known static absence percentage. A public holiday in the period pushes it up, so I check WorkingDaysMeasured against the calendar.

PoolType comes from SessionHostPoolType, which holds SharedDesktop or PersonalDesktop. ConnectionTypes shows Desktop, RAIL for RemoteApp, or both. Together with the maximum session limit of the pool they point to one of the four desktop experiences in the Modeler.

Step 3: Map the working day and the hours outside it

Auto-scale needs to know when the day starts and how fast people arrive. This query returns 24 rows per host pool for an average working day: the concurrent sessions per hour and the number of logons.

// ---------- Query 2: the working day per local hour ----------
// Auto-scale: Work Days, Start of Work Hours, Host to be Active by Start of Work Hours, Min Active Host Capacity
// Modeler: Work hours
let lookback = 30d;
let timeZone = "Europe/Amsterdam";
let bucket = 15m;
let maxOpenConnection = 8h;
let windowEnd = now();
let sessions = materialize(
    WVDConnections
    | where TimeGenerated > ago(lookback)
    | extend HostPool = tolower(tostring(split(_ResourceId, "/")[-1]))
    | summarize ConnectedAt = minif(TimeGenerated, State == "Connected"),
                ClosedAt    = maxif(TimeGenerated, State == "Completed")
            by CorrelationId, UserName, HostPool
    | where isnotnull(ConnectedAt)
    | extend ClosedAt = min_of(coalesce(ClosedAt, ConnectedAt + maxOpenConnection), windowEnd)
);
let logons = sessions
    | summarize Logons = count() by HostPool, Quarter = bin(ConnectedAt, bucket);
let perDayHour = materialize(
    sessions
    | mv-expand Quarter = range(bin(ConnectedAt, bucket), bin(ClosedAt, bucket), bucket) to typeof(datetime)
    | summarize Sessions = array_length(make_set(UserName)) by HostPool, Quarter
    | join kind=leftouter logons on HostPool, Quarter
    | extend Logons = coalesce(Logons, 0)
    | extend LocalTime = datetime_utc_to_local(Quarter, timeZone)
    | extend LocalDay = startofday(LocalTime), Weekday = toint(dayofweek(LocalTime) / 1d), LocalHour = hourofday(LocalTime)
    | where Weekday between (1 .. 5)
    | summarize PeakSessions = max(Sessions), Logons = sum(Logons), PeakLogonsPerQuarter = max(Logons)
            by HostPool, LocalDay, LocalHour
);
let poolDays = perDayHour | summarize WorkingDays = array_length(make_set(LocalDay)) by HostPool;
perDayHour
| summarize SumPeakSessions = sum(PeakSessions), MaxPeakSessions = max(PeakSessions),
            SumLogons = sum(Logons), MaxLogonsPerQuarter = max(PeakLogonsPerQuarter)
        by HostPool, LocalHour
| lookup kind=inner poolDays on HostPool
| extend AvgPeakSessions  = round(todouble(SumPeakSessions) / WorkingDays, 1),
         AvgLogonsPerHour = round(todouble(SumLogons) / WorkingDays, 1)
| project HostPool, LocalHour, WorkingDays, AvgPeakSessions, MaxPeakSessions, AvgLogonsPerHour, MaxLogonsPerQuarter
| order by HostPool asc, LocalHour asc

The averages divide by every working day on which the pool had any activity, so an hour without sessions on a given day counts as zero instead of disappearing. MaxLogonsPerQuarter is the busiest quarter hour of logons in the whole period, and that is the number of free sessions you want ready when people arrive.

Log Analytics > Logs, the result of Query 2 for one host pool rendered as a line chart of AvgPeakSessions and AvgLogonsPerHour per LocalHour

The Modeler also asks how many users work outside the standard hours and for how long. Set workStart and workEnd to the work hours you will enter in the Modeler, and run the next query.

// ---------- Query 3: users who work outside the standard hours ----------
// Modeler: Some users work outside standard hours (percent of users, average additional hours per user per day)
let lookback = 30d;
let timeZone = "Europe/Amsterdam";
let workStart = 8;          // first local hour of the standard working day
let workEnd   = 18;         // the working day ends at this hour (18 = up to 18:00)
let minDaysOutside = 4;     // a user counts when they work outside the standard hours on at least this many days
let bucket = 15m;
let maxOpenConnection = 8h;
let windowEnd = now();
let quarters = materialize(
    WVDConnections
    | where TimeGenerated > ago(lookback)
    | extend HostPool = tolower(tostring(split(_ResourceId, "/")[-1]))
    | summarize ConnectedAt = minif(TimeGenerated, State == "Connected"),
                ClosedAt    = maxif(TimeGenerated, State == "Completed")
            by CorrelationId, UserName, HostPool
    | where isnotnull(ConnectedAt)
    | extend ClosedAt = min_of(coalesce(ClosedAt, ConnectedAt + maxOpenConnection), windowEnd)
    | mv-expand Quarter = range(bin(ConnectedAt, bucket), bin(ClosedAt, bucket), bucket) to typeof(datetime)
    | extend LocalTime = datetime_utc_to_local(Quarter, timeZone)
    | extend LocalDay = startofday(LocalTime), Weekday = toint(dayofweek(LocalTime) / 1d), LocalHour = hourofday(LocalTime)
    | extend Outside = not(Weekday between (1 .. 5) and LocalHour >= workStart and LocalHour < workEnd)
    | summarize by HostPool, UserName, LocalDay, Quarter, Outside
);
let outsideUsers = quarters
    | where Outside
    | summarize ExtraHours = count() * (bucket / 1h) by HostPool, UserName, LocalDay
    | summarize DaysOutside = count(), AvgExtraHours = avg(ExtraHours) by HostPool, UserName
    | where DaysOutside >= minDaysOutside
    | summarize UsersOutsideHours = count(),
                AvgExtraHoursPerUserDay = round(avg(AvgExtraHours), 2)
            by HostPool;
quarters
| summarize TotalUsers = array_length(make_set(UserName)) by HostPool
| lookup kind=leftouter outsideUsers on HostPool
| extend UsersOutsideHours = coalesce(UsersOutsideHours, 0)
| extend PercentOfUsers = round(100.0 * UsersOutsideHours / TotalUsers, 1)
| project HostPool, TotalUsers, UsersOutsideHours, PercentOfUsers, AvgExtraHoursPerUserDay
| order by HostPool asc

minDaysOutside keeps one late evening or a single Saturday from turning someone into an evening worker. With 30 days of data, four days is roughly once a week. A user stays connected until the session is disconnected, so somebody who leaves the client connected overnight shows up here as well, up to the 8 hour cut-off. Look at the outliers before you copy the number.

Step 4: Find out how many sessions a host carries

This is the number everything else hangs on: how many active sessions a host can take before CPU or memory runs out. The query lines up the performance counters per five minutes with the number of active sessions on that host at the same moment, and groups the result by that number.

// ---------- Query 4: CPU and memory per number of active sessions ----------
// Auto-scale: Average active sessions, CPU usage, RAM usage thresholds. Modeler: Maximum users per vCPU
let lookback = 30d;
let hostToPool = WVDConnections
    | where TimeGenerated > ago(lookback) and isnotempty(SessionHostName)
    | summarize by Host = tolower(tostring(split(SessionHostName, ".")[0])), HostPool = tolower(tostring(split(_ResourceId, "/")[-1]));
Perf
| where TimeGenerated > ago(lookback)
| where (ObjectName =~ "Processor Information" and CounterName =~ "% Processor Time" and InstanceName =~ "_Total")
     or (ObjectName =~ "Memory" and CounterName =~ "% Committed Bytes In Use")
     or (ObjectName =~ "Terminal Services" and CounterName =~ "Active Sessions")
| extend Host = tolower(tostring(split(Computer, ".")[0]))
| summarize CpuPercent       = avgif(CounterValue, CounterName =~ "% Processor Time"),
            MemCommitPercent = avgif(CounterValue, CounterName =~ "% Committed Bytes In Use"),
            ActiveSessions   = maxif(CounterValue, CounterName =~ "Active Sessions")
        by Host, TimeBin = bin(TimeGenerated, 5m)
| where isnotnull(CpuPercent) and isnotnull(ActiveSessions)
| lookup kind=inner hostToPool on Host
| extend ActiveSessions = toint(ActiveSessions)
| summarize Samples    = count(),
            CpuP50     = round(percentile(CpuPercent, 50), 1),
            CpuP95     = round(percentile(CpuPercent, 95), 1),
            MemCommitP95 = round(percentile(MemCommitPercent, 95), 1)
        by HostPool, ActiveSessions
| order by HostPool asc, ActiveSessions asc

Read it from the top down per host pool. CpuP95 and MemCommitP95 usually climb as ActiveSessions grows, and the row where one of them gets close to your limit is your practical density. I put that limit around 80 percent CPU so a host has room for a burst, but treat that as a starting point to test, not a rule. Rows with only a few Samples say little, so do not size on the highest session count you saw once.

The host names are matched on the first part of the computer name, because Perf and WVDConnections do not always write the name the same way. If a host pool returns no rows, check that its session hosts are linked to the data collection rule.

The Modeler wants users per vCPU. Divide the practical density by the number of vCPUs of the VM size: 8 sessions on a 4 vCPU host is 2 users per vCPU. AVD Insights shows a related number as users per core, which is a good cross-check, and once Nerdio Manager manages the pool its insights show user-to-CPU and user-to-RAM ratios per host pool.

Log Analytics > Logs, the result of Query 4 for one host pool, with ActiveSessions, CpuP95 and MemCommitP95 visible and the row of the chosen density highlighted.

Step 5: Set guard rails for the user experience

A density that the CPU can carry is not automatically a density users accept. Before I lock in a number, I look at input delay and round-trip time, because those are what users feel.

Input delay measures how long a mouse click or keystroke waits before an application picks it up, and the counter reports the worst value within each interval. AVD Insights sorts input delay into these categories: good below 150 ms, acceptable from 150 to 500 ms, poor from 500 ms to 2 seconds and bad above 2 seconds.

// ---------- Query 5: user input delay per local hour ----------
// Guard rail for the session density you choose
let lookback = 30d;
let timeZone = "Europe/Amsterdam";
let hostToPool = WVDConnections
    | where TimeGenerated > ago(lookback) and isnotempty(SessionHostName)
    | summarize by Host = tolower(tostring(split(SessionHostName, ".")[0])), HostPool = tolower(tostring(split(_ResourceId, "/")[-1]));
Perf
| where TimeGenerated > ago(lookback)
| where ObjectName =~ "User Input Delay per Session" and CounterName =~ "Max Input Delay"
| where InstanceName !in~ ("Max", "Average", "_Total")
| extend Host = tolower(tostring(split(Computer, ".")[0]))
| lookup kind=inner hostToPool on Host
| extend LocalHour = hourofday(datetime_utc_to_local(TimeGenerated, timeZone))
| summarize Samples = count(),
            InputDelayP50 = round(percentile(CounterValue, 50), 0),
            InputDelayP95 = round(percentile(CounterValue, 95), 0),
            PercentPoorOrBad = round(100.0 * countif(CounterValue >= 500) / count(), 2)
        by HostPool, LocalHour
| order by HostPool asc, LocalHour asc

The counter has an instance per session plus the summary instances Max and Average, so the query leaves those two out to avoid counting the same delay twice. If PercentPoorOrBad rises in the busiest hours, the hosts are fuller than users accept, whatever the CPU says. In that case I take one session per host off the density from step 4.

Round-trip time does not change with density, but it matters when the Modeler offers a different Azure region. It comes from the Network Data Logs category and is matched to the host pool through the connection ID.

// ---------- Query 6: round-trip time per host pool ----------
// Guard rail: shows whether a different region or network path changes the experience
let lookback = 30d;
let connectionPool = WVDConnections
    | where TimeGenerated > ago(lookback)
    | summarize by CorrelationId, HostPool = tolower(tostring(split(_ResourceId, "/")[-1]));
WVDConnectionNetworkData
| where TimeGenerated > ago(lookback)
| lookup kind=inner connectionPool on CorrelationId
| summarize Connections = array_length(make_set(CorrelationId)),
            RttP50 = percentile(EstRoundTripTimeInMs, 50),
            RttP90 = percentile(EstRoundTripTimeInMs, 90),
            BandwidthP10KBps = percentile(EstAvailableBandwidthKBps, 10)
        by HostPool
| order by HostPool asc

Microsoft gives no fixed threshold for round-trip time and points to the Azure network round-trip latency statistics to compare regions. I use this result as today’s reference: if a new region in the model would add latency for most users, that is a conversation to have before the cost comparison, not after.

Log Analytics > Logs, the result of Query 6 with RttP50, RttP90 and BandwidthP10KBps per host pool.

Step 6: Measure profile storage and network traffic

Two Modeler fields come from Azure Monitor metrics instead of from the logs. Both are platform metrics, so you read them in Metrics explorer without any extra setup.

Profile size per user

The Modeler starts at 30 GiB per profile. The real number is usually different, and it drives the storage cost in the model.

  • Storage account with the FSLogix profile share > Monitoring > Metrics
  • Metric namespace: File, metric: File Capacity, aggregation: Average
  • Apply splitting on the FileShare dimension to see the profile share on its own
  • Divide the capacity of the profile share by the number of profile containers on it

File Capacity is recomputed a few times a day, not every hour, so read the last value of the period. The FileShare dimension is not available for HDD pay-as-you-go shares, where the metric covers every share in the storage account. Dividing by the containers rather than by all users avoids counting people who never created a profile.

Network egress per user

The Modeler asks for the network egress per user in GB when you pick a custom workload. I use the outbound traffic of the session hosts as the measurement, because the remote session to the user starts there.

  • Resource group of the session hosts > Monitoring > Metrics, scoped to all session host VMs
  • Metric: Network Out Total, aggregation: Sum, time range: the same 30 days
  • Divide the total by the users from Query 1, and convert bytes to GB

Network Out Total counts the bytes out on all network interfaces, so it also holds traffic that is not to users, such as backups or uploads. The Nerdio documentation does not state the period for this field. Check in the Modeler whether it expects GB per month before you enter the number.

Azure portal, Metrics explorer on the storage account with File Capacity split by FileShare.
Azure portal, Metrics explorer on the session hosts with Network Out Total as a sum over 30 days.

Step 7: Turn the baseline into auto-scale settings

With the queries done, every auto-scale setting has a number behind it. The labels below follow the Nerdio documentation for dynamic host pool auto-scaling. I always start from one host pool and keep the query results next to the settings screen.

Auto-scale for a pooled host pool

The goal is enough hosts ready when people arrive, no hosts running for nobody, and a density users accept. Each value says where it comes from.

  • Auto-scale Timezone: the time zone you used in the queries, so the hours line up
  • Active Host Defined As: AVD Agent Available, which Nerdio recommends in general
  • Base Host Pool Capacity: the peak hosts needed from the concurrency query of my previous post, plus a small buffer
  • Min Active Host Capacity: the highest MaxPeakSessions in the night hours of Query 2, divided by the sessions per host from step 4 and rounded up
  • Burst Beyond Base Capacity: room above the base for a day busier than the measured period; I keep it small and raise it only when a day in the data came close to the base
  • Scaling logic, when you choose Average active sessions: the practical density from step 4, lowered if Query 5 shows poor input delay at that density
  • Scaling logic, when you choose Available sessions: maximum sessions per host from step 4, and the number of sessions to keep available set to at least MaxLogonsPerQuarter from Query 2 during work hours
  • Work Days and Start of Work Hours under Pre-stage hosts: the weekdays with activity and the hour in Query 2 where AvgLogonsPerHour starts to climb
  • Host to be Active by Start of Work Hours: AvgPeakSessions in the first hour of the working day, divided by the sessions per host and rounded up
  • Scale In Delay: the length of the morning ramp in Query 2, so pre-staged hosts are not removed before people arrive
  • Scale in aggressiveness: start with Medium, which only removes hosts with disconnected sessions, or Low, which only removes hosts without any session, and move to High once you trust the numbers

Nerdio also offers CPU usage and RAM usage triggers, alone or combined with sessions. If you use them, set the scale-out threshold at the CpuP95 or MemCommitP95 of the density you chose in step 4, so CPU and session count tell the same story.

Pre-staging and scale in pull in opposite directions early in the morning. Nerdio documents that pre-staged hosts are not scaled in during the Scale In Delay, even when they are unused, so without enough delay a host you started for 08:00 can be gone again before the first users log on.

Nerdio Manager for Enterprise, a host pool > Auto-scale, the Host pool sizing, Scaling logic and Pre-stage hosts sections filled in.

Step 8: Fill in the Nerdio Modeler

The Modeler lives in Nerdio Manager under Advisor > Modeler and builds a cost model per host pool. Nerdio is clear that the result is an estimate. With measured input, it is an estimate you can explain line by line.

Model per host pool

One host pool in the model per host pool in the baseline, so every number below has one query result behind it.

  • Total number of users in this host pool: TotalUsers from Query 1, corrected upwards for users with access who did not log on
  • Desktop experience: from PoolType, ConnectionTypes and the maximum session limit, for example SharedDesktop with Desktop and a limit above one is Multi-user desktop (pooled)
  • Azure region: the current region, unless Query 6 gives a reason to model another one
  • How demanding are your user workloads: Custom, so you can enter the measured density
  • Maximum users per vCPU: the practical density from step 4 divided by the vCPUs of the VM size
  • Network egress per user: Network Out Total divided by the users, from step 6
  • Reserved Instances: what you hold today for this VM size and region
  • Work hours: the working days and the hours of the plateau in Query 2
  • Absent users percent: AbsentPercent from Query 1
  • Some users work outside standard hours: PercentOfUsers and AvgExtraHoursPerUserDay from Query 3, with the same work hours as in the field above
  • Use FSLogix profiles and Profile size (GiB): the profile size per user from step 6

The Modeler’s own default for absence is 0, and its default profile size is 30 GiB. Both are placeholders, and a baseline is exactly what replaces them, so do not leave them on the default.

After saving, the Modeler shows the predicted cost per host pool and per user, and a comparison with an always-on deployment. Export the model to JSON and keep it with the query results: the next time someone asks where a number came from, you have the answer.

Nerdio Manager for Enterprise, Advisor > Modeler, a host pool in the model with Compute, Work Hours and FSLogix filled in from the baseline.

Step 9: Test the settings and repeat the baseline

A baseline describes the past. Before the new settings run unattended, I check them against the same data and then watch the first weeks closely.

  1. Start with one host pool and keep the old schedule documented, so you can go back within minutes.
  2. Check the first mornings: were enough hosts ready at the start of the working day, and did the first users wait for a host to start?
  3. Run Query 5 again after a week. If the share of poor input delay went up in the busy hours, the density is too high.
  4. Compare the concurrency and the hours with the auto-scale history in Nerdio Manager, which shows how auto-scale behaved together with the user sessions.
  5. Repeat all queries after every month, and after changes that move the numbers, such as a new application, a new VM size or a reorganisation.
  6. Update the Modeler with the new numbers before the next budget or reservation decision.

The Nerdio feature overview describes an auto-scale history where all auto-scale behavior, including the corresponding user sessions, can be reviewed. That view and Query 2 should tell the same story. If they do not, find out why before you tighten anything.

Closing thoughts

What makes this work is the habit of writing down where every number comes from. The settings screen of auto-scale and the fields of the Modeler look like configuration, but they are assumptions about people. Measured once, with the query next to the value, they become facts you can defend and repeat.

If you have little time, switch on the Connections and Network Data Logs categories and the AVD Insights data collection rule today, and raise the retention. A month from now, run Query 2 and Query 4 first: the working day and the density decide most of the auto-scale settings and most of the cost model.

About me

I'm Eric van Klaveren, Field CTO Benelux / Senior Sales Engineer at Nerdio. I spend my days helping organisations get more out of Azure Virtual Desktop, Intune and Windows 365. This is where I collect everything I make along the way.

More about me