Skip to content

Commit

Permalink
get memory tests running on Payara, 5.0 RC #7089
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed Jul 31, 2020
1 parent 78527a2 commit 912bfc1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
4 changes: 4 additions & 0 deletions scripts/tests/ec2-memory-benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ All the other pieces will be downloaded automatically (from the
either locally, where you're running the script, or on the newly
created instance.

The script downloads an Ansible config file called `main.yml` which you
should copy to `main2.yml` and edit to enable "sampledata". This config
file changes often enough upstream that it's better to make changes locally.

Run the script as follows:

```
Expand Down
22 changes: 12 additions & 10 deletions scripts/tests/ec2-memory-benchmark/ec2-memory-benchmark-remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,25 @@ then
EC2_HTTP_LOCATION="<EC2 INSTANCE HTTP ADDRESS>"
fi

DATAVERSE_APP_DIR=/usr/local/glassfish4/glassfish/domains/domain1/applications/dataverse; export DATAVERSE_APP_DIR
DATAVERSE_APP_DIR=/usr/local/payara5/glassfish/domains/domain1/applications/dataverse; export DATAVERSE_APP_DIR

# restart glassfish:
# restart app server

echo "Restarting Glassfish..."
echo "Restarting app server..."

# still "glassfish" until Ansible is updated

systemctl restart glassfish

echo "done."

# obtain the pid of the running glassfish process:
# obtain the pid of the running app server process:

GLASSFISH_PID=`ps awux | grep ^glassfi | awk '{print $2}' `; export GLASSFISH_PID
APP_SERVER_PID=`ps awux | grep ^dataver | awk '{print $2}' `; export APP_SERVER_PID

if [ ${GLASSFISH_PID}"x" = "x" ]
if [ ${APP_SERVER_PID}"x" = "x" ]
then
echo "Failed to obtain the process id of the running Glassfish process!"
echo "Failed to obtain the process id of the running app server process!"
exit 1;
fi

Expand All @@ -34,7 +36,7 @@ yum -y install gnuplot >/dev/null

GPLOT=gplot-1.11/gplot.pl; export GPLOT
GPLOTDIST=https://pilotfiber.dl.sourceforge.net/project/gplot/gplot/gplot-1.11.tar.gz; export GPLOTDIST
(cd /tmp; curl --insecure ${GPLOTDIST} 2>/dev/null | tar xzf - ${GPLOT} >/dev/null)
(cd /tmp; curl -L --insecure ${GPLOTDIST} 2>/dev/null | tar xzf - ${GPLOT} >/dev/null)


# Bombard the application with some GET requests.
Expand Down Expand Up @@ -97,7 +99,7 @@ do

# after every {repeat_outer} number of GETs, run jmap and save the output in a temp file:

sudo -u glassfish jmap -histo ${GLASSFISH_PID} > /tmp/jmap.histo.out
sudo -u dataverse jmap -histo ${APP_SERVER_PID} > /tmp/jmap.histo.out

# select the dataverse classes from the histo output:
#grep ' edu\.harvard\.iq\.dataverse' /tmp/jmap.histo.out
Expand All @@ -119,7 +121,7 @@ do
echo

# run jstat to check on GC:
sudo -u glassfish jstat -gcutil ${GLASSFISH_PID} 1000 1 2>/dev/null
sudo -u dataverse jstat -gcutil ${APP_SERVER_PID} 1000 1 2>/dev/null

echo

Expand Down
4 changes: 2 additions & 2 deletions scripts/tests/ec2-memory-benchmark/ec2-memory-benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ curl -O https://raw.githubusercontent.com/GlobalDataverseCommunityConsortium/dat
chmod 755 ec2-create-instance.sh

# download the sample data ec2 config:
curl -O https://raw.githubusercontent.com/IQSS/dataverse-sample-data/memory-monitoring-experiments/ec2config_memory_test.yaml
curl -O https://raw.githubusercontent.com/GlobalDataverseCommunityConsortium/dataverse-ansible/master/defaults/main.yml

# run the script:
./ec2-create-instance.sh -a ec2-memory-benchmark -b ${dataverse_branch} -r https://github.com/IQSS/dataverse.git -g ec2config_memory_test.yaml 2>&1 | tee create-instance.log
./ec2-create-instance.sh -b ${dataverse_branch} -r https://github.com/IQSS/dataverse.git -g main2.yml 2>&1 | tee create-instance.log

# obtain the address of the new instance, and the ssh key:

Expand Down

0 comments on commit 912bfc1

Please sign in to comment.