IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changes between Version 3 and Version 4 of ippToPsps_ScratchDatabase


Ignore:
Timestamp:
Apr 3, 2012, 9:17:08 AM (14 years ago)
Author:
rhenders
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ippToPsps_ScratchDatabase

    v3 v4  
    1010All instances of {{{loader.py}}} need use of a local 'scratch' database in which to import FITS tables, manipulate then export.
    1111
     12
     13== Setting up a loading machine ==
     14
     15Each instance of {{{loader.py}}} uses a 'scratch' MySQL database on {{{localhost}}} while processing. So, to do any loading, a local MySQL server should be up-and-running with a database created as the {{{ipp}}} user for use by {{{ippToPsps}}}. The default name for this is {{{ipptopsps_scratch}}}.
     16
     17Because {{{ippToPsps}}} uses this local database as a scratch database, there are large number of inserts and deletions, meaning large log files. For this reason, it is important to configure MySQL to store its data on a local partition, and not {{{/var}}} as is the default. For example, on {{{ipp005}}}:
     18
     19{{{
     20/var/lib/mysql
     21}}}
     22
     23was moved to:
     24
     25{{{
     26/export/ipp005.0/mysql
     27}}}
     28
     29In addition, it is prudent to decrease the default MySQL log-retention period from 90 days to 1 day. This is done is in
     30
     31{{{
     32/etc/mysql/my.cnf
     33}}}
     34
     35on the line
     36
     37{{{
     38expire_logs_days                                = 90
     39}}}
     40
     41You will need (if it is not done already) to create an {{{ipp}}} user. Connect to the local MySQL server as root then to the following.
     42
     43{{{
     44GRANT ALL PRIVILEGES ON *.* TO 'ipp'@'localhost' IDENTIFIED BY 'ipp' WITH GRANT OPTION;
     45}}}
     46
     47Now disconnect then reconnect as {{{ipp}}} and create the scratch database.
     48
     49{{{
     50CREATE DATABASE ipptopsps_scratch;
     51}}}
     52
     53Finally, you need to setup the scratch database with the initialization tables and stored procedures necessary for processing. To do this, use the {{{setupScratchDb.py}}} program, like this:
     54
     55{{{
     56./run.sh setupScratchDb.py someConfig nameOfScratchDb
     57}}}
     58
     59The choice of config here is not important, so use any.
     60
     61At the time of writing, scratch databases are set up on the following IPP hosts:
     62
     63{{{
     64ipp005
     65ipp006
     66ipp007
     67ipp033
     68ipp034
     69ipp045
     70}}}
     71
     72{{{ipp005}}} and {{{ipp045}}} in fact have ''three'' scratch databases each, so three clients can potentially be run on these machines. This is particularly useful on {{{ipp005}}} as this is where the DVO databases are currently stored, so clients running on the same machine have a much higher throughput. ({{{ipp045}}} used to host a backup 3pi DVO database.)
     73
     74
    1275== Stored procedure for psf likelihoods ==
    1376