Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

hdf file creation parameters
Only NoSplit is implemented - no family or split drivers.

In general a number of o2o-translate options are no longer supported.  In particular:
-G (long names like CalibCycle:0000 instead of CalibCycle) is always on.

Speed

...

Technical Difference's with o2o-translate

Below is a list of technical differences between psana-translate runs about 10% slower than and o2o-translate does.
Performance testing was done during November/December of 2013.  Both o2o-translate and psana-translate worked through a 92 GB xtc file using compression=1 on the rhat6 machine psdev105.  They read and wrote the data from /u1. They both used the non-parallel compression library.  o2o-translate produced a 68GB file in 65 minutes and psana-translate produced a 65GB file in 70 minutes.  (Speeds of about 22MB/sec).  Production runs will use the parallel compression library and are faster.

Single psana-translate

I parsed through psana-translate logs on 9/25/2014. An estimate of the median speed is 51MB/sec. The 25th and 75th percentile speeds look to be 37MB/sec and 69MB/sec. I've made some effort to parse logs that only include full translations with the default compression. Among such translations, I would expect the differences on speeds to be based on how much cspad is being calibrated, the load on the filesystem and cores, and how much damaged data appears and is not processed (will make the speed seem artificially higher). I assume that the size of the xtc files on disk is the amount of data translated.

A limitation on translation speed is the time it takes psana to read through all the data. I estimate this to be around 250MB/sec, putting translation at 5 times psana reading. I believe the file system supports 300-400MB/sec, but this depends heavily on the load, however this may not be a good benchmark for psana. A better benchmarch is a simple program that parses through the xtc - touching all the payloads.

Timing MPI Split Scan Translation

Below is a table of some testing results for the MPI split scan translator. All of this was carried out on the offline file system. A typical command was

bsub -q psanaq -a mympi -n 12 -R "span[ptile=1]" h5-mpi-translate -m cspad_mod.CsPadCalib,Translator.H5Output -o Translator.H5Output.output_file=/reg/data/ana01/temp/davidsch/out.h5 exp=xpptut13:run=3

With the environment variables set to load the parallel compression library. All jobs run on the psanaq and write to ana01. Two of the jobs only had one calib cycle (xpp74813:run=69 and xpp40312:run=48) from which we might say the baseline translation speeds were 25-30 mb/sec in these tests. When investigating why this was less than the median 51MB/sec, I did see a high load on the system -however it may also be the overhead of having two readers. When running mpi split scan on a run with only one calib cycle - two different nodes will hit the same xtc on disk for a while. At some point the master process will get further along in the files.

Some of the columns are explained here:

  • WJobs - how many worker jobs. If there are at least 100 events in a calib cycle, it is one calib cycle per worker job. Otherwise as many calib cycles as needed to hit 100.
  • CC/WJ - average number of calib cycles per worker job. Usually 1.
  • mread - time for the master to read through the data. The rest of the time it waits for worker nodes to finish.
  • calib - how many distinct cspad sources were calibrated in the h5.
  • WJtime - average time for one worker job. In principle, something close to mread + WJtime would be the minimum time we expect to achieve.
    *wn - for the n workers, report the number of worker jobs done, and the percent of the total time the worker was translating, vs. idly waiting for a worker job. For example, w0=19/96% means worker 0 processed 19 worker jobs in 96% of the total time.

exp

size(GB)

WJobs

CC/WJ

evts/CC

nodes

time

MB/sec

mread

calib

WJtime

w0

w1

w2

w3

w4

w5

w6

w7

w8

w9

w10

xppi0214:run=279

100.0

28

1.0

634.1

10

9.8min

174.1

66%=6.5min

1

2.4min

3/78%

4/95%

4/90%

3/68%

3/69%

3/68%

3/67%

3/71%

2/70%

  

xpp74813:run=69

1.00

1

1.0

160.0

5

0.7min

25.5

5.8%=0.0min

0

0.6min

1/93%

0/0%

0/0%

0/0%

       

xpp72213:run=146

2.03

31

1.0

243.0

5

0.8min

43.9

77%=0.6min

0

0.1min

9/72%

5/86%

9/70%

8/61%

       

xpp72213:run=122

4.00

41

1.0

363.0

5

1.0min

68.3

91%=0.9min

0

0.1min

11/85%

11/84%

10/81%

9/70%

       

xpp65013:run=40

16.02

68

1.5

79.6

5

2.5min

109.4

66%=1.7min

0

0.1min

17/88%

18/85%

17/85%

16/86%

       

xpp61412:run=75

32.19

138

1.2

99.2

5

4.3min

127.8

73%=3.1min

0

0.1min

32/89%

35/88%

36/89%

35/87%

       

xppa1814:run=173

64.04

10

1.0

1203.0

6

18.0min

60.7

66%=11.9min

0

5.4min

3/93%

3/78%

2/64%

1/35%

1/32%

      

xppi0214:run=325

127.57

36

1.0

629.1

12

12.0min

181.4

65%=7.8min

1

2.7min

4/74%

2/81%

2/74%

3/74%

4/85%

4/88%

4/68%

4/70%

3/78%

3/66%

3/49%

xpp40312:run=48

390.51

1

1.0

444427.0

12

220.0min

30.3

26%=57.2min

0

220.0min

1/1e+02%

0/0%

0/0%

0/0%

0/0%

0/0%

0/0%

0/0%

0/0%

0/0%

0/0%

xppa4513:run=173

478.13

204

1.0

483.0

12

52.0min

156.9

72%=37.4min

1

2.6min

14/98%

15/94%

18/93%

19/96%

19/92%

19/93%

17/93%

22/93%

18/90%

25/91%

18/90%

xppc3614:run=271

390.25

125

1.0

603.0

12

100.0min

66.6

87%=87.0min

1

4.4min

17/85%

20/75%

17/73%

16/49%

9/46%

8/35%

8/39%

8/42%

8/37%

7/37%

7/34%

Technical Difference's with o2o-translate

Below is a list of technical differences between psana-translate and o2o-translate. These differences should not affect users.

  • File attributes runNumber, runType and experiment not stored, instead expNum, experiment, instrument and jobName are stored (from the psana Env object)
  • The attribute :schema:timestamp-format is always "full", there is no option for "short"
  • The output file must be explicitly specificed in the psana cfg file. It is not inferred from the input.
  • The File attribute origin is now psana-translator as opposed to translator
  • The end sec and nanoseconds are not written into the Configure group at the end of the job as there is no EventId in the Event at the end.
  • integer size changes - a number of fields have changed size, a few examples are below.  In one quirky case, this caused translation to be different.  The reason was that the data was uninitialized, and the new 32 bit value was different than the old 16 bit value. Data produced from 2014 onward will not include unitialized data in the translation, users will not have to worry about.  Unitialized data is very rare in pre 2014 data and, due to its location, not likely to be used in analysis.
  • A few Examples of field size changes:
    • EvrData::ConfigV7/seq_config - sync_source - enum was uint16, now uint32
    • EvrData::ConfigV7/seq_config - beam_source - enum was uint16, now uint32
    • Ipimb::DataV2 - source_id was uint16, now uint8
    • Ipimb::DataV2 - conn_id was uint16 now uint8
    • Ipimb::DataV2 - module was uint16, now uint8

Some types have their field names rearranged. For example with ControlData::ConfigV2 one has:

...

. These differences should not affect users.

  • File attributes runNumber, runType and experiment not stored, instead expNum, experiment, instrument and jobName are stored (from the psana Env object)
  • The attribute :schema:timestamp-format is always "full", there is no option for "short"
  • The output file must be explicitly specificed in the psana cfg file. It is not inferred from the input.
  • The File attribute origin is now psana-translator as opposed to translator
  • The end sec and nanoseconds are not written into the Configure group at the end of the job as there is no EventId in the Event at the end.
  • integer size changes - a number of fields have changed size, a few examples are below.  In one quirky case, this caused translation to be different.  The reason was that the data was uninitialized, and the new 32 bit value was different than the old 16 bit value. Data produced from 2014 onward will not include unitialized data in the translation, users will not have to worry about.  Unitialized data is very rare in pre 2014 data and, due to its location, not likely to be used in analysis.
  • A few Examples of field size changes:
    • EvrData::ConfigV7/seq_config - sync_source - enum was uint16, now uint32
    • EvrData::ConfigV7/seq_config - beam_source - enum was uint16, now uint32
    • Ipimb::DataV2 - source_id was uint16, now uint8
    • Ipimb::DataV2 - conn_id was uint16 now uint8
    • Ipimb::DataV2 - module was uint16, now uint8

Some types have their field names rearranged. For example with ControlData::ConfigV2 one has:

ControlData::ConfigV2:
o2o: uses_duration uses_events duration events npvControls npvMonitors npvLabels
psana: events uses_duration uses_events duration npvControls npvMonitors npvLabels

EvrData::ConfigV7:
o2o: code isReadout isCommand isLatch reportDelay reportWidth releaseCode maskTrigger maskSet maskClear desc readoutGroup
psana: code isReadout isCommand isLatch reportDelay reportWidth maskTrigger maskSet maskClear desc readoutGroup releaseCode

Epics Ctrl datasets (in the configure group as opposed to the calib group) are not chunked.  They are stored as fixed size datasets depending on the number of pv's.

Only one epics pv is stored per name (of course, one epics pv may have any number of elements within it). This is fine as the epic pv name is supposed to uniquely identify the pv.  However in xtc files, you can see several epics pv's with the same pvname, but different pvid's. This scenario should only arise when the same pv is coming from different sources, and replicates the same data.  Psana only stores one epics pv per name (the last one it sees in a datagram). This is the one that psana-translate will pick up and store.

All Epics pv's are stored in the source folder EpicsArch.0:NoDevice.0.  With o2o-translate, some could be split off into other folders (such as AmoVMI.0:Opal1000.0). As epics pv names uniquely identify the data, the source information should not be needed.

Some DAQ config objects include space for a maximum number of entries.  o2o-translate would only write entries for those used, not the maximum entries.  psana-translate does not.  For example:

  • The Acqiris::ConfigV1 vert dataset now always prints the max of 20 channels, even if the user will only be using 3.
    • Note, in this case the Acqiris data will still only include the 3 channels being used. o2o-translate was making an adjustment to the config data being written.

psana-translate will write an emtpy output_lookup_table for the Opal1k::ConfigV1 dataset named output_lookup_table, even if output_lookup_table() is enabled.  o2o-translate would not.

psana-translate does not produce the _dim_fix_flag_20103 datasets that o2o-translate did.

Bld::BldDataGMDV  the field fSpare1 has been dropped from this type.

With psana-translate, if all the xtc's coming from a particular source are damaged, you will not see a 'data' dataset in the hdf5 file. You will see the time, _damage and _mask datasets that tell the damage and events where the omitted data lives. o2o-translate may have created a 'data' dataset filled with blanks.

As discussed above, OutOfOrder Damage is not translated by default. o2o-translate translated out of order damage, however psana-translate does not.  psana can be told to include this kind of damaged data by setting store-out-of-order-damage=true in the [psana] section of your .cfg file.

When the number of events is recorded in the control data, o2o-translate would set the chunk size based on this value.  psana-translate does the same.  However o2o-translate also looked at the actual number of events and used this as well to set chunk sizes in future calib cycles.  psana-translate does not do this latter part.

Speed

Comparison with o2o-translate

psana-translate runs about 10% slower than o2o-translate does.

Performance testing was done during November/December of 2013.  Both o2o-translate and psana-translate worked through a 92 GB xtc file using compression=1 on the rhat6 machine psdev105.  They read and wrote the data from /u1. They both used the non-parallel compression library.  o2o-translate produced a 68GB file in 65 minutes and psana-translate produced a 65GB file in 70 minutes.  (Speeds of about 22MB/sec).  Production runs will use the parallel compression library and are faster.

Single psana-translate

I parsed through psana-translate logs on 9/25/2014. An estimate of the median speed is 51MB/sec. The 25th and 75th percentile speeds look to be 37MB/sec and 69MB/sec. I've made some effort to parse logs that only include full translations with the default compression. Among such translations, I would expect the differences on speeds to be based on how much cspad is being calibrated, the load on the filesystem and cores, and how much damaged data appears and is not processed (will make the speed seem artificially higher). I assume that the size of the xtc files on disk is the amount of data translated.

A limitation on translation speed is the time it takes psana to read through all the data. I estimate this to be around 250MB/sec, putting translation at 5 times psana reading. I believe the file system supports 300-400MB/sec, but this depends heavily on the load, however this may not be a good benchmark for psana. A better benchmarch is a simple program that parses through the xtc - touching all the payloads.

Timing MPI Split Scan Translation

Below is a table of some testing results for the MPI split scan translator. All of this was carried out on the offline file system. A typical command was

bsub -q psanaq -a mympi -n 12 -R "span[ptile=1]" h5-mpi-translate -m cspad_mod.CsPadCalib,Translator.H5Output -o Translator.H5Output.output_file=/reg/data/ana01/temp/davidsch/out.h5 exp=xpptut13:run=3

With the environment variables set to load the parallel compression library. All jobs run on the psanaq and write to ana01. Two of the jobs only had one calib cycle (xpp74813:run=69 and xpp40312:run=48) from which we might say the baseline translation speeds were 25-30 mb/sec in these tests. When investigating why this was less than the median 51MB/sec, I did see a high load on the system -however it may also be the overhead of having two readers. When running mpi split scan on a run with only one calib cycle - two different nodes will hit the same xtc on disk for a while. At some point the master process will get further along in the files.

Some of the columns are explained here:

  • WJobs - how many worker jobs. If there are at least 100 events in a calib cycle, it is one calib cycle per worker job. Otherwise as many calib cycles as needed to hit 100.
  • CC/WJ - average number of calib cycles per worker job. Usually 1.
  • mread - time for the master to read through the data. The rest of the time it waits for worker nodes to finish.
  • calib - how many distinct cspad sources were calibrated in the h5.
  • WJtime - average time for one worker job. In principle, something close to mread + WJtime would be the minimum time we expect to achieve.
    *wn - for the n workers, report the number of worker jobs done, and the percent of the total time the worker was translating, vs. idly waiting for a worker job. For example, w0=19/96% means worker 0 processed 19 worker jobs in 96% of the total time.

exp

size(GB)

WJobs

CC/WJ

evts/CC

nodes

time

MB/sec

mread

calib

WJtime

w0

w1

w2

w3

w4

w5

w6

w7

w8

w9

w10

xppi0214:run=279

100.0

28

1.0

634.1

10

9.8min

174.1

66%=6.5min

1

2.4min

3/78%

4/95%

4/90%

3/68%

3/69%

3/68%

3/67%

3/71%

2/70%

  

xpp74813:run=69

1.00

1

1.0

160.0

5

0.7min

25.5

5.8%=0.0min

0

0.6min

1/93%

0/0%

0/0%

0/0%

       

xpp72213:run=146

2.03

31

1.0

243.0

5

0.8min

43.9

77%=0.6min

0

0.1min

9/72%

5/86%

9/70%

8/61%

       

xpp72213:run=122

4.00

41

1.0

363.0

5

1.0min

68.3

91%=0.9min

0

0.1min

11/85%

11/84%

10/81%

9/70%

       

xpp65013:run=40

16.02

68

1.5

79.6

5

2.5min

109.4

66%=1.7min

0

0.1min

17/88%

18/85%

17/85%

16/86%

       

xpp61412:run=75

32.19

138

1.2

99.2

5

4.3min

127.8

73%=3.1min

0

0.1min

32/89%

35/88%

36/89%

35/87%

       

xppa1814:run=173

64.04

10

1.0

1203.0

6

18.0min

60.7

66%=11.9min

0

5.4min

3/93%

3/78%

2/64%

1/35%

1/32%

      

xppi0214:run=325

127.57

36

1.0

629.1

12

12.0min

181.4

65%=7.8min

1

2.7min

4/74%

2/81%

2/74%

3/74%

4/85%

4/88%

4/68%

4/70%

3/78%

3/66%

3/49%

xpp40312:run=48

390.51

1

1.0

444427.0

12

220.0min

30.3

26%=57.2min

0

220.0min

1/1e+02%

0/0%

0/0%

0/0%

0/0%

0/0%

0/0%

0/0%

0/0%

0/0%

0/0%

xppa4513:run=173

478.13

204

1.0

483.0

12

52.0min

156.9

72%=37.4min

1

2.6min

14/98%

15/94%

18/93%

19/96%

19/92%

19/93%

17/93%

22/93%

18/90%

25/91%

18/90%

xppc3614:run=271

390.25

125

1.0

603.0

12

100.0min

66.6

87%=87.0min

1

4.4min

17/85%

20/75%

17/73%

16/49%

9/46%

8/35%

8/39%

8/42%

8/37%

7/37%

7/34%

Epics Ctrl datasets (in the configure group as opposed to the calib group) are not chunked.  They are stored as fixed size datasets depending on the number of pv's.

Only one epics pv is stored per name (of course, one epics pv may have any number of elements within it). This is fine as the epic pv name is supposed to uniquely identify the pv.  However in xtc files, you can see several epics pv's with the same pvname, but different pvid's. This scenario should only arise when the same pv is coming from different sources, and replicates the same data.  Psana only stores one epics pv per name (the last one it sees in a datagram). This is the one that psana-translate will pick up and store.

All Epics pv's are stored in the source folder EpicsArch.0:NoDevice.0.  With o2o-translate, some could be split off into other folders (such as AmoVMI.0:Opal1000.0). As epics pv names uniquely identify the data, the source information should not be needed.

Some DAQ config objects include space for a maximum number of entries.  o2o-translate would only write entries for those used, not the maximum entries.  psana-translate does not.  For example:

  • The Acqiris::ConfigV1 vert dataset now always prints the max of 20 channels, even if the user will only be using 3.
    • Note, in this case the Acqiris data will still only include the 3 channels being used. o2o-translate was making an adjustment to the config data being written.

psana-translate will write an emtpy output_lookup_table for the Opal1k::ConfigV1 dataset named output_lookup_table, even if output_lookup_table() is enabled.  o2o-translate would not.

psana-translate does not produce the _dim_fix_flag_20103 datasets that o2o-translate did.

Bld::BldDataGMDV  the field fSpare1 has been dropped from this type.

With psana-translate, if all the xtc's coming from a particular source are damaged, you will not see a 'data' dataset in the hdf5 file. You will see the time, _damage and _mask datasets that tell the damage and events where the omitted data lives. o2o-translate may have created a 'data' dataset filled with blanks.

As discussed above, OutOfOrder Damage is not translated by default. o2o-translate translated out of order damage, however psana-translate does not.  psana can be told to include this kind of damaged data by setting store-out-of-order-damage=true in the [psana] section of your .cfg file.

When the number of events is recorded in the control data, o2o-translate would set the chunk size based on this value.  psana-translate does the same.  However o2o-translate also looked at the actual number of events and used this as well to set chunk sizes in future calib cycles.  psana-translate does not do this latter part.

...