Background Intelligent Transfer Service

Background Intelligent Transfer Service (BITS) is a component of Microsoft Windows XP and later iterations of the operating systems, which facilitates asynchronous, prioritized, and throttled transfer of files between machines using idle network bandwidth. It is most commonly used by recent versions of Windows Update, Microsoft Update, Windows Server Update Services, and System Center Configuration Manager to deliver software updates to clients, Microsoft's anti-virus scanner Microsoft Security Essentials (a later version of Windows Defender) to fetch signature updates, and is also used by Microsoft's instant messaging products to transfer files. BITS is exposed through the Component Object Model (COM).

Background Intelligent Transfer Service (BITS)
Developer(s)Microsoft
Initial releaseOctober 2001 (2001-10)
Stable release
10.3 / December 7, 2019 (2019-12-07)
Operating systemMicrosoft Windows
TypeDownload manager
LicenseProprietary commercial software
Websitedocs.microsoft.com/en-us/windows/win32/bits/background-intelligent-transfer-service-portal

Technology

BITS uses idle bandwidth to transfer data. Normally, BITS transfers data in the background, i.e., BITS will only transfer data whenever there is bandwidth which is not being used by other applications. BITS also supports resuming transfers in case of disruptions.

BITS version 1.0 supports only downloads. From version 1.5, BITS supports both downloads and uploads. Uploads require the IIS web server, with BITS server extension, on the receiving side.

Transfers

BITS transfers files on behalf of requesting applications asynchronously, i.e., once an application requests the BITS service for a transfer, it will be free to do any other task, or even terminate. The transfer will continue in the background as long as the network connection is there and the job owner is logged in. BITS jobs do not transfer when the job owner is not signed in.

BITS suspends any ongoing transfer when the network connection is lost or the operating system is shut down. It resumes the transfer from where it left off when (the computer is turned on later and) the network connection is restored. BITS supports transfers over SMB, HTTP and HTTPS.

Bandwidth

BITS attempts to use only spare bandwidth. For example, when applications use 80% of the available bandwidth, BITS will use only the remaining 20%. BITS constantly monitors network traffic for any increase or decrease in network traffic and throttles its own transfers to ensure that other foreground applications (such as a web browser) get the bandwidth they need. Note that BITS does not necessarily measure the actual bandwidth. BITS versions 3.0 and up will use Internet Gateway Device counters, if available, to more accurately calculate available bandwidth. Otherwise, BITS will use the speed as reported by the NIC to calculate bandwidth. This can lead to bandwidth calculation errors, for example when a fast network adapter (10 Mbit/s) is connected to the network via a slow link (56 kbit/s).[1]

Jobs

BITS uses a queue to manage file transfers. A BITS session has to be started from an application by creating a Job. A job is a container, which has one or more files to transfer. A newly created job is empty. Files must be added, specifying both the source and destination URIs. While a download job can have any number of files, upload jobs can have only one. Properties can be set for individual files. Jobs inherit the security context of the application that creates them. BITS provides API access to control jobs. A job can be programmatically started, stopped, paused, resumed, and queried for status. Before starting a job, a priority has to be set for it to specify when the job is processed relative to other jobs in the transfer queue. By default, all jobs are of Normal priority. Jobs can optionally be set to High, Low, or Foreground priority. Background transfers are optimized by BITS,1 which increases and decreases (or throttles) the rate of transfer based on the amount of idle network bandwidth that is available. If a network application begins to consume more bandwidth, BITS decreases its transfer rate to preserve the user's interactive experience, except for Foreground priority downloads.

Scheduling

BITS schedules each job to receive only a finite time slice, for which only that job is allowed to transfer, before it is temporarily paused to give another job a chance to transfer. Higher priority jobs get a higher chunk of time slice. BITS uses round-robin scheduling to process jobs in the same priority and to prevent a large transfer job from blocking smaller jobs.

When a job is newly created, it is automatically suspended (or paused). It has to be explicitly resumed to be activated. Resuming moves the job to the queued state. On its turn to transfer data, it first connects to the remote server and then starts transferring. After the job's time slice expires, the transfer is temporarily paused, and the job is moved back to the queued state. When the job gets another time slice, it has to connect again before it can transfer. When the job is complete, BITS transfers ownership of the job to the application that created it.

BITS includes a built-in mechanism for error handling and recovery attempts. Errors can be either fatal or transient; either moves a job to the respective state. A transient error is a temporary error that resolves itself after some time. For a transient error, BITS waits for some time and then retries. For fatal errors, BITS transfers control of the job to the creating application, with as much information regarding the error as it can provide.

Command-line interface tools

BITSAdmin command

BITSAdmin
Developer(s)Microsoft
Stable release
3.0
Operating systemMicrosoft Windows
TypeCommand
LicenseProprietary commercial software
Websitedocs.microsoft.com/en-us/windows-server/administration/windows-commands/bitsadmin

Microsoft provides a BITS Administration Utility (BITSAdmin) command-line utility to manage BITS jobs. The utility is part of Windows Vista and later.[2][3] It is also available as a part of the Windows XP Service Pack 2 Support Tools[4] or Windows Server 2003 Service Pack 1 Support Tools.[5]

Usage example:

C:\> bitsadmin /transfer myDownloadJob /download /priority normal http://example.com/file.zip C:\file.zip

PowerShell BitsTransfer

In Windows 7, the BITSAdmin utility is deprecated in favor of Windows PowerShell cmdlets.[6] The BitsTransfer PowerShell module provides eight cmdlets with which to manage BITS jobs.[7]

The following example is the equivalent of the BITSAdmin example above:

Start-BitsTransfer -Source "http://example.com/file.zip" -Destination "C:\file.zip" -DisplayName "myDownloadJob"

Version history

  • Version 1.0 (October 2001)
  • Version 1.2 (July 2002)
    • Included with Windows XP Service Pack 1 and Windows 2000 Service Pack 3. BITS' inclusion with Windows 2000 brought Automatic Updates capabilities into the core of that operating system.
    • No other external changes were made.
  • Version 1.5 (September 2003)
    • Included with Windows Server 2003 and made available as a separate download for Windows 2000 and Windows XP.
    • Added upload and upload-reply capability, command-line execution for events, explicit credentials, and support for Windows 2000.
  • Version 2.0 (August 2004)
    • Included with Windows XP Service Pack 2 and Windows Server 2003 Service Pack 1, and made available as a separate download for Windows 2000 Service Packs 3 and 4, and prior releases of Windows XP and Server 2003.
    • Added support for performing concurrent foreground downloads, using Server Message Block paths for remote names, downloading portions of a file, changing the prefix or complete name of a remote name, and limiting client bandwidth usage.
    • BITS 2.0 is a minimum requirement for Windows Server Update Services.
  • Version 2.5 (June 2007)
    • Adds support for certificate-based client authentication for secure HTTP transports and custom HTTP headers.
    • Support for IPv6.
    • Available for download for Windows XP and Windows Server 2003[8] and included with Windows XP Service Pack 3.[9][10]
  • Version 3.0 (November 2006)
    • Adds support for peer caching for domain-joined computers[11] (allows computers in the same subnet to download content from peers and also serve content to peers), to receive notification when a file is downloaded, to access the temporary file while the download is in progress, and to control HTTP redirects. BITS 3.0 also uses Internet Gateway Device counters to more accurately calculate available bandwidth.
    • Adds Group policies to control peer caching, download times, and the number of jobs and files download. BITS 3.0 also writes diagnostic and troubleshooting events to the system log which can be viewed in Event Viewer.
    • BITS 3.0 was introduced with Windows Vista, and is included in all later Windows versions. BITS 2.5 capabilities are also included in Windows Vista and Windows Server 2008.[9]
  • Version 4.0 (July 2009)
    • Introduced with Windows 7 and Windows Server 2008 R2 and available for Windows Vista SP2 and Windows Server 2008 RTM[12]
    • Adds a new resource access model that allows applications using BITS to assign two access tokens with different rights to do BITS transfer jobs.
    • For Windows Server, BITS 4.0 adds an HTTP-based file server called BITS compact server for computers in the same domain.[13]
    • More granular bandwidth throttling group policies.
    • With BITS 4.0, the peer caching model is deprecated and replaced by BranchCache subnet-level peer caching.
  • Version 5.0 (August 2012)
    • Introduced with Windows 8 and Windows Server 2012.
    • Adds new application programming interfaces (APIs)[14]
    • Adds the ability to allow/disallow BITS jobs over a metered connection/cellular link.[15]
    • BITS 5.0 is also included in Windows 8.1 and Windows 10.[14] The version of BITS in Windows 10 supports transfer jobs in PowerShell Remote Sessions.
  • Version 10.1 (April 2017)

List of non-Microsoft applications that use BITS

  • AppSense – Uses BITS to install Packages on clients.
  • BITS Download Manager – A download manager for Windows that creates BITS Jobs.[16]
  • BITSync – An open source utility that uses BITS to perform file synchronization on Server Message Block network shares.[17]
  • Civilization V – Uses BITS to download mod packages.
  • Endless OS installer for Windows – Uses BITS to download OS images.[18]
  • Eve Online – Uses BITS to download all the patches post-Apocrypha (March 10, 2009). It is also now used in the client repair tool.
  • Some Google services including Chrome, Gears, Pack, and YouTube Uploader used BITS.
  • Firefox (since version 68) for updates.[19]
  • KBOX Systems Management Appliance – A systems management appliance that can use BITS to deliver files to Windows systems.
  • RSS Bandit – Uses BITS to download attachments in web feeds.
  • Oxygen media platform – Uses BITS to distribute Media Content and Software Updates.[20]
  • SharpBITS – An open source download manager for Windows that handles BITS jobs.[21]
  • WinBITS – An open source Downloader for Windows that downloads files by creating BITS Jobs.[22]
  • Novell ZENworks Desktop Management – A systems management software that can use BITS to deliver application files to workstations.[23]
  • Specops Deploy/App – A systems management software that (when available) uses BITS for delivering packages to the clients in the background.[24]
gollark: *Or* just find an exploit in the external agent.
gollark: Right, so fake the test suite bits but not the rest.
gollark: Well, you only need to implement the bit the health check checks.
gollark: Simply fake the services' function.
gollark: Simply remove the flags from the server.

See also

References

  1. MSDN BITS Network Bandwidth
  2. Satran, Michael; Smith, Peter (5 March 2019). "BITSAdmin tool". Windows Dev Center. Microsoft.
  3. Ross, Elizabeth; White, Steven; Poggemeyer, Liza; Lee, Thomas; Plett, Corey (16 October 2017). "bitsadmin". Windows IT Pro Center. Microsoft.
  4. "Windows XP Service Pack 2 Support Tools". Download Center. Microsoft. 10 August 2004.
  5. "Windows Server 2003 Service Pack 1 32-bit Support Tools". Download Center. Microsoft. 30 March 2005.
  6. "Manage BITS (Background Intelligent Transfer Service) with Windows PowerShell". TechNet Magazine. Microsoft. Retrieved 25 September 2015.
  7. "BitsTransfer". Windows IT Pro Center. Microsoft. Retrieved 28 April 2020.
  8. "An update package for Background Intelligent Transfer Service (BITS) is now available for Windows Server 2003 and for Windows XP". Microsoft. 2007-10-11. Archived from the original on 5 October 2007. Retrieved 2007-10-23.
  9. "What's New". Microsoft. 2007-10-01. Archived from the original on 12 October 2007. Retrieved 2007-10-23. "The 2.5 features are available in the Windows Server 2008, Windows Vista, and Windows XP SP3 operating systems."
  10. "Overview of Windows XP Service Pack 3" (PDF). Microsoft. 2008-05-06. Archived (PDF) from the original on 17 January 2009. Retrieved 2008-12-22.
  11. Peer caching: MSDN Library
  12. Windows Management Framework BITS package
  13. Compact Server
  14. What's New in Background Intelligent Transfer Service
  15. Control a BITS download over an expensive connection
  16. BITS Download Manager
  17. "BITSync". Archived from the original on 2009-01-24. Retrieved 2008-12-31.
  18. Endless Installer for Windows DownloadManager class
  19. "Firefox 68.0, See All New Features, Updates and Fixes". Mozilla.
  20. Oxygen media platform
  21. SharpBITS
  22. WinBITS
  23. Zenworks 7
  24. Specops Deploy/App
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.