Skip to content

Commit

Permalink
change RELEASE and README.md per David's suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkraimer committed Mar 2, 2016
1 parent 9375463 commit 869196d
Show file tree
Hide file tree
Showing 22 changed files with 54 additions and 111 deletions.
3 changes: 1 addition & 2 deletions ChannelArchiverService/configure/RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@
# rebuild

-include $(TOP)/../../RELEASE.local
-include $(TOP)/../RELEASE.local
-include $(TOP)/configure/RELEASE.local
-include $(TOP)/../configure/RELEASE.local
-include $(TOP)/configure/RELEASE.local
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,25 @@ Just type:

An example of a proper *RELEASE.local* is:

EPICS_BASE=/home/install/epics/base
EPICS4_DIR=/home/epicsv4/master
PVCOMMON=${EPICS4_DIR}/pvCommonCPP
PVDATA=${EPICS4_DIR}/pvDataCPP
PVACCESS=${EPICS4_DIR}/pvAccessCPP
PVASRV=${EPICS4_DIR}/pvaSrv
NORMATIVETYPES=${EPICS4_DIR}/normativeTypesCPP
EXAMPLE=${EPICS4_DIR}/exampleCPP
PVDATABASE=${EPICS4_DIR}/pvDatabaseCPP
PVACLIENT=${EPICS4_DIR}/pvaClientCPP
PVASRV=${EPICS4_DIR}/pvaSrv
PVACCESS=${EPICS4_DIR}/pvAccessCPP
NORMATIVETYPES=${EPICS4_DIR}/normativeTypesCPP
PVDATA=${EPICS4_DIR}/pvDataCPP
PVCOMMON=${EPICS4_DIR}/pvCommonCPP
EPICS_BASE=/home/install/epics/base

All examples can also be built by:

cp configure/ExampleRELEASE.local configure/RELEASE.local
edit file configure/RELEASE.local
make

In **configure/RELEASE.local** it may only be necessary to change the definitions
of **EPICS4_DIR** and **EPICS_BASE**.


## Building An Individual Example
Expand Down
4 changes: 3 additions & 1 deletion arrayPerformance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ or some other memory check program.

## Building

If a proper RELEASE.local file exists one or two directory levels above **arrayPerformance**,
If a proper RELEASE.local file exists two directory levels above **arrayPerformance**,
or in **../configure/RELEASE.local** then just type:

make
Expand All @@ -21,3 +21,5 @@ It can also be built by:

In **configure/RELEASE.local** it may only be necessary to change the definitions
of **EPICS4_DIR** and **EPICS_BASE**.

## To understand the examples read documentation/arrayPerformance.html
3 changes: 1 addition & 2 deletions arrayPerformance/configure/RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@
# rebuild

-include $(TOP)/../../RELEASE.local
-include $(TOP)/../RELEASE.local
-include $(TOP)/configure/RELEASE.local
-include $(TOP)/../configure/RELEASE.local
-include $(TOP)/configure/RELEASE.local
75 changes: 10 additions & 65 deletions arrayPerformance/documentation/arrayPerformance.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<div class="head">
<h1>EPICS exampleCPP/arrayPerformance</h1>
<h2 class="nocount">Release 1.0 - 2016.02.24</h2>
<h2 class="nocount">Release 1.0 - 2016.03.02</h2>


<h2 class="nocount">Abstract</h2>
Expand Down Expand Up @@ -96,10 +96,10 @@ <h2>Example output</h2>
<p><b>Note:</b> These may fail if run on a platform that does not have sufficient memory,</p>
<p>To see an example just execute the following commands in four different terminal windows:</p>
<pre>
bin/linux/&lt;arch&gt;/arrayPerformanceMain
bin/linux/&lt;arch&gt;/longArrayMonitorMain
bin/linux/&lt;arch&gt;/longArrayGetMain
bin/linux/&lt;arch&gt;/longArrayPutMain
bin/$EPICS_HOST_ARCH/arrayPerformanceMain
bin/$EPICS_HOST_ARCH/longArrayMonitorMain
bin/$EPICS_HOST_ARCH/longArrayGetMain
bin/$EPICS_HOST_ARCH/longArrayPutMain
</pre>
<p>Each program generates a report every second when it has something to report.
Examples are:</p>
Expand Down Expand Up @@ -129,8 +129,8 @@ <h2>Example output</h2>
mrk&gt; bin/$EPICS_HOST_ARCH/longArrayPutMain
longArrayPutMain arrayPerformance 10 0 0 1
...
put numChannelPut 0 time 1.00148 Elements/sec 79.8819
put numChannelPut 1 time 1.00176 Elements/sec 79.8598
put numChannelPut 0 Elements/sec 79.8819
put numChannelPut 1 Elements/sec 79.8598
...
</pre>
<pre>
Expand Down Expand Up @@ -162,8 +162,6 @@ <h2>arrayPerformance</h2>
<dd>The queueSize for the element queue.
A value less than 1 will become 1.
</dd>
<dt>waitTime</dt>
<dd>The time that longArrayMonitor will sleep after poll returns a monitorElement.</dd>
</dl>
<p>
arrayPerformance creates a PVRecord that has the structure:.
Expand All @@ -175,8 +173,9 @@ <h2>arrayPerformance</h2>
alarm alarm
</pre>
Thus it holds an array of 64 bit integers.
<p>The record has support that consists of a separate thread that runs
until the record is destroyed executing the following algorithm:</p>
<p>arrayPerformance creates a separate thread that runs
until stop is called.
arrayPerformance does the following:</p>
<dl>
<dt>report</dt>
<dd>Once a second it produces a report.
Expand Down Expand Up @@ -215,10 +214,6 @@ <h2>longArrayMonitor</h2>
<dd>The name for the arrayPerform record.</dd>
<dt>queueSize</dt>
<dd>The queueSize. Note that any size &lt;2 is made 2.</dd>
<dt>waitTime</dt>
<dd>The time to wait after a poll request returns a monitorElement.
This can be used to force an overrun of the client even if there is no
overrun on the server.</dd>
</dl>
<h2>longArrayGet</h2>
<p>This is a pvAccess client that uses channelGet to access an arrayPerformance record.
Expand Down Expand Up @@ -261,56 +256,6 @@ <h2>longArrayPut</h2>
<dd>The time to delay between gets.</dd>
</dl>

<h2>Some results</h2>
<h3>array performance</h3>
<p>The results were from my laptop in 2013
It had a 2.2Ghz intel core i7 with 4Gbytes of memory.
The operating system was linux fedora 16.</p>
<p>When test are performed with large arrays it is a good idea to also
run a system monitor facility and check memory and swap history.
If a test configuration causes physical memory to be exhausted
then performance becomes <b>very</b> poor.
You do not want to do this.</p>
<h3>arrayPerformance results</h3>
<p>The simplest test to run arrayPerformance with the defaults:</p>
<pre>
mrk&gt; pwd
/home/hg/exampleCPP/arrayPerformance
mrk&gt; bin/$EPICS_HOST_ARCH/arrayPerformanceMain
</pre>
<p>This means that the array will hold 10 million elements.
The delay will be a millisecond.
There will be a single monitor and it will connect directly
to the local channelProvider, i. e. it will not use any network
connection.</p>
<p>The report shows that arrayPerformance can perform about 50 iterations per second
and is putting about 500million elements per second.
Since each element is an int64 this means about 4gigaBytes per second.
</p>
<p>When no monitors are requested and a remote longArrayMonitorMain is run:</p>
<pre>
mr&gt; pwd
/home/hg/exampleCPP/arrayPerformance
mrk&gt; bin/$EPICS_HOST_ARCH/longArrayMonitorMain
</pre>
<p>The performance drops to about 25 iterations per second and 250 million elements per second.
The next section has an example that demonstrates what happens.
Note that if the array size is small enough to fit in the local cache then running longArrayMonitor
has almost no effect of arrayPerforance.
</p>
<h3>memory leaks</h3>
<p>Running longArrayMonitorMain, longArrayPutMain, and longArrayGetMain
under valgrind shows no memory leaks.</p>
<p>arrayPerformanceMain shows the following:</p>
<pre>
==9125== LEAK SUMMARY:
==9125== definitely lost: 0 bytes in 0 blocks
==9125== indirectly lost: 0 bytes in 0 blocks
==9125== possibly lost: 576 bytes in 2 blocks
</pre>
<p>The possibly leaked is either 1 or 2 blocks.
It seems to be the same if clients are connected.
</p>

</div> <!-- class="contents" -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion arrayPerformance/src/longArrayPut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ void LongArrayPut::run()
timeStamp.getCurrent();
double diff = TimeStamp::diff(timeStamp,timeStampLast);
if(diff>=1.0) {
timeStampLast = timeStamp;
ostringstream out;
out << "put " << numChannelPut ;
double elementsPerSec = nElements;
Expand All @@ -96,7 +97,6 @@ void LongArrayPut::run()
if(iterBetweenCreateChannelPut!=0) out << " numChannelPut " << numChannelPut;
if(iterBetweenCreateChannel!=0) out << " numChannelCreate " << numChannelCreate;
cout << out.str() << endl;
timeStampLast = timeStamp;
nElements = 0;
}
if(delayTime>0.0) epicsThreadSleep(delayTime);
Expand Down
1 change: 1 addition & 0 deletions configure/ExampleRELEASE.local
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
EPICS4_DIR=/home/epicsv4/master
EXAMPLE=${EPICS4_DIR}/exampleCPP
PVDATABASE=${EPICS4_DIR}/pvDatabaseCPP
PVACLIENT=${EPICS4_DIR}/pvaClientCPP
PVASRV=${EPICS4_DIR}/pvaSrv
Expand Down
1 change: 0 additions & 1 deletion configure/RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@

-include $(TOP)/../RELEASE.local
-include $(TOP)/configure/RELEASE.local
-include $(TOP)/RELEASE.local


4 changes: 2 additions & 2 deletions database/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ It can also create a standalone main that has a set of V4 PVRecords.

## Building

If a proper RELEASE.local file exists one or two directory levels above **database**
then just type:
If a proper RELEASE.local file exists two directory levels above **database**,
or in **../configure/RELEASE.local** then just type:

make

Expand Down
3 changes: 1 addition & 2 deletions database/configure/RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
# rebuild

-include $(TOP)/../../RELEASE.local
-include $(TOP)/../RELEASE.local
-include $(TOP)/configure/RELEASE.local
-include $(TOP)/../configure/RELEASE.local
-include $(TOP)/configure/RELEASE.local

4 changes: 2 additions & 2 deletions exampleClient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ In order to run the examples, **database** must also be built and then the IOC d

## Building

If a proper RELEASE.local file exists one or two directory levels above **exampleClient**
then just type:
If a proper RELEASE.local file exists two directory levels above **exampleClient**,
or in **../configure/RELEASE.local** then just type:

make

Expand Down
4 changes: 1 addition & 3 deletions exampleClient/configure/RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,5 @@
# rebuild

-include $(TOP)/../../RELEASE.local
-include $(TOP)/../RELEASE.local
-include $(TOP)/configure/RELEASE.local
-include $(TOP)/../configure/RELEASE.local

-include $(TOP)/configure/RELEASE.local
4 changes: 2 additions & 2 deletions exampleLink/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ This example implements a PVRecord that accesses another PVRecord.

## Building

If a proper RELEASE.local file exists one or two directory levels above **exampleLink**
then just type:
If a proper RELEASE.local file exists two directory levels above **exampleLink**,
or in **../configure/RELEASE.local** then just type:

make

Expand Down
4 changes: 1 addition & 3 deletions exampleLink/configure/RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,5 @@
# rebuild

-include $(TOP)/../../RELEASE.local
-include $(TOP)/../RELEASE.local
-include $(TOP)/configure/RELEASE.local
-include $(TOP)/../configure/RELEASE.local

-include $(TOP)/configure/RELEASE.local
4 changes: 2 additions & 2 deletions helloPutGet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ In addition the timeStamp is set to the time when process is called.</p>

## Building

If a proper RELEASE.local file exists one or two directory levels above **helloPutGet**
then just type:
If a proper RELEASE.local file exists two directory levels above **helloPutGet**,
or in **../configure/RELEASE.local** then just type:

make

Expand Down
4 changes: 1 addition & 3 deletions helloPutGet/configure/RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,5 @@
# rebuild

-include $(TOP)/../../RELEASE.local
-include $(TOP)/../RELEASE.local
-include $(TOP)/configure/RELEASE.local
-include $(TOP)/../configure/RELEASE.local

-include $(TOP)/configure/RELEASE.local
4 changes: 2 additions & 2 deletions helloRPC/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ A channelRPC hello world server.

## Building

If a proper RELEASE.local file exists one or two directory levels above **helloRPC**
then just type:
If a proper RELEASE.local file exists two directory levels above **helloRPC**,
or in **../configure/RELEASE.local** then just type:

make

Expand Down
3 changes: 1 addition & 2 deletions helloRPC/configure/RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
# rebuild

-include $(TOP)/../../RELEASE.local
-include $(TOP)/../RELEASE.local
-include $(TOP)/configure/RELEASE.local
-include $(TOP)/../configure/RELEASE.local
-include $(TOP)/configure/RELEASE.local

4 changes: 2 additions & 2 deletions powerSupply/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ This is an example of creating a service that requires a somewhat complicated to

## Building

If a proper RELEASE.local file exists one or two directory levels above **examplePowerSupply**
then just type:
If a proper RELEASE.local file exists two directory levels above **examplePowerSupply**,
or in **../configure/RELEASE.local** then just type:

make

Expand Down
4 changes: 1 addition & 3 deletions powerSupply/configure/RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,5 @@
# rebuild

-include $(TOP)/../../RELEASE.local
-include $(TOP)/../RELEASE.local
-include $(TOP)/configure/RELEASE.local
-include $(TOP)/../configure/RELEASE.local

-include $(TOP)/configure/RELEASE.local
5 changes: 2 additions & 3 deletions pvDatabaseRPC/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ An example of a pvDatabase PVRecord which also supports RPC services.

## Building

If a proper RELEASE.local file exists one or two directory levels above
**pvDatabaseRPC**
then just type:
If a proper RELEASE.local file exists two directory levels above **pvDatabaseRPC**,
or in **../configure/RELEASE.local** then just type:

make

Expand Down
3 changes: 1 addition & 2 deletions pvDatabaseRPC/configure/RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@
# rebuild

-include $(TOP)/../../RELEASE.local
-include $(TOP)/../RELEASE.local
-include $(TOP)/configure/RELEASE.local
-include $(TOP)/../configure/RELEASE.local
-include $(TOP)/configure/RELEASE.local

0 comments on commit 869196d

Please sign in to comment.