Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get memory tests running on Payara, 5.0 RC #7089 #7155

Merged
merged 2 commits into from Aug 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions scripts/tests/ec2-memory-benchmark/README.md
Expand Up @@ -13,6 +13,8 @@ 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 main reason a dedicated Ansible config file is used is to enable "sampledata".

Run the script as follows:

```
Expand Down
22 changes: 12 additions & 10 deletions scripts/tests/ec2-memory-benchmark/ec2-memory-benchmark-remote.sh
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
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/tests/group_vars/memorytests.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 memorytests.yml 2>&1 | tee create-instance.log

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

Expand Down