# Patent

## Title
Backup simulation for backing up filesystems to a storage device

## Abstract

Embodiments are directed to methods and apparatus that backup filesystems to a storage device. A backup simulation is used to determine a number of agents to backup the filesystems.

## Background
BACKGROUND
Unstructured data is a large and fast growing portion of assets for companies and often represents 70% to 80% of online data. Analyzing and managing this unstructured data is a high priority for many companies. Further, as companies implement enterprise-wide content management (such as information classification and enterprise search) and as the volume of data in the enterprises continues to increase, establishing a data management strategy becomes more challenging.
Backup management also faces challenges to manage large amounts of unstructured data. Backup systems are required to process increasing amounts of data while meeting time constraints of backup windows.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 shows a table that summarizes data for filesystems backed-up over time in accordance with an example embodiment of the present invention.
FIG. 2A shows a graph of profiles of filesystems backed-up over time in accordance with an example embodiment of the present invention.
FIG. 2B shows another graph of profiles of the filesystems backed-up over time in accordance with an example embodiment of the present invention.
FIG. 3 shows a storage system with a tape library backing up filesystems to tape drives in accordance with an example embodiment of the present invention.
FIG. 4A shows blocks of backup times for filesystems with random scheduling in accordance with an example embodiment of the present invention.
FIG. 4B shows blocks of backup times for filesystems with optimized scheduling in accordance with an example embodiment of the present invention.
FIG. 5 shows an LBF algorithm for scheduling and performing backup of objects in accordance with an example embodiment of the present invention.
FIG. 6 shows a table that provides reductions in backup times when the LBF algorithm is applied to backup data in accordance with an example embodiment of the present invention.
FIG. 7A shows a first distribution of job assignments of objects to four tape drives with two concurrent agents per drive in accordance with an example embodiment of the present invention.
FIG. 7B shows a second distribution of job assignments of objects to four tape drives with two concurrent agents per drive using a scheduling algorithm in accordance with an example embodiment of the present invention.
FIG. 8 shows a flow diagram of a method for minimizing data interleaving in a storage device in accordance with an example embodiment of the present invention.
FIG. 9 shows a table that provides a minimum number of disk agents in a backup system in accordance with an example embodiment of the present invention.
FIG. 10 shows an exemplary storage system in accordance with an example embodiment.



DETAILED DESCRIPTION
Example embodiments relate to minimizing interleaving to backup objects and filesystems to storage devices.
One embodiment executes a first simulation to backup objects to a storage system using a plurality of agents that backup data to multiple drives in a tape library. A duration of time to backup the objects with the plurality of agents is recorded. A latency to retrieve objects from the storage device can also be recorded. Next, the number of agents is reduced, and a second simulation is executed using this reduced number of agents. A duration of time to backup the objects with the reduced number of agents is compared with the duration of time to backup the objects with the first number of agents. If the backup time increased, then the objects are backed up according to the first simulation. In this situation, backing up with the reduced number of agents actually decreased efficiency since backup time, interleaving of data, and latency increased. If the backup time did not increase (i.e., remained the same), then the objects are backed up according to the second simulation. The steps of reducing the number of agents and re-executing a simulation with the reduced number of agents repeat until a duration of backup time increases or changes.
Given a number of filesystems or objects to backup to a storage device, one embodiment determines both a minimum time required to backup the objects to the storage device and a minimum number of agents needed to backup the objects without exceeding this minimum time. Example embodiments, however, are not limited to backing up data within the minimum time. One embodiment develops one or more target backup times that are greater than the minimum time. The minimum number of agents for each target time is then determined. Thus, a backup schedule can be constructed for any given time, and the minimum number of agents determined for the times in the schedule. For example, a minimum backup time might be 8 hours using 16 agents. An administrator, however, may decide to backup overnight and have 12 available hours. Here, the minimum number of agents to backup within 12 hours is less, for example 12 agents. During the overnight backup, 12 agents are used to backup the data, while 4 agents can be used for other tasks.
As filesystems are backed up over time, a time or duration to backup each filesystem is stored as part of historical information. This information is used to schedule and prioritize future backups so the filesystems are backed up with an optimal or reduced overall time. The information is also used to reduce interleaving of data across multiple disks. Filesystems will longer running backup times are scheduled and commenced first, while filesystems with shorter backup times are subsequently commenced. A sequence determines when a filesystem will commence backup when compared to other filesystems also awaiting backup. This sequence or ordering is based on a previous length of time to backup each filesystem. As such, example embodiments determine an optimal ordering to backup multiple filesystems to one or more storage devices.
One embodiment uses historic information about prior object backup processing times and generates a job scheduling that reduces an overall time to backup data. Under this scheduling, the longest backups (the objects with longest backup time) are scheduled first (referred to herein as longest backups first or LBF).
One embodiment provides a framework to utilize an existing backup infrastructure of an enterprise by integrating additional content analysis routines and extracting already available filesystem metadata over time. This framework is used to perform data analysis and data trending that assists in adding performance optimization and self-management capabilities to backup data and perform other management tasks.
Overview
As discussed more fully below, example embodiments analyze historical patterns and behaviors of an enterprise's data to identify trends and more efficiently manage the data (for example, designing and configuring the resources and application constraints that IT professionals deal with, such as, application consolidation, resource allocation, storage sizing, quota management, backup system configuration, reducing backup time, etc.).
Example embodiments use a historical summary of metadata to solve capacity planning problems, optimize backup schedules, and determine resource allocation tasks. For example, software tools are used to capture metadata of each backup period and used to provide data points for initial metadata analysis and trending. The backup infrastructure is an example location to integrate additional content analysis routines as well as to extract already available filesystem metadata and perform data analysis using historical filesystem snapshots. For example, having visibility into the location of files in the corporate network and machines is useful in legal cases. Using the backup catalogue to prove which user had access at which time to a file and who had a copy on their desktop or laptop computer can be determined. Understanding the type of data located on a computer could also be used as a trigger of further investigating data on a specific computer and performing additional content analysis of the data. Analyzing the metadata allows the identification of a suspect system and triggering a restore of old data to a temporary (potentially even virtual system) for the analytics to run without the employee noticing.
Random job scheduling for backups can lead to inefficient backup processing and an increased backup time. To avoid this inefficiency, example embodiments use historic information about the object backup processing time and suggest a job scheduling that uses LBF, where the objects with longest projected backup time are scheduled first.
In one performance study, a workload was collected from seven backup servers. Example embodiments achieved a time savings (40 minutes to 212 minutes) under a job scheduling that used LBF for all seven backup servers. The reduction of the backup time (5%-30%) depends on the size distribution of objects for which the backup server is responsible. When a backup server has a significant portion of objects with a long processing time, the proposed new job scheduling is especially efficient and provides significant backup time reduction.
Typically, a backup tool has a configuration parameter which defines a level of concurrency (i.e., a number of concurrent processes called disk agents) which can backup different objects in parallel to multiple tape drives. The drawback of such an approach is that the data streams from different objects are interleaved on the tape. When data from a particular object is restored, there is a higher restoration time for its retrieval when compared with data retrieved from a continuous, non-interleaved data stream written by a single disk agent. Using a workload analysis of the seven backup servers, we observe that the overall backup time is often limited by the longest job duration, which cannot be further improved. In such situations, a tool can use a reduced number of disk agents to avoid additional data interleaving (or recommend a decreased number of tape drives) while still optimizing the overall backup time. Example embodiments provide a variety of algorithms that assist in automating system administrator efforts and optimizing the backup tool performance.
Framework for Assessing Dynamics of Enterprise Information Assets
To provide a “first-approximation” summary of unstructured information assets and their trends over time in the enterprise, example embodiments use historical data available from backup databases. Companies now store months to years of backup metadata online in order to provide the ability to quickly find and recover files when they are needed. In this way, existing backups already capture business-critical data and their evolution over time. Backup tools and utilities, however, are not designed to support file reporting and their metadata analysis, classification, aggregation, and trending over time. Example embodiments extend functionality of the backup tools to provide valuable data and metadata analysis services in an automated, representative, and fast manner.
Conceptually, backup tool functionality is built around the backup session and the objects (mount points or filesystems) that are backed up during the session. In many systems, there is no direct and simple way to retrieve only the file metadata for the entire filesystem and to perform a specific analysis of these data over time. To extract the snapshot of filesystem metadata at a particular moment of time, one performs a sequence of steps to retrieve a filesystem catalogue. This procedure might take several hours for a large collection of files (e.g., 1,000,000 files or more), which makes the whole process inefficient (time- and space-wise) when such snapshots are extracted for analysis, building statistics and trends over longer durations of 6-18 months. The existing data structures in the backup database do not support this large-scale metadata retrieval and data analysis.
Example embodiments create representative, complementary filesystem metadata snapshots during the backup sessions. The format of such snapshots is specifically designed to derive detailed statistics and trends. Furthermore, these snapshots are further folded into a compact filesystem metadata summary that uniquely reflects filesystem evolution and dynamics over time.
Under this approach, there is an entry with metadata for each file, link, or directory. This data includes permissions of a file, owner, group, ACLs, size, date, time, and a file name (with a full path). The entries are sorted in by the file name. Additionally, there is a field in each entry that represents a timestamp of the backup, denoted as the backup_id.
When the next snapshot is generated for the same filesystem (for example, a week later), the snapshots are combined. Specifically, both tables are merged and then sorted in an alphabetic order by the file name. In such a way, if a file did not change between the backups, then there are two identical entries in the table side-by-side (they only differ by their backup_ids). In a similar way, an embodiment determines which files got modified, or deleted, or newly introduced to the system.
For each full consecutive backup, a set of metrics is created that reflects the quantitative differences and dynamics of the system over time (the same characterization is used for large file subgroups of interest: office files, text files, PowerPoint files, executables, etc.). Example metrics include, but are not limited to, the following:

    
    
        Total—the overall number of files Nt and their aggregate size St;
        Cold—the number of unchanged (cold) files Nc and their aggregate size Sc;
        Modified—the number of modified file Nm and their aggregate size Sm;
        New—the number of newly added files Nn and their aggregate size Sn;
        Deleted—the number of deleted files Nd and their aggregate size Sd.
    
    


This set of metrics serves as a filesystem signature. It represents the system size, both the number of files and their storage requirements, and efficiently reflects the system dynamics over time. The introduced filesystem signature presents the fraction of the files that are stable and do not change between the backups, as well as the churn in the system which is characterized by the percentage of files that are modified, added, or deleted in the system. This data collected over time is used in a regression model for trending analysis.
Instead of keeping multiple copies of file metadata in different backup snapshots, a compact summary is created that is representative of the overall filesystem and all its files over time. The summary contains the latest file metadata (for each file) and a set of additional fields that represent file dynamics. Example summary contents include, but are not limited to, the following:

    
    
        introduction date—the backup_id or the earliest snapshot that has the file;
        counter of modifications over time—this counter is set to 0 when a file is introduced to the system, and gets increased each time a modification to the earlier recorded metadata is observed;
        modification date—the backup_id that corresponds to the last modification date (initialized to empty);
        deletion date—the backup_id that corresponds to the date when the files was deleted (initialized to empty).
    
    


This filesystem metadata summary is compacted and detailed at the same time: it uniquely characterizes the filesystem history and evolution over time.
One example embodiment implemented a prototype of a filesystem metadata analysis module on the top of Hewlett-Packard's Data Protector 6.0 toll. Using seven backup servers, a detailed metadata and trend analysis of the backed up filesystem were performed over 1.5 years. There were 570 objects or filesystems in the set that were classified into one of the following three groups:

    
    
        (1) Small objects: with less than 5,000 flies. Typically (but not always), the small objects are system files. The object size (in bytes) in this category is diverse: from 20 KB to 587 GB. This shows the utility of having both dimensions in the filesystem characterization: number of files and their storage requirements.
        (2) Medium objects: with more than 5,000 files but less than 100,000 files. The objects size in this group was in a broad range from 202 MB to 1.2 TB.
        (3) Large objects: with more than 100,000 files. The largest object in the set had 4.5 million files. The object size in this category was in a range 665 MB-750 GB.
    
    


FIG. 1 shows a table 100 that summarizes the object characterization in the analyzed collection. The table includes three object types (small, medium, and large) and values in respective columns for “% of All the Objects” in a first column, “% of All the Files” in a second column, and “% of All the Bytes” in a third column.
While each object group constitutes about one third of the overall collection, the impact of the large objects is clearly dominant: the large objects are responsible for 93.2% of all the files and 66% of all the bytes in the collection.
When we compared weekly (full) backups aiming to characterize dynamics of the collection under study, we found that almost 50% of all the objects did not change between the backups. For the remaining objects the modifications are relatively small: for 95% of the objects the cold files are dominant and they constitute 90-99% of the files and the rates of modified and newly added files are in the range 1-10%. By grouping the filesystems in cold, slow-changing, and dynamic collections, one can optimize how often full versus incremental backups are performed for different type collections.
FIG. 2A shows a graph 200 of profiles of filesystems backed-up over time. More specifically, the graph shows the profiles of the analyzed 570 objects over time. There are two lines in the figure: first line represents the object profile in the beginning of February, while the second line reflects the March profile. The graph 200 shows the number of files per object (sorted in increasing order) on a logarithmic scale.
FIG. 2B shows another graph 250 of profiles of the filesystems backed-up over time. More specifically, the graph shows the size of the objects in MBytes (sorted in increasing order) on a logarithmic scale. Both lines are close and reflect a gradual change in the studied file collection over time.
The results of the workload analysis address a broader spectrum of performance and data management optimizations. The automated analysis of the filesystem “life span” (e.g., identifying filesystems and information sources that became “cold”) is useful for automated file migration in multi-tier storage systems. The analyzed file metadata and their summaries provide useful views about managed enterprise information assets, their dynamics and trends based on available file attributes and organization structure.
Discussion of Backup Tool Performance Inefficiencies
The functionality of a backup tool is built around a backup session and the objects (mount points or filesystems of the client machines) that are backed up during the session. FIG. 3 shows a storage system 300 that includes tape library 305 using a backup tool or software application 340. The library includes a set of objects or filesystems 310 being backed-up to storage devices, such as tape drives (shown as 320A, 320B, to 320N) using multiple disk agents (shown as 330A, 330B, to 330N). A backup tool 340 manages the backup of the filesystems to the tape drives. A plurality of client machines, hosts, or servers (shown as 350A, 350B, to 350M) communicates with the library 305 through one or more networks 360.
For illustration, assume there are 4 of 6 tape drives (each solution comes with a fixed number of tape drives; it is not a parameter). Each such tape drive has a configuration parameter that defines a concurrency level (i.e., a number of concurrent processes called disk agents) that backup different objects in parallel to the tape drives. Traditionally, this is performed because a single data stream generated by a disk agent copying data from a single object cannot fully utilize the capacity/bandwidth of the backup tape drive due to slow client machines. To optimize the total backup throughput, a system administrator can configure up to 32 disk agents for each tape drive to enable concurrent data streams from different objects at the same time. The drawback of such an approach is that the data streams from 32 different objects are interleaved on the tape. When the data of a particular object is requested to be restored, there is a higher restoration time for retrieving such data compared with a continuous, non-interleaved data stream written by a single disk agent.
When a group of N objects is assigned to be processed by the backup tool, a sequence or order cannot be defined in which these objects are processed by the tool. Typically, any available disk agent is assigned for processing to any object from the set, and the objects (which might represent different mount points of the same client machine) is written to different tape drives. Thus, traditionally, a way does not exist to define an order in which the objects are processed by concurrent disk agents to the different tape drives. Potentially, this may lead to inefficient backup processing and an increased backup time.
The following scenario illustrates this inefficiency. Let there be ten objects O1, O2, . . . , O10, in a backup set, and let the backup tool have four tape drives each configured with 2 concurrent disk agents (i.e., with eight disk agents in the system). Let these objects take approximately the following times for their backup processing: T1=T2=4 hours, T3=T4=5 hours, T5=T6=6 hours, T7=T8=T9=7 hours, and T10=10 hours. If the disk agents randomly select the following eight objects, O1, O2, O3, . . . , O7, O8, for initial backup processing then objects O9 and O10 will be processed after the backup of O1 and O2 are completed (since backup of O1 and O2 take the shortest time of 4 hours), and the disk agents which became available will then process O9 and O10. In this case, the overall backup time for the entire group will be 14 hours. FIG. 4A shows blocks of backup times 400 for filesystems or objects with random scheduling in accordance with this scenario.
The optimal scheduling for this group is to process the following eight objects instead: O3, O4, . . . , O10 first, and when processing of O3 and O4 is completed after 5 hours, the corresponding disk agents will backup the remaining objects O1 and O2. If the object processing follows this new ordering schema then the overall backup time is 10 hours for the entire group. FIG. 4B shows blocks of backup times 450 for filesystems with optimized scheduling using LBF.
While above scenario demonstrates the backup tool behaving inefficiently with a simple example, the traditional enterprise environment might have hundreds of objects for backup processing. Hence, one embodiment automates the object scheduling process. As discussed more fully below, one embodiment includes an additional job scheduler in the backup solution which aims to optimize the overall backup time and helps to avoid manual configuration efforts by system administrators who try to achieve the same performance goal.
LBF Sceduling to Optimize and Reduce Backup Time
Example embodiments are applicable to both full backups (i.e., when the data of the entire object is processed during a backup) and incremental backups (i.e., when less than the entire object is processed, such as modified and newly added files from the object). For discussion purposes, however, embodiments are further described for a full backup.
For each backed up object, there is recorded information on the number of processed files, the total number of transferred bytes, and the elapsed backup processing time. One embodiment uses historic information on duration for processing of backup jobs (the jobs which were successfully completed).
Some issues to consider are whether past measurements of backup processing time are good predictors of the future processing time, and whether such measurements can be used for backup job assignment and scheduling processes. Our historic data analysis shows that while different objects might have different backup processing time, the processing time of the same object is quite stable over time because of gradual changes in the object size.
LBF Scheduling Algorithm
FIG. 5 shows an LBF algorithm for scheduling backup of objects.
According to block 500, for an upcoming full backup, one embodiment obtains information about the job durations from one or more previous or historic full backups. For example, one embodiment obtains previous times required to backup one or more objects or filesystems to a storage device, such as a tape drive.
According to block 510, an ordered list of objects sorted in decreasing order of their backup durations is created or generated. By way of example, this ordered list of objects is created as follows:

OrderedObjectList={(Ob1,Dur1), . . . , (Obn,Durn)}

where Durj denotes the backup duration of object Obj, and

Dur1≧Dur2≧Dur3≧ . . . ≧Durn.

According to block 520, the tape counters and/or drives are observed and initialized. For example, let there be N tape drives: Tape1, . . . , TapeN, and each tape drive is configured with k disk agents. We observe the following running counters per each tape drive Tapei:

    
    
        DiskAgenti—a counter of available (not busy) disk agents of tape drive Tapei; and
        TapeProcTimei—a counter of overall processing time assigned to tape drive Tapei.
    
    


For each tape drive Tapei (1≦i≦N) these counters are initialized as follows:

DiskAgenti=k

TapeProcTimei=0.

Now, we describe the iteration step of the algorithm. Let (Obj,Durj) be the top object in the OrderedObjectList, and let




  
    
      TapeProcTime
      m
    
    =
    
      
        min
        
          
            
              
                1
                ≤
                i
                ≤
                N
              
              &
            
            ⁢
            
              DiskAgent
              i
            
          
          >
          0
        
      
      ⁢
      
        (
        
          TapeProcTime
          i
        
        )
      
    
  
  ,




i.e., the tape drive Tapem has the smallest assigned processing time, and it still has an available disk agent that can process the object Obj.

According to block 530, objects are assigned to a disk agent. For example, object Obj is assigned for processing to the available disk agent at the tape drive Tapem, and the running counters of this tape drive are updated as follows:

TapeProcTimemTapeProcTimem+Durj 

DiskAgentmDiskAgentm−1.

This algorithm assigns the longest jobs to be processed first. For example, one embodiment assigns agents based on a priority in which objects having a longest job duration (i.e., longest time to complete backup operation from start to finish) are assigned and executed first. Objects having a shortest job duration (i.e., shortest time to complete backup operation from start to finish) are assigned and executed last. The priority thus executes backup operations based on a hierarchy of time required to backup the object of filesystem. Further, in one embodiment, the job assignment to concurrent disk agents is performed to balance the overall amount of processing time assigned to different tape drives.
According to block 540, once the disk agents are assigned some objects, the backup processing can start.
According to block 550, when disk agent finishes backing up object, the counter is updated, and the disk agent is assigned the next object in list. For example, when a disk agent at a tape drive Tapem completes the backup of the assigned object, the running counter of this tape drive is updated as follows:

DiskAgentmDiskAgentm+1.

Then the disk agent of this tape drive is assigned the next available object from the OrderedObjectList, and the running counters are updated again, and the backup process continues.
In a performance study, historic information on the duration of backup jobs was collected from the seven backup servers. FIG. 6 is a table 600 that shows the absolute and relative reduction of the overall backup times when the proposed scheduling algorithm is used. As shown in table 600, a reduction in backup time is achieved across all the seven backup servers when using the job scheduling algorithm of FIG. 5. The absolute time savings range from 39 min to 212 min.
Minimizing Data Interleaving
During a backup of many objects, each tape drive can simultaneously use multiple agents. Using a fixed number of concurrent disk agents per tape drive, however, is not desired in some backup situation. For example, multiple agents can cause additional interleaving of data streams on the tape and hence increase latency for subsequent reads.
The following scenario illustrates data interleaving with multiple disk agents per tape drive. Let there be twenty objects O1, O2, . . . , O20 in the backup set, and let the backup tool have four tape drives each configured with 2 concurrent disk agents. Let these objects take approximately the following time for their backup processing: T1=T2= . . . =T18=1 hour, T19=9 hours, T20=10 hours.
FIG. 7A shows a first distribution of job assignments of objects to four tape drives (700A, 700B, 700C, and 700D) with two concurrent agents per drive. Each object is shown with a designation for a length of time required to backup the object (for example, “10 h” designating ten hours to backup the object). This distribution occurs, for example, using the LBF algorithm.
The overall backup time is defined by the duration of the longest job, T20=10 hours which occurs in disk drive 700A. While drive 700A backs up approximately the last five hours of its object, most of the disk agents in the backup system are idle (i.e., disk agents in drives 700C and 700D have already completed their respective backups). Furthermore, all four disk drives include some data interleaving. For example, disk drives 700A and 700B have data interleaving for one hour; and disk drives 700C and 700D have data interleaving for four hours.
One embodiment provides methods to reduce or eliminate data interleaving. FIG. 7B shows a distribution of the same job assignments of objects to four tape drives with two concurrent agents per drive using a scheduling algorithm in accordance with an example embodiment of the present invention.
In FIG. 7B, all jobs are scheduled without interleaving. At the same time, the jobs are completed in the same amount of time. If some interleaving is desirable for achieving a higher tape drive throughput then the same idea can be used for minimizing the number of tape drives used for processing a given workload. Furthermore, freed resources can be used for some dedicated tasks like database backup, etc. For example, only one disk agent per disk drive is used to backup the objects. This leaves four agents available for other tasks (i.e., one agent for each drive is not being used for the backup).
FIG. 8 shows a flow diagram of a method for minimizing data interleaving in a storage device, such as a tape drive. The method determines a minimum required number of disk agents (DA) in a backup system for optimizing an overall backup time. The method automates configuration of the backup tool with either a minimum number of disk agents or a minimum number of tape drives in the backup system required for efficient processing of a given workload.
In one embodiment, the method first simulates the achievable backup processing time under the default system parameters. The method then repeats the simulation cycle for estimating the backup processing time under a decreased number of disk agents in the system. This simulation cycle ceases once a decreased number of disk agents in the system leads to a worse system performance (i.e., an increased backup processing time for a given workload).
According to block 800, obtain job durations from previous full backups. The job durations form part of the historic information (including metadata) from the prior backups for the filesystems or objects.
According to block 810, an ordered list of objects sorted in decreasing order of their backup durations is created or generated. By way of example, this ordered list is created as follows:

OrderedObjectList={(Ob1,Dur1), . . . , (Obn,Durn)},

where Durj denotes the backup duration of object Obj, and

Dur1≧Dur2≧Dur3≧ . . . ≧Durn.

According to block 820, the tape counters and/or drives are observed and initialized. For example, let there be N tape drives: Tape1, Tape2, . . . , TapeN, and each tape drive is originally configured with k default disk agents. Hence,

NumGr=N×k 

defines a default value of overall number of disk agents available in the system with a default configuration.

According to block 830, backup processing is simulated for the backup jobs from the ordered list to determine the overall backup processing time under the default system parameters (for example, parameters currently being used). For example, the method simulates the backup processing by assigning the backup jobs from the ordered list OrderedObjectList to Group1, . . . , GroupNumGr according to the LBF scheduling algorithm. The object assignment is simulated using the following iteration step:
Let GroupProcTimei (1≦i≦NumGr) be a counter for overall processing time assigned to group Groupi, and which is initialized as GroupProcTimei=0. Let (Obj, Durj) be the top object in the OrderedObjectList, and let




  
    
      GroupProcTime
      m
    
    =
    
      
        min
        
          1
          ≤
          i
          ≤
          N
        
      
      ⁢
      
        (
        
          GroupProcTime
          i
        
        )
      
    
  
  ,




i.e., Groupm has the smallest assigned processing time.

Then object Obj is assigned for processing to group Groupm, and the running counter of this group is updated as follows:

GroupProcTimemGroupProcTimem+Durj.

After the assignment of all the objects from the list is completed, the method computes the maximum processing time as follows:




  
    MaxProcTime
    NumGr
  
  =
  
    
      max
      
        1
        ≤
        i
        ≤
        NumGr
      
    
    ⁢
    
      
        (
        
          GroupProcTime
          i
        
        )
      
      .
    
  




The computed time MaxProcTimeNumGr defines the overall backup processing time under the default system parameters.
According to block 840, the number of disk agents being used for backup operations in the system is decreased as follows:

NumGrNumGr−1,

and repeat the backup processing simulation for the decreased number of groups NumGr−1.

According to block 850, a determination is made as to whether performance has decreased. This simulation cycle ceases once a decreased number of disk agents in the system leads to a worse system performance (i.e., an increased backup processing time for a given workload). If performance has not decreased, then flow loops back to block 840. If performance has decreased, then flow proceeds to block 860.
For example, if MaxProcTimeNumGr=MaxProcTimeNumGr−1, then it means that the same backup processing time can be achieved with a decreased number of disk agents in the system. The loop is repeated until a minimum number of disk agents in the system is found such that backup occurs while avoiding unnecessary interleaving of data streams at the tape drives.
According to block 860, once the minimum number of disk agents in the system is found, the default system parameters are changed or adjusted to use the minimum number of disk agents. By way of illustration, assume the method recommends nine total disk agents for a backup server with four tape drives. In this configuration, three tape drives are configured with two disk agents, and one tape drive is configured with three disk agents.
According to block 870, the backup is scheduled and/or executed with the discovered minimum number of disk agents. Alternatively, the number is displayed on a computer, transmitted to an administrator, stored in memory, and/or processed by a computer for other storage transactions.
The recommendation for a minimum number of disk agents is used in other ways as well. For example, if the method recommends nine disk agents in total, the system administrator might use this analysis to reduce a total number of tape drives that are needed for processing a given workload. Instead of using four tape drives, the administrator sets backup with only three tape drives. Here, the fourth (i.e., unused tape drive) is allocated for processing an additional workload (such as a database backup, which typically requires a special setup).
FIG. 9 shows a table 900 that provides a minimum number of disk agents in a backup system in accordance with an example embodiment of the present invention. Data was collected from a performance study that gathered historic information on durations of the backup jobs collected from seven backup servers. Table 900 shows the minimum number of disk agents in the system configuration that provides an optimized backup processing time without sacrificing service quality. For the study, the default value of disk agents for the backup servers was set to four per each tape drive, with four tape drives in the original system configuration (i.e., 16 disk agents total in the original backup system).
As shown in the table, for six out of seven backup servers there is a significant reduction in the recommended number of disk agents in the system compared to the default value of 16 disk agents: five servers might operate with 8-10 disk agents in total, while Server 2 might be configured with 5-6 disk agents in total. Only Server 5 has default configuration parameters that are close to the ones which are required for efficient processing of the given workload. For Server 5 the method (shown in FIG. 8) was able to reduce the number of disk agents only to 14-15 from the original 16 agents. This server had the largest backup time reduction under LBF scheduling algorithm. This means that the workload of this backup server is quite balanced under LBF scheduling and cannot be optimized much further.
The method of FIG. 8 can also be used for achieving a slightly different performance objective set by a system administrator. For example, suppose the system administrator cares about completing the backup in time T (where T might be longer than the optimal time). Then a question: what should be a minimum required number of disk agents in the backup system (or respectively a minimum required number of tape drives) to process a given workload within the time T? The method can be used to provide a number of disk agents for this scenario.
One embodiment computes average backup times over a period of time (for example, weeks or months) from previous backups of the filesystems. For example, the backup times for a filesystem are divided by the total number of backups to determine an average. This average is then used to represent the backup duration for a current backup and assign priority to the agents for backing up the filesystem.
FIG. 10 is an exemplary storage system 1000 in accordance with an example embodiment. The storage system includes a tape library 1010 connected to an administrative console 1020 and one or more host computers 1030 via one or more networks (for example, shown as a storage area network 1035 or SAN).
The tape library 1010 includes a management card 1040 coupled to a library controller 1050 and one or more tape drives 1060. In one embodiment, the administrative console 1020 enables a user or administrator to select and/or administer backup of data according to example embodiments discussed herein. The library controller is used to execute one or more methods and/or algorithms according to example embodiments discussed herein.
Embodiments in accordance with the present invention are utilized in a variety of systems, methods, and apparatus. For illustration, example embodiments are discussed in connection with a tape library. Example embodiments, however, are applicable to other types of storage systems, such as storage devices using cartridges, hard disk drives, optical disks, or movable media. Furthermore, method disclosed herein can be executed by a processor, a controller, a server, a storage device, a computer, or other type of computing device.
DEFINITIONS
As used herein and in the claims, the following words are defined as follows:
The term “storage device” means any data storage device capable of storing data including, but not limited to, one or more of a disk array, a disk drive, a tape drive, optical drive, a SCSI device, or a fiber channel device. Further, a “disk array” or “array” is a storage system that includes plural disk drives, a cache, and controller. Arrays include, but are not limited to, networked attached storage (NAS) arrays, modular SAN arrays, monolithic SAN arrays, utility SAN arrays, and storage virtualization.
In one example embodiment, one or more blocks or steps discussed herein are automated. In other words, apparatus, systems, and methods occur automatically. The terms “automated” or “automatically” (and like variations thereof) mean controlled operation of an apparatus, system, and/or process using computers and/or mechanical/electrical devices without the necessity of human intervention, observation, effort and/or decision.
The methods in accordance with example embodiments of the present invention are provided as examples and should not be construed to limit other embodiments within the scope of the invention. Further, methods or steps discussed within different figures can be added to or exchanged with methods of steps in other figures. Further yet, specific numerical data values (such as specific quantities, numbers, categories, etc.) or other specific information should be interpreted as illustrative for discussing example embodiments. Such specific information is not provided to limit the invention.
In the various embodiments in accordance with the present invention, embodiments are implemented as a method, system, and/or apparatus. As one example, example embodiments and steps associated therewith are implemented as one or more computer software programs to implement the methods described herein. The software is implemented as one or more modules (also referred to as code subroutines, or “objects” in object-oriented programming). The location of the software will differ for the various alternative embodiments. The software programming code, for example, is accessed by a processor or processors of the computer or server from long-term storage media of some type, such as a CD-ROM drive or hard drive. The software programming code is embodied or stored on any of a variety of known physical and tangible media for use with a data processing system or in any memory device such as semiconductor, magnetic and optical devices, including a disk, hard drive, CD-ROM, ROM, etc. The code is distributed on such media, or is distributed to users from the memory or storage of one computer system over a network of some type to other computer systems for use by users of such other systems. Alternatively, the programming code is embodied in the memory and accessed by the processor using the bus. The techniques and methods for embodying software programming code in memory, on physical media, and/or distributing software code via networks are well known and will not be further discussed herein.
The above discussion is meant to be illustrative of the principles and various embodiments of the present invention. Numerous variations and modifications will become apparent to those skilled in the art once the above disclosure is fully appreciated. It is intended that the following claims be interpreted to embrace all such variations and modifications.

## Claims

1. A method executed by a computer, comprising:
executing a first simulation to backup objects in a filesystem to a storage device using a first number of agents to backup the objects to multiple drives and having a first latency;
reducing the first number of agents to a second number of agents;
executing a second simulation to backup the objects in the filesystem to the storage device using the second number of agents and having a second latency;
backing up the objects in the filesystem to the storage device with the second number of agents when the second latency is not greater than the first latency;
creating a summary comprising metrics that reflect changes in the filesystem over a period of time, wherein the metrics comprise a number of the objects that were not modified between the backing up and a previous backing up; and
reducing the first number of agents to the second number of agents to reduce a number of agents backing up the objects without reducing a duration of time to backup the objects.

2. The method of claim 1 further comprising, repeating a cycle that reduces a number of agents and then simulates backing up the objects to the storage device until a simulation generates an increase in backup processing time for the objects.

3. The method of claim 1 further comprising:
obtaining historic information about job durations to back up the objects 10 the storage device; and
ordering, based on the job durations, the objects such that objects having a longer historic job duration are assigned to the agents before objects having a shorter historic job duration.

4. The method of claim 1, wherein the storage device is a tape library and the multiples drives are tape drives in the tape library.

5. The method of claim 1 further comprising:
executing the backup with a minimum number of agents.

6. The method of claim 1 further comprising:
determining a minimum time required to backup the objects to the storage device; and
given a target backup time that is greater than the minimum time, determining a minimum number of agents needed to backup the objects to the storage device without exceeding the target time.

7. The method of claim 1 further comprising:
ordering the objects in a list according to how long an object will take to backup to the multiple drives; and
simulating the backup to the multiple drives according to the list.

8. A non-transitory tangible computer readable storage medium having instructions for causing a computer to execute a method, comprising:
obtaining, from historic data, times to previously backup filesystems to a storage device;
ordering, based on the times, the filesystems according to a schedule that backs up a filesystem having a longer previous backup time before a filesystem having a shorter previous backup;
simulating a backup of the filesystems according to the schedule to determine a backup job schedule that backups the filesystems with a minimal number of agents; and
Performing a simulation cycle of (1) reducing a number of agents to backup the filesystems to the storage device and (2) simulating a backup to the storage device with a reduced number of agents; and
repeating the simulation cycle until a decrease in backup performance occurs.

9. The non-transitory tangible computer readable storage medium of claim 8 further comprising:
assigning the filesystems to agents that backup the filesystems to drives in the storage device; and
backing up the filesystems with the agents to the drives according to the backup job schedule.

10. The non-transitory tangible computer readable storage medium of claim 8 further comprising:
determining a minimum time required to backup the filesystems to the storage device; and
determining a minimum number of agents needed to backup the filesystems to the storage device without exceeding the minimum time.

11. The non-transitory tangible computer readable storage medium of claim 8, wherein the storage device is a tape library comprising tape drives.

12. A tape library, comprising:
a plurality of tape drives;
a controller that is configured for controlling the tape drives to backup filesystems with a schedule that minimizes a number of agents to backup the filesystems, wherein the schedule is generated from a simulation that prioritizes an order for backing up the filesystems based on historical data of previous backups and then simulates backing up of the filesystems according to the order;
a summary creator that is configured for creating, after the backing up of the filesystems, a summary comprising metrics that reflect changes in the filesystems over a period of time, wherein the metrics comprise a number of objects that were not modified during the backing up and a previous backing up; and
an automatic migrator that is configured for automatically migrating files in a multi-tier storage system based at least on the summary.

13. The tape library of claim 12, wherein the historical data includes times to previously backup the filesystems with the tape drives.

14. The tape library of claim 12, wherein the simulation is repeatedly executed on the tape library to determine a minimum number of agents needed to backup the filesystems without increasing a duration of time during the backup.

15. The tape library of claim 12, wherein the schedule reduces an overall time to backup the filesystems by backing up a filesystem with a longer previous backup time before a filesystem having a shorter previous backup time.

16. The tape library of claim 12, wherein according to the schedule, filesystems having a longer historical backup time are provided a higher priority to backup than filesystems having a shorter historical backup time.

17. The tape library of claim 12, wherein the schedule eliminates data interleaving and reduces a number of agents needed to backup the filesystems.

18. The tape library of claim 12, wherein the schedule orders the filesystems according to a list that backs up a filesystem having a longer previous backup time before a filesystem having a shorter previous backup time, and assigns the filesystems to agents that backup the filesystems to the tape drives according to the list.