Skip to content

Describe the tempdb data files that setup creates on SQL Server on Linux - #10478

Open
Rudi Bruchez (rudi-bruchez) wants to merge 2 commits into
MicrosoftDocs:livefrom
rudi-bruchez:fix/linux-tempdb-data-files
Open

Rudi Bruchez (rudi-bruchez) wants to merge 2 commits into
MicrosoftDocs:livefrom
rudi-bruchez:fix/linux-tempdb-data-files

Conversation

@rudi-bruchez

Copy link
Copy Markdown
Contributor

What's wrong

The "Configure multiple tempdb data files" section of docs/linux/configure/performance-best-practices-operating-system.md says:

Because a SQL Server on Linux installation doesn't offer an option to configure multiple tempdb files, consider creating multiple tempdb data files after installation.

The sentence dates from the SQL Server 2017 version of the article. Since SQL Server 2019, setup on Linux creates multiple tempdb data files on its own, based on the number of logical processors, as What's new in SQL Server 2019 on Linux already states. A reader of the current text adds files to an instance that already has them. Express edition is the exception: it still gets a single data file.

Evidence

Fresh containers mcr.microsoft.com/mssql/server, MSSQL_PID set to each edition. The count is read once setup has finished: the error log first reports "The tempdb database has 1 data file(s)", then, a few seconds later, the final count.

SELECT cpu_count FROM sys.dm_os_sys_info;
SELECT COUNT(*) AS tempdb_data_files, MIN(size)/128 AS size_mb, MAX(growth)/128 AS growth_mb
FROM tempdb.sys.database_files WHERE type_desc = 'ROWS';
Build Edition Logical processors used tempdb data files
17.0.5035.5 (2025 RTM-CU10) Enterprise Developer 22 8
17.0.5035.5 (2025 RTM-CU10) Enterprise Developer, started with taskset -c 0-3 4 4
17.0.5035.5 (2025 RTM-CU10) Enterprise Developer, started with taskset -c 0-1 2 2
17.0.5035.5 (2025 RTM-CU10) Standard 22 8
17.0.5035.5 (2025 RTM-CU10) Express 8 1
17.0.4065.4 (2025 RTM-CU7) Enterprise Developer 22 8
17.0.4065.4 (2025 RTM-CU7) Express 8 1
16.0.4305.5 (2022 RTM-CU27-GDR) Developer, Web 22 8
16.0.4305.5 (2022 RTM-CU27-GDR) Express 8 1
15.0.4500.2 (2019 RTM-CU32-GDR) Developer, Web 22 8
15.0.4500.2 (2019 RTM-CU32-GDR) Express 8 1
14.0.3550.4 (2017 RTM-CU31-GDR) Developer, Express 22 and 8 1

Each file is 8 MB with a 64-MB growth. Observed: from SQL Server 2019, one data file per logical processor, up to eight, except in Express. Expected per the current text: a single data file.

Change

Replaces the sentence with what setup does from SQL Server 2019, and keeps the advice to add files for SQL Server 2017 and for Express edition.

@prmerger-automator

Copy link
Copy Markdown
Contributor

Rudi Bruchez (@rudi-bruchez) : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit b225b1a:

✅ Validation status: passed

File Status Preview URL Details
docs/linux/configure/performance-best-practices-operating-system.md ✅Succeeded

For more details, please refer to the build report.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

An active documentation issue remains because the guidance omits the required caveat for in-place upgrades that may retain only one tempdb data file.

1 open issue
What changed in this PR

Updates SQL Server on Linux tempdb guidance to describe the data files created automatically by SQL Server 2019 and later, while preserving manual configuration guidance for SQL Server 2017 and Express edition.

Changes:

  • Documents automatic creation of up to eight tempdb data files based on logical processors.
  • Notes that Express edition continues to use a single data file.
  • Retains guidance to add files manually where setup does not create them automatically.

This pull request requires changes.

File Description
docs/​linux/​configure/​performance-best-practices-operating-system.md Updates tempdb data-file guidance for SQL Server versions and editions, but should retain the caveat for instances upgraded from SQL Server 2017.

Review effort: Lite

#### Configure multiple `tempdb` data files

Because a [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] on Linux installation doesn't offer an option to configure multiple `tempdb` files, consider creating multiple `tempdb` data files after installation. For more information, see [Recommendations to reduce allocation contention in SQL Server tempdb database](/troubleshoot/sql/database-engine/performance/recommendations-reduce-allocation-contention).
Starting with [!INCLUDE [sssql19-md](../../includes/sssql19-md.md)], a new installation of [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] on Linux creates multiple `tempdb` data files based on the number of logical processors, up to eight files. Express edition creates a single `tempdb` data file. For [!INCLUDE [sssql17-md](../../includes/sssql17-md.md)] and for Express edition, consider creating multiple `tempdb` data files after installation. For more information, see [Recommendations to reduce allocation contention in SQL Server tempdb database](/troubleshoot/sql/database-engine/performance/recommendations-reduce-allocation-contention).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, and I measured it: a SQL Server 2017 instance upgraded in place to 2019 (15.0.4500.2) or 2025 (17.0.5035.5) on Linux still has a single tempdb data file. The paragraph now says so and extends the recommendation to upgraded instances.

@Court72

Copy link
Copy Markdown
Contributor

Attinder Pal Singh (@AttinderPalSingh)

Can you review the proposed changes?

Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

@prmerger-automator prmerger-automator Bot added the aq-pr-triaged tracking label for the PR review team label Oct 30, 2026
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 7aad7be:

✅ Validation status: passed

File Status Preview URL Details
docs/linux/configure/performance-best-practices-operating-system.md ✅Succeeded

For more details, please refer to the build report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants