Changeset 40022
- Timestamp:
- Apr 30, 2017, 6:23:26 AM (9 years ago)
- Location:
- trunk/doc/release.2015
- Files:
-
- 2 edited
-
Makefile.Common (modified) (1 diff)
-
ps1.datasystem/datasystem.tex (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/release.2015/Makefile.Common
r39974 r40022 14 14 15 15 %.pdf: %.tex 16 $(MY_LATEX) $*.tex 17 18 # $(MY_LATEX) $*.tex; if [ $? -eq 1 ]; then rm $*.pdf; exit 1; fi 19 20 junk: 21 if [ $(DO_BIBTEX) -eq 1 ]; then $(BIBTEX) $*; fi 22 $(MY_LATEX) $*.tex; if [ $? -eq 1 ]; then rm $*.pdf; exit 1; fi 23 if [ $(DO_BIBTEX) -eq 1 ]; then $(MY_LATEX) $*.tex; fi 16 # need to remove the output pdf file if the latex fails or we cannot re-run 17 $(MY_LATEX) $*.tex || (rm $*.pdf; exit 1) 18 if [ $(DO_BIBTEX) -eq 1 ]; then $(BIBTEX) $* || (echo fail; exit 1); fi 19 # need to re-run latex to get the reference right 20 $(MY_LATEX) $*.tex || (rm $*.pdf; exit 1) 21 # if we are running bibtex, we need to re-run latex AGAIN to get the reference right 22 if [ $(DO_BIBTEX) -eq 1 ]; then $(MY_LATEX) $*.tex || (rm $*.pdf; exit 1); fi 24 23 # thumbpdf --modes=dvips $*.pdf 25 24 # $(MY_LATEX) $*.tex -
trunk/doc/release.2015/ps1.datasystem/datasystem.tex
r40021 r40022 1082 1082 context. 1083 1083 1084 One of the main purposes of the DVO system is to define the1085 relationship between individual detections of an astronomical object 1086 and the definition of that object. New detections are generally added 1087 to the database in a group associated with, for example, an image from 1088 the GPC1 camera. As new detections are loaded, they are compared to 1089 the objects already stored in the database. If an object is already 1090 found in the databasewithin the match radius of \note{one arcsecond}, the new detection is1091 ass ociated to that object. If more than one object exists within the1084 One of the main purposes of DVO is to define the relationship between 1085 individual detections of an astronomical object and the definition of 1086 that object. New detections are generally added to the database in a 1087 group associated with, for example, an image from the GPC1 camera. As 1088 new detections are loaded, they are compared to the objects already 1089 stored in the database. If an object is already found in the database 1090 within the match radius of \note{one arcsecond}, the new detection is 1091 assigned to that object. If more than one object exists within the 1092 1092 database, the detection is associated with the closest object. 1093 1093 … … 1439 1439 \section{Operations and Automation} 1440 1440 1441 1441 1442 \subsection{Pantasks and Parallel Processing} 1442 1443 \label{sec:pantasks} 1444 1445 \subsubsection{Pantasks} 1443 1446 1444 1447 Sections~\ref{sec:subsystesm} \& \ref{sec:postprocessing} describe the … … 1565 1568 prevent them from running for some reason. 1566 1569 1567 \ note{discusspcontrol}1570 \subsubsection{pantasks passes jobs to pcontrol} 1568 1571 1569 1572 Jobs which are generated by \ippprog{pantasks} may be run locally on … … 1598 1601 them to the list of jobs to execute. It also accepts from pantasks 1599 1602 the names of computers on which it is allowed to run those jobs. 1603 1604 \subsubsection{pcontrol passes jobs to pclient} 1600 1605 1601 1606 When pcontrol is provided with the name of a computer, it will attempt … … 1638 1643 behavior depending on the exit code from the job. 1639 1644 1640 \note{discuss pclient} 1641 1642 \begin{verbatim} 1643 * pantasks_client vs pantasks_server 1644 * opihi scripting language 1645 * task options (show example?) 1646 1647 \end{verbatim} 1645 The \ippprog{pantasks} program can be run as a stand-alone program 1646 which presents an opihi shell interface to the user when it is 1647 started. This mode is useful for testing as all errors are reported 1648 back to the opihi shell. However, when the user exits the shell, the 1649 pantasks instance exits, shutting down pcontrol and all remote client 1650 connections. In standard operations, pantasks is run in a client 1651 server mode. The server runs continuously in the background and 1652 multiple users may connect via the \ippprog{pantasks_client} program. 1653 Users can the send commands to the server to load scripts, add 1654 parallel hosts, check status, and start or stop the pantasks 1655 operations. 1648 1656 1649 1657 \begin{figure} … … 1655 1663 periods -exec 5.0 1656 1664 npending 1 1657 stdout NULL1658 stderr /data/local/example.task 1665 stdout /data/local/example.task.output 1666 stderr /data/local/example.task.errors 1659 1667 end 1660 1668 \end{verbatim} 1661 1669 \caption{\label{fig:simple.static.task} Example of a simple static 1662 task in the opihi-based scripting language used by pantasks. } 1670 task in the opihi-based scripting language used by pantasks. In 1671 this example, pantasks would run a single instance of the command 1672 \code{ls /tmp} every 5 seconds, sending the stdout and stderr to 1673 the listed files. } 1663 1674 \end{center} 1664 1675 \end{figure} 1665 1676 1666 \note{this section needs to be re-written : pclient vs pcontrol vs pantasks} 1667 1668 The actual processing of data is managed by the \ippprog{pantasks} 1669 program. This program launches a series of connections to other 1670 computers in the IPP compute cluster, and launches instances of the 1671 \ippprog{pclient} program that wait for jobs to be submitted. These 1672 jobs are generated from \ippmisc{ippTasks} command scripts that each 1673 contain one set of tasks, written in the opihi language shared with 1674 DVO. These task scripts are generally sorted by the IPP stage. The 1675 tasks listed in these scripts are mainly written in the form of a pair 1676 of \ippmisc{load} and \ippmisc{run} tasks. 1677 1678 The \ippmisc{load} task for a particular stage queries the processing 1679 database via an appropriate \ippmisc{ippTool} (see section \ref{sec:ipptools} below) for a list of jobs that are waiting to be run. 1680 This task is executed on the host running the \ippprog{pantasks} 1681 server, and only one of each type of \ippmisc{load} task is permitted to 1682 run simultaneously, preventing race conditions. To manage the 1683 processing, the primary database tables for each stage contain a 1684 \ippdbcolumn{label} field. This field groups data into categories, 1685 and the appropriate list of \ippdbcolumn{label}s are supplied to the 1686 \ippprog{pantasks} program to be included in the queries to ensure 1687 that only jobs for the active \ippdbcolumn{label}s are executed. The 1688 results from the database query are stored in \ippmisc{books} within the 1689 \ippprog{pantasks} environment, with each resulting result row saved 1690 to a separate entry within the \ippmisc{book}. These \ippmisc{books} are 1691 similar to an associative array indexing the entries (\ippmisc{pages} to 1692 continue the analogy) to be accessed via a particular key. Keys for 1693 most stages are a combination of the stage id and an identifier for 1694 the individual component for the job that will be executed. The rest 1695 of the column results from the query are stored to the \ippmisc{page}, 1696 with each field stored with the database column name. An additional 1697 field is added, the \ippdbcolumn{pantasksState}, which is set to 1698 \ippmisc{INIT}, indicating that this \ippmisc{page} is a new addition to the 1699 \ippmisc{book}. Once all results from the database query have been 1700 saved, the \ippmisc{load} task terminates, and waits to be rerun after 1701 some timeout (on the order of a minute). Once all new \ippmisc{pages} 1702 have been added, the task then scans the \ippmisc{book} for any pages 1703 with \ippdbcolumn{pantasksState} set to \ippmisc{DONE}, and removes them 1704 from the book, as these represent jobs that have finished. 1705 1706 Parallel to the \ippmisc{load} task, the \ippmisc{run} tasks are executed 1707 by the \ippprog{pclient} code on one of the client nodes. These 1708 clients can access the \ippmisc{books} from \ippprog{pantasks}, and scan 1709 the \ippmisc{book} to determine if it contains \ippmisc{pages}, and if one 1710 of those pages contains an entry with the \ippdbcolumn{pantasksState} 1711 set to \ippmisc{INIT}. If such a \ippmisc{page} is found, the task sets 1712 this field to \ippmisc{RUN} (ensuring no other \ippmisc{run} task will 1713 attempt to process that page as well), and uses the information stored 1714 on the page to construct a valid command line for the appropriate IPP 1715 script. The script (described below) command line is then executed, 1716 and upon completion, pass the exit code back to \ippprog{pantasks}, 1717 allowing for an accounting of success and failures. The page is then 1718 set to \ippmisc{DONE}, indicating the job has completed, and the 1719 \ippmisc{page} can be removed from the \ippmisc{book} by the next call of 1720 the \ippmisc{load} task. As the \ippmisc{run} tasks will involve processing 1721 that may not complete in a known period of time, there is a timeout 1722 limit set for the task, after which the \ippprog{pantasks} process can 1723 terminate the task. This prevents unproductive jobs from building up. 1724 1725 In addition to these tasks, most stages have \ippmisc{revert} tasks 1726 paired with the \ippmisc{run} task. These tasks issue an appropriate 1727 \ippmisc{ippTool} command to remove entries from the stage's secondary 1728 database table that have the \ippdbcolumn{fault} field set to a value 1729 other than zero. This step allows these failures to be cleared from 1730 the system, and schedule those jobs again for a retry. Again, this 1731 query is limited by the set of active \ippdbcolumn{label}s, ensuring 1732 that only the data currently being processed is reverted. Similarly, 1733 some stages have \ippmisc{advance} tasks that update the primary table to 1734 indicate that all of its components are complete. For many of the 1735 early stages of the pipeline (the \ippstage{chip} through 1736 \ippstage{warp} stages), this \ippmisc{advance} task also adds an entry 1737 into the database table for the next stage of processing for the 1738 exposure being considered. This step allows the data to process 1677 \subsubsection{Pantasks scripts: ippTasks} 1678 1679 Pantasks provides an environment in which commands can be generated 1680 and extensive parallel processing managed. The details of how to 1681 implement the different stages of IPP processing are captured in a 1682 collection of scripts written for pantasks in the \code{opihi} 1683 language. In general, each stage is defined by an associated script 1684 collected together under the \ippmisc{ippTasks} collection. While 1685 each script has its own details, there are a number of common 1686 elements. 1687 1688 Most stages consist of two related tasks: a \ippmisc{load} task, which 1689 is responsible to querying the processing database to identify entries 1690 to be processed, and a \ippmisc{run} task, which is responsible for 1691 managing the processing of the individual entries. 1692 1693 The \ippmisc{load} task for a particular stage generates 1694 \ippmisc{load} jobs which query the processing database via a 1695 dedicated database interface program (see the discussion of 1696 \ippmisc{ippTool} in section \ref{sec:ipptools} below) for a list of 1697 processing stage entries that are waiting to be run. The 1698 \ippmisc{load} jobs are executed on the host running the 1699 \ippprog{pantasks} server. Only one of each type of \ippmisc{load} 1700 job is permitted to run simultaneously, preventing race conditions. 1701 1702 The results from the database query job are stored in an opihi data 1703 structure called a \ippmisc{book} within the \ippprog{pantasks} 1704 environment. Each row in the result set is saved to a separate entry 1705 within the \ippmisc{book}. These \ippmisc{books} are a hierarchical 1706 associative array indexing the entries (\ippmisc{pages} to continue 1707 the analogy) to be accessed via a particular key. Keys for most 1708 stages are a combination of the stage id and an identifier for the 1709 individual component for the job that will be executed. For a given 1710 row in the result set, each column in the row is stored as a separate 1711 line on the \ippmisc{page}, identified by the database column name. An 1712 additional line, the \ippdbcolumn{pantasksState}, is added so pantasks 1713 can manage the processing of the job which will be generated by this 1714 page. When the page is first generate, the 1715 \ippdbcolumn{pantasksState} is set to \ippmisc{INIT}, indicating that 1716 this \ippmisc{page} is a new addition to the \ippmisc{book}. Once all 1717 new \ippmisc{pages} have been added, the task then scans the 1718 \ippmisc{book} for any pages with \ippdbcolumn{pantasksState} set to 1719 \ippmisc{DONE}, and removes them from the book, as these represent 1720 jobs that have finished. \note{the manipulation above takes place in 1721 the task.exit subscript} 1722 1723 The associated \ippmisc{run} task generates jobs constructed from the 1724 collection of pages in the book. The task examines the book and 1725 selects the first available page with \ippdbcolumn{pantasksState} 1726 of \ippmisc{INIT}. The task uses the information in the page to 1727 construct the appropriate command-line (e.g., lines in the page may 1728 include input file names and output file names for the specific item 1729 in the database). The resulting command becomes a job in the pantasks 1730 collection of jobs. Most IPP analysis stages specify that the jobs 1731 are then sent to pcontrol for parallel process. Before task generates 1732 the job, the \ippdbcolumn{pantasksState} is set to \ippmisc{RUN} so a 1733 future execution of the task will not attempt to re-run this specific job. 1734 1735 Upon completion of the job, it is necessary to update the processing 1736 database with the results, specifically indicating in the database 1737 that the job has completed and if was successful. Within the IPP, 1738 this responsibility is left to the program which ran the analysis. 1739 IPP analysis steps normally consist of two main elements: a C-language 1740 program to do the data analysis work and a supporting perl script 1741 which performs the database update upon completion. Upon completion, 1742 the pantasks \ippmisc{RUN} tasks is responsible for updating the 1743 status within the book, but not within the processing database. This 1744 split keeps the interactions at the pantasks level relatively light, 1745 leaving the overhead of the database interaction within the job 1746 running on one of the computing machines in the cluster. 1747 1748 In addition to these tasks, most stages have a \ippmisc{revert} task 1749 paired with the \ippmisc{run} task. These tasks run infrequently and 1750 generate jobs which perform an operation on the processing database to 1751 clear jobs which have failed with one of the ephemeral failure modes 1752 (see the discussion in Section~\ref{sec:processing.database}). This 1753 step allows these failures to be cleared from the system, and schedule 1754 those jobs again for a retry. 1755 1756 Similarly, some stages have \ippmisc{advance} tasks that update the 1757 primary table to indicate that all of its components are complete. 1758 For many of the early stages of the pipeline (the \ippstage{chip} 1759 through \ippstage{warp} stages), this \ippmisc{advance} task also adds 1760 an entry into the database table for the next stage of processing for 1761 the exposure being considered. This step allows the data to process 1739 1762 automatically from stage to stage without intervention. 1740 1763 1741 \subsubsection{Stage automation} 1764 The IPP processing database is used to manage all versions of an 1765 analysis for all analysis stages. In addition to the regular 1766 processing of the nightly data products, there may be large-scale 1767 re-processing analysis tasks or tests of various kinds. It may be 1768 necessary for a test analysis of a particular item to use a different 1769 version of the processing software from the regular nightly analysis 1770 (for example, when testing a new algorithm for release). A mechanism 1771 is needed to manage these different processing attempts of the same 1772 items. With the IPP, this is accomplished with an extra field, 1773 \ippmisc{label}, for each processing stage. Within the 1774 \ippmisc{load}, \ippmisc{revert}, and \ippmisc{advance} tasks 1775 discussed above, the query to the processing database for new items is 1776 restricted to a set of user-defined labels. A given instance of 1777 pantasks will be supplied a set of labels which are then applied to 1778 all tasks managed by that pantasks. For example, the pantasks which 1779 manages the nightly processing of the basic science analysis stages 1780 (chip - warp, stack, diff) is supplied with several labels which 1781 correspond to the different kinds of observations being performed. In 1782 this way, the analysis of the nightly observations is kept separate 1783 from other processing attempts. 1784 1785 1786 1787 \subsection{Stage automation} 1742 1788 \label{sec:automation} 1743 \note{I'm not convinced this is the right place for it, but it felt like a natural extension of the ``advance''}. 1744 1745 \note{wording..} Beyond the warp stage, there is no longer a single 1746 ``next'' stage into which data can be queued. Because of this, more 1747 sophisticated methods are used to advance the data. For processing 1748 data that is actively being observed at the summit, this is handled by 1749 a set of ``nightly science'' tasks and an associated 1750 \ippmisc{ippScript}. The goal of these tasks is to ensure that 1751 exposures are correctly paired into sets of 1752 \ippstage{warp}-\ippstage{warp} difference images, and that nightly 1753 stacks are generated for MD fields. 1754 1755 Queuing the diffs is done by first examining the set of all exposures 1756 that have been taken at the summit on the current night of observing, 1757 and querying information from each stage up through \ippstage{warp} 1758 stage. These exposures are grouped by \ippdbcolumn{filter} and 1759 \ippdbcolumn{object}, which is a unique identifier for each telescope 1760 pointing on the sky. Exposures in each group are then sorted by 1761 increasing observation date (\ippdbcolumn{dateobs}), and the 1762 information from each stage is used to ensure that the observations 1763 have completed all stages through \ippstage{warp} successfully. If 1764 this is not the case, the script ignores that group until a future 1765 scan, to allow the data to finish processing. If the lack of 1766 completion is due to a failure at a stage prior to \ippstage{warp}, 1767 then that exposure is dropped from the group to allow the remainder to 1768 be considered for \ippstage{diff}s. The remaining exposures are then 1769 paired sequentially, with the final exposure ignored in the case of an 1770 odd number of exposures (caused by either a failure in the processing 1771 of an exposure or due to the telescope closing for weather prior to 1772 completing all scheduled observations). Once the observing process 1773 completes (signalled to the nightly science task and script by the 1774 presence in the database of entries for dark exposures that are taken 1775 each morning after the telescope closes), and the script has generated 1776 all \ippstage{diff} pairs that can be made with the above rule, a 1777 second pass is performed, this time with the exposures in each group 1778 sorted by decreasing observation date. This change in ordering allows 1779 exposures that were excluded due to an odd number of exposures to be 1780 paired with the exposure closest in time (with the exposure that was 1781 previously first ignored). 1789 1790 \note{start with a discussion of the standard sequencing (end-stage)} 1791 1792 \note{then discuss the addstar sequences with manual triggering} 1793 1794 Outside of the basic sequence of chip to warp, there is no single 1795 natural next step. For example: a stack can be generated with any 1796 number of input warps; a difference image can be generated between a 1797 warp and any one of many other warps or stacks. Without a single 1798 sequence, more complex and sophisticated decisions much be made. 1799 1800 For nightly processing of data obtained at the summit, this is handled 1801 by a set of ``nightly science'' tasks and an associated 1802 \ippmisc{ippScript}. These scripts have a well-defined and restricted 1803 set of goals: to ensure that difference images are generated for each 1804 exposures (either by pairing together warps or pairs warps with 1805 pre-defined stacks), that nightly stacks are generated for MD fields, 1806 and that the stacks are also differenced against an appropriate 1807 reference. 1808 1809 Pairing warps together is simplified by the observing strategy in 1810 which the same pointing is observed multiple times in a night. By 1811 limiting to warp-warp pairs from the same pointing, the problem is 1812 significantly reduced from the arbitrary case. 1813 1814 {\em Queuing the diffs} is done by first examining the set of all 1815 exposures that have been taken at the summit on the current night of 1816 observing, and querying information from each stage up through 1817 \ippstage{warp} stage. These exposures are grouped by 1818 \ippdbcolumn{filter} and \ippdbcolumn{object}, which is a unique 1819 identifier for each telescope pointing on the sky. Exposures in each 1820 group are then sorted by increasing observation date 1821 (\ippdbcolumn{dateobs}). The database results for each stage 1822 (chip-warp) are checked to ensure that the selected exposures have 1823 been successfully processed for all stages through \ippstage{warp}. 1824 Exposure groups are ignored until all exposures have either been 1825 processed through warp or have failed with a bad quality, meaning the 1826 exposure (or portion) cannot be processed. Failed exposures are 1827 rejected. The remaining exposures are then paired sequentially, with 1828 the final exposure ignored in the case of an odd number of accepted 1829 exposures. Exposures paired in this way are sent to the 1830 ippstage{diff} analysis stage. 1831 1832 Once observations have been completed for the night (signalled by the 1833 end-of-night dark exposures that are taken each morning after the 1834 telescope closes), and the script has generated all \ippstage{diff} 1835 pairs that can be made with the above rules, a second pass is 1836 performed, this time with the exposures in each group sorted by 1837 decreasing observation date. This change in ordering allows exposures 1838 that were excluded due to an odd number of exposures to be paired with 1839 the exposure closest in time (with the exposure that was previously 1840 first ignored). Exposure pairs in which at least one exposures does 1841 not have a pre-existing difference image are queued for difference 1842 image analysis. 1782 1843 1783 1844 The nightly stacks are queued based on checking that a minimum number … … 1788 1849 \ippstage{stack} database entries can be queued with the 1789 1850 \ippstage{warp} entries. Again, failures and weather can reduce the 1790 number of usable exposures, so the task generates \ippstage{stack} 1791 entries using whatever exposures are available if one has not yet been 1792 constructed by the time the morning dark exposures are registered into 1793 the database. \note{wording} 1794 1795 Automating the nightly processing is important, as it ensures that 1796 data is processed as soon as it is downloaded from the summit, 1797 reducing the lag between an observation and the reduced data. The 1798 other processing task that requires automation is the reprocessing of 1799 the entire $3\pi$ survey, as the size of the dataset make it 1851 number of usable exposures. If no stack could be made for a given MD 1852 field with the minimum number of inputs by the time of the 1853 end-of-night darks, stacks are generated using using whatever 1854 exposures are available. 1855 1856 The automatic nightly processing ensures that data is processed as 1857 soon as it is downloaded from the summit, reducing the lag between an 1858 observation and the reduced data. \note{some numbers here about 1859 completion times and such? Words about getting data to MOPS and SN 1860 transient folks} 1861 1862 \note{re-read paragraph below and cleanup} 1863 1864 The other processing task that requires automation is the reprocessing 1865 of the entire $3\pi$ survey, as the size of the dataset make it 1800 1866 challenging to do manually. To manage this, the ``large area 1801 1867 processing'' (LAP) task and script are used. The first stage of this … … 1823 1889 \ippdbcolumn{projection\_cell}. 1824 1890 1891 1825 1892 \subsection{Nebulous} 1826 1893 \label{sec:nebulous} 1894 1895 \subsubsection{Motivation and Concept} 1827 1896 1828 1897 A major concern recognized early in the Pan-STARRS project is the 1829 1898 challenge of storing and managing the large volume of data that is 1830 1899 generated by the GPC1 camera. The \ippprog{Nebulous} system was 1831 designed to organize this data. The main components of this system 1832 are a database storing the locations of the files, with a Simple 1833 Object Access Protocol (SOAP) interface between the database and the 1834 other IPP programs \note{define / mention http}. The actual files are 1835 stored on a collection of computers with substantial disk partitions 1836 in the IPP cluster, shared within the cluster via NFS. This 1837 distribution of files is useful to balance the disk I/O, as this 1838 parallelizes the load. 1839 1840 The original design of \ippprog{Nebulous} was intended to aid in the 1841 targetted processing of data, by having specific image data (such as 1842 all the images from one OTA device) located on a single storage node. 1843 This would allow any jobs involving that data to be assigned to the 1844 storage node, eliminating network I/O. Important data could be 1845 duplicated to additional data nodes, with the alternate locations 1846 stored in the database. In practice, however, hardware failures and 1847 increases in hard drive storage volumes and network bandwidth have 1848 reduced the degree to which the IPP processing is targeted. 1849 1850 \note{this is a critical paragraph and needs to be re-written to be 1851 more accessible} 1852 When a program creates a new file in \ippprog{Nebulous}, it supplies 1853 an URI of the form \code{neb://HOST.VOLUME/PATH/FILENAME}. The host 1854 and volume specifiers are optional, and allow a file to be created on 1855 a specific node. The path and filename appear similar to a standard 1856 full file location, and are used internally as the ``external id''. 1857 \note{mention the nebulous schema before this?} A storage object 1858 entry is then created in the database for this id, and an instance of 1859 the file created on the specified node (or at random from available 1860 nodes if left empty). This instance is created in a deterministic 1861 filename location. The external id is hashed using the SHA-1 1862 function, and the first four hexadecimal digits of this hash are 1863 separated into two two-digit strings and used as the top and second 1864 level directory location for the disk file. The disk file is created 1865 using the database instance id, and a transformed version of the 1866 external id, which has colons replacing any forward slash characters, 1867 to convert the external id path into a filename. For the example URI 1900 designed to aid in thie process. \ippprog{Nebulous} is not a file 1901 system per-se, but only method of tracking the locations of files 1902 within the file system, and of tracking duplicate copies of the same 1903 file. The core of \ippprog{Nebulous} is a dedicated database engine 1904 which tracks ``storage objects'', the concept of a file exists in the 1905 system. Each storage object may be associated with a number of copies 1906 of the actual files on the disks in the storage system (called 1907 ``instances''), which are also recorded by the database. In the IPP 1908 cluster, the file instances are stored on a collection of computers 1909 with substantial disk partitions shared via NFS. 1910 1911 \ippprog{Nebulous} also explicitly tracks the different computers on 1912 which the file instances are stored. This allows the system to expose 1913 files to the user only on machines which are currently active in 1914 \ippprog{Nebulous}. If, for example, a storage computer crashes or 1915 needs to be taken offline, the machine can be made unavailable in 1916 \ippprog{Nebulous}, in which case only instances on other machines 1917 will be supplied to users. 1918 1919 This localization is also useful for allowing the IPP processing to 1920 target processing to computers based on the location of the data. For 1921 example, all raw images from a specific chip in the camera could be 1922 stored on a specific computer (for at least one of the instances). 1923 All of the analysis stages which interact with that chip could then be 1924 preferentially targetted to be run on that computer. The localization 1925 in \ippprog{Nebulous} and the host targetted processing in pantasks 1926 can therefore work together to encourage processing to require only 1927 local disk access, reducing the I/O local on the network 1928 infrastructure. In the early stages of the Pan-STARRS project, this 1929 was important because network bandwidth was an expensive resource. In 1930 practice, the as-built IPP has had sufficient network bandwidth that 1931 this targetting was not required. In practice, due to the timing of 1932 hardware aquisition, occasional hardware failures, and other 1933 organizational details, targetted processing has only been used to a 1934 moderate degree within the Pan-STARRS cluster. \note{can we get a 1935 number here?} 1936 1937 \subsubsection{Implementation Details} 1938 1939 The user interfaces to Nebulous consist of command-line programs as 1940 well as APIs in both C and Perl. The basic user commands to interact 1941 with Nebulous are to 1) create a new storage object and associated 1942 instance; 2) add a new instance to an existing storage object; 3) 1943 remove (cull) an instance; 4) delete a storage object; and 5) find a 1944 file associated with a given storage objects. Note that these user 1945 commands do not affect the files on disk \note{true for cull?} 1946 (exception: the create function will create an empty file if one does 1947 not exist). They only change the state of the Nebulous database; it 1948 is the responsibility of the user program to read and write data to a 1949 file and to create the copies, etc. 1950 1951 For the Nebulous users, the identifier of a storage object is a unique 1952 string with the form of a UNIX file path: e.g. a/b/c/file. When a 1953 program creates a new file in \ippprog{Nebulous}, it supplies a URI of 1954 the form \code{neb://HOST.VOLUME/PATH/FILE}. The host and volume 1955 specifiers are optional, and allow a file to be created on a specific 1956 node. The path and filename portions become the identifier and are 1957 recorded in the \ippmisc{storage_object} table in the 1958 \ippmisc{extern_id} field. A storage object entry is then created in 1959 the database for this id, and an instance of the file created on the 1960 specified node (or at random from available nodes if left empty). 1961 1962 Files are stored on specific computers in a \ippprog{Nebulous} 1963 directory or directories on that computer. In the IPP system, the 1964 top-level Nebulous directories are usually placed at the root of the 1965 storage device as mounted on the machine, in a subdirectory named 1966 \code{nebulous}. Beneath the top-level directory are 256 1967 subdirectories with names of the form 00 - ff (i.e., 2 digit 1968 hexadecimate number). Each subdirectory again as 256 subdirectories 1969 with the same naming scheme. 1970 1971 The filename of an instance in Nebulous is deterministic and derived 1972 from the \ippmisc{extern_id}: the \ippmisc{extern_id} is hashed using 1973 the SHA-1 function, and the first four hexadecimal digits of this hash 1974 are separated into two two-digit strings and used as the top and 1975 second level directory location for the disk file. The instance table 1976 in the Nebulous database includes a unique auto-incrementing index to 1977 provide a unique SQL ID for each instance. Under the subdirectory 1978 identified above, the disk file name is by appending the database 1979 instance id with a string derived from the \code{extern_id}: forward 1980 slash characters are replaced in the name with colons so the string 1981 can represent a file in the UNIX filesystem. For the example URI 1868 1982 above, this results in a file located on disk in a location like 1869 \code{/data/HOST.VOLUME/nebulous/d5/d8/9244993440.PATH:FILENAME}. 1870 This file naming structure is useful, as it duplicates database 1871 contents on disk. \note{rephrase} 1872 1873 The storage volumes that contain the data on disk are defined in the 1874 \ippprog{Nebulous} database in a number of ways. First, the locations 1875 and mount points for the actual NFS storage are listed in the 1983 \code{/data/HOST.VOLUME/nebulous/d5/d8/9876.PATH:FILE}. 1984 This file naming structure has the benefit of providing redundancy 1985 between the filename on disk and the instance in the database. 1986 1987 Nebulous tracks additional information beyond just the storage objects 1988 and the associated instances. As mentioned above, the storage volumes 1989 are tracked to provide a link between a top level nebulous directory 1990 and the computer which contains that directory. The locations and 1991 mount points for the actual NFS storage are listed in the 1876 1992 \ippdbtable{volume} table. This table contains columns indicating if 1877 1993 the volume should be used for reading (\ippdbcolumn{available}) and 1878 writing (\ippdbcolumn{allocate}), allowing these properties to be 1879 manually set, which is useful in scheduling downtime for hardware 1880 issues. Another column, \ippdbcolumn{xattr}, is used to control the 1881 behavior of this volume, with specific values used to denote desired 1882 behavior. For instance, the value of $1$ is used to indicate that a 1883 volume should only be used as a backup volume (which accepts only 1884 replicated copies), and the value of $5$ is used to indicate that the 1885 volume is permanently unavailable, and should be ignored. \note{more 1886 detail, more specific} 1887 1888 In addition to this permanent table describing the volumes, a 1889 \ippdbtable{mountedvol} table also exists that only lists those 1994 writing (\ippdbcolumn{allocate}). As noted above, Nebulous will not 1995 return a file to the user if the storage volume is marked as not 1996 \ippdbcolumn{available}. If a storage volume is marked as not to be 1997 \ippdbcolumn{allocate}ed, then new storage objects will not generate 1998 instances on that volume, but existing instances may be supplied to 1999 the user. 2000 2001 \note{we care about the concepts here, but not the numbers. reword} 2002 Another column, \ippdbcolumn{xattr}, is used to control the behavior 2003 of this volume, with specific values used to denote desired behavior. 2004 For instance, the volume may be marked to be used only for backup, in 2005 which case it will not be used to store an instance by default, but 2006 will be used preferentially if an instance noted as a backup when it 2007 is generated. Alternatively, a volume may be marked as permanently 2008 unavailable, and should be ignored in most contexts. This latter 2009 option allows the system to retain the memory of hardware which has 2010 been retired (and potentially to retain information about instances 2011 which were previously on such machines). 2012 2013 In addition to the static table describing the volumes, a second 2014 dynamically-generated table, \ippdbtable{mountedvol}, lists those 1890 2015 volumes that are currently visible and accessible from the 1891 2016 \ippprog{Nebulous} database server. This table also lists the total … … 1897 2022 \ippdbtable{volume} table. 1898 2023 1899 The final table controlling the operations of the \ippprog{Nebulous} 1900 volumes is the \ippdbtable{cabinet} table, which organizes the 1901 individual volumes into ``cabinets,'' a concept loosely based on the 1902 physical arrangement of the storage servers in the data center. These 1903 cabinets are used to prevent the replication of a storage object 1904 within a group of volumes where all instances of the object could be 1905 taken off line by a single failure. Since servers within a given 1906 cabinet in the data center share a common set of PDUs \note{define}, 1907 it is important to ensure physical distance between replicated copies 1908 to guarantee that a temporary failure of one of the cabinet PDUs does 1909 not significantly impact processing. 2024 The \ippdbtable{cabinet} table organizes the individual volumes into 2025 ``cabinets,'' a concept loosely based on the physical arrangement of 2026 the storage servers in the data center. These cabinets are used to 2027 prevent the replication of a storage object within a group of volumes 2028 where all instances of the object could be taken off line by a single 2029 failure. Since servers within a given cabinet in the data center 2030 share a common set of power delivery units (PDUs), it is important to 2031 ensure physical distance between replicated copies to guarantee that a 2032 temporary failure of one of the cabinet PDUs does not significantly 2033 impact processing. 2034 2035 The nebulous user APIs do not interact directly with the nebulous 2036 mysql database. Instead, they interact with one of several computers 2037 with an Apache web server. Interactions with the Apache server are 2038 performed using the Simple Object Access Protocol (SOAP) interface, 2039 while the Apache servers interact directly with the Mysql database 2040 server. This architecture avoids the overhead of setting up and 2041 tearing down the Mysql connection for each Nebulous command, instead 2042 using only the low-latency SOAP communications. 1910 2043 1911 2044 \note{need a paragraph or two on stats: how many objects, how many
Note:
See TracChangeset
for help on using the changeset viewer.
