IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changes between Version 1 and Version 2 of ippToPspsOrr


Ignore:
Timestamp:
Feb 15, 2012, 5:10:24 PM (14 years ago)
Author:
rhenders
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ippToPspsOrr

    v1 v2  
    33
    44[wiki:ippToPsps Back to main ippToPsps page]
     5
     6== Summary of loading to date ==
     7
     8This sections provides a brief outline of loading to PSPS over the last two years. A more detailed summary can be found on the PSPS news page [http://web01.psps.ifa.hawaii.edu/psps-trac/wiki/PSPSNews here].
     9
     10=== 2010 ===
     11
     12The first version of the ippToPsps code was complete by April 2010 after which we (slowly) loaded a total of 42,000 3PI batches for our beta testers. No stacks were available in DVO to be loaded to PSPS in 2010.
     13
     14Loading was stopped and started throughout the year as we were testing the system, but it was clear that loading was too slow to keep up with the data flow promised from the IPP.
     15
     16=== 2011 ===
     17
     18Stacks available for the first just prior to the Boston meeting in May.
     19
     20Many changes made to ippToPsps to improve speed in order to load nightly data as well as reprocessed:
     21- multi-client: multiple instances of ippToPsps can be run on the same machine, or multiple machines
     22- some processing (for likelihoods) now done by a MySQL stored procedure making a big speed increase
     23- areas of sky with high coverage (eg MD fields) are incredibly slow to access from DVO, so for these area we can pre-ingest DVO data into MySQL to speed up loading.
     24
     25With these improvements we stress-tested loading during November and December 2011. We loaded the new LAP data as it became available from the IPP and loaded half the sky (6-18 hrs RA) of old 3PI data. This included the galactic center with somes frames containing up to 4 million detections.
     26
     27Between Oct 27th and Dec 1st, i.e. 5 weeks, we loaded all old data from the IPP from RA 6 to 18 hours, i.e. half the sky. This was 55,000.
     28
     29This was done simultaneously with the loading of LAP.
     30
     31In december we also loaded new versions of the three-year SAS and MD04 surveys. Loading of MD04 would have been impossible without the ability to pre-load a MySQL database with all DVO data.
     32
     33For normal 3PI data in a quiet part of the sky we can easily load ~100 per hour, ~2400 exposures per day using multiple loading clients over up to 6 hosts. This system is flexible and new clients can be started and stopped with ease depending on requirements.
     34
     35In short, ippToPsps can easily keep up with IPP production and, by using multiple clients, can quickly bulk-load whole surveys if required.
     36
     37== Anatomy of a batch ==
     38
     39This is an example of a run-of-the-mill batch for a PS1 exposure with 83,542 detections.
     40
     41
     42ippToPsps needs to keep pace with IPP production of new and re-processed data. Initially (2010) loading was slow. A couple of bottlenecks were:
     43- access to the DVO database is slow, especially for regions of the sky where we have high coverage (eg MD fields)
     44- ippToPsps (hopefully temporarily) performs some processing, in particular a conversion of magnitudes to fluxes and the calculation of psf, extended and cosmic ray likelihoods.  Initially the likelihoods in particular were slow due to the use of an explicit database cursor, but I have since implemented a stored procedure in the MySQL database, which using an implicit cursor is much more efficient
     45
     46
     47{{{
     48
     49
     502011-11-29 17:20:08 |    INFO |
     512011-11-29 17:20:08 |    INFO |                             New P2 batch
     522011-11-29 17:20:08 |    INFO |
     532011-11-29 17:20:08 |    INFO | Batch name                              B00290162
     542011-11-29 17:20:08 |    INFO | Survey                                  3PI
     552011-11-29 17:20:08 |    INFO | Survey ID                               0
     562011-11-29 17:20:08 |    INFO | Publishing to PSPS as survey            OLD
     572011-11-29 17:20:08 |    INFO | DVO location                            /data/ipp045.0/eugene/3pi.20110819/catdir.20110819.v1
     582011-11-29 17:20:08 |    INFO | Use full DVO tables?                    no
     592011-11-29 17:20:08 |    INFO | Input FITS file                         /data/ipp040.0/nebulous/91/37/657669198.gpc1:ThreePi.nt:2011:01:29:o5590g0403o.289536:o5590g0403o.289536.cm.167125.smf
     602011-11-29 17:20:08 |    INFO | Input FITS primary header               66 cards found
     612011-11-29 17:20:08 |    INFO | Output path                             /data/ipp005.0/rhenders/P2/ThreePi.V3/B00290162
     622011-11-29 17:20:08 |    INFO | Cam ID                                  167125
     632011-11-29 17:20:08 |    INFO | Exp ID                                  289536
     642011-11-29 17:20:08 |    INFO | Exp name                                o5590g0403o
     652011-11-29 17:20:08 |    INFO | Distribution group                      ThreePi
     662011-11-29 17:20:08 |    INFO | Proccesing table                        FrameMeta
     672011-11-29 17:20:08 |    INFO | Reading                                 FITS headers
     682011-11-29 17:20:08 |    INFO | Populating table                        ImageMeta
     692011-11-29 17:20:10 |    INFO | Running DVO                             ../src/dvograbber configs/oldthreepiGene2.xml /data/ipp045.0/eugene/3pi.20110819/catdir.20110819.v1
     702011-11-29 17:23:07 |    INFO | DVO access complete. Found              86494 detections
     712011-11-29 17:23:07 |    INFO | Importing tables with filter            .*.psf
     722011-11-29 17:23:20 |    INFO | Done. Imported                          60 tables
     732011-11-29 17:23:20 |    INFO | Creating indexes on                     IPP tables
     742011-11-29 17:23:21 |    INFO | +-------+---------------+---------------+---------------+---------------+---------------+---------------+
     752011-11-29 17:23:21 |    INFO | |  OTA  | Initial total |   Sat Det     | NULL instFlux | NULL peak ADU | NULL obj ID   |  Remainder    |
     762011-11-29 17:23:21 |    INFO | +-------+---------------+---------------+---------------+---------------+---------------+---------------+
     772011-11-29 17:23:21 |    INFO | |  XY01 |          1533 |             2 |            36 |            51 |           138 |          1306 |
     782011-11-29 17:23:21 |    INFO | |  XY02 |          1606 |             0 |            21 |            40 |            90 |          1455 |
     792011-11-29 17:23:21 |    INFO | |  XY03 |          1780 |             0 |             7 |            42 |            80 |          1651 |
     80...
     812011-11-29 17:23:33 |    INFO | +-------+---------------+---------------+---------------+---------------+---------------+---------------+
     822011-11-29 17:23:33 |    INFO | | Total |         97306 |            23 |          1160 |          2188 |         10393 |         83542 |
     832011-11-29 17:23:33 |    INFO | +-------+---------------+---------------+---------------+---------------+---------------+---------------+
     842011-11-29 17:23:33 |    INFO | Total detections                        83542
     852011-11-29 17:23:33 |    INFO | Min objID                               119151256944208155
     862011-11-29 17:23:33 |    INFO | Max objID                               122921262940559465
     872011-11-29 17:23:33 |    INFO | Replacing NULLs with                    -999
     882011-11-29 17:23:33 |    INFO | Changing table names with regex         ([a-zA-Z]+)
     892011-11-29 17:23:36 |    INFO | Writing to FITS                         /data/ipp005.0/rhenders/P2/ThreePi.V3/B00290162/00289536.FITS
     902011-11-29 17:23:42 |    INFO | Creating manifest                       /data/ipp005.0/rhenders/P2/ThreePi.V3/B00290162/BatchManifest.xml
     912011-11-29 17:23:42 |    INFO | Creating tar archive                    tar -cvf /data/ipp005.0/rhenders/P2/ThreePi.V3/B00290162.tar -C /data/ipp005.0/rhenders/P2/ThreePi.V3 B00290162
     922011-11-29 17:23:44 |    INFO | Compressing tar archive                 gzip -c /data/ipp005.0/rhenders/P2/ThreePi.V3/B00290162.tar > /data/ipp005.0/rhenders/P2/ThreePi.V3/B00290162.tar.gz
     932011-11-29 17:23:46 |    INFO | Attempting to publish                   /data/ipp005.0/rhenders/P2/ThreePi.V3/B00290162.tar.gz
     942011-11-29 17:23:46 |    INFO | Datastore publish                       successful
     95
     96}}}
     97
     98
     99Breakdown:
     100
     101reading FITS file: 0:13
     102DVO access: 2:57
     103creating Db indexes, performing all numerical manipulations (calculating fluxes, likehoods, removing duplicates, NULL fluxes etc etc): 0:13
     104creating FITS file, compressing and publishing to the datastore: 0:13
     105
     106TOTAL: 3:38
     107
     108Clearly DVO is the bottleneck. This example was a client running on the same machine as the DVO database. Accessing over the network slows it down substantially. Also, during this batch creation, two other clients were running on the same machine using the same MySQL database.
     109
     110
     111because DVO stores data in one FITS per unit area on the sky, for densely populated regions, the resultant FITS files are huge and therefore extremely slow to access
     112pre-Boston it wa taking 40 minutes oper frame. Ported all data to MySQL and access time dropped to 30 seconds.
     113
     114implemented a multi-client version of my interface code, meaning any number can be instantiated concurrently and, by using a secure critical section, they do not interfere with one another
     115
     116
     117Monitoring
     118
     119Only on the IPP side of the interface do we have access to all information about all batches. From the IPP i know how many frames or stacks are available for a given survey, I know how many I have processed through my interface but I also know the progress of each item as it passed through the PSPS system:
     120
     121DVO
     122processed through interface
     123loaded to datastore
     124loaded to ODM
     125merge worthy
     126merged
     127
     128there are also various 'delete' stages: when a batch has become merge_worthy, it is safe to delete copies in the DXLayer and datastore. when a batch has merged it is safe to delete the copy of local IPP disk. all this needs to be monitored and so I put it all into Czartool, where we can see progress over time on time-series and rate plots.
     129
     130