Project

Profile

Help

Task #4290 » benchmark_steps_uuid.txt

dalley, 02/26/2019 07:29 PM

 
preparation
===========

sudo dnf install -y sysstat

cd /usr/share/nginx/html
sudo cp -R ~/devel/benchmarking_fixtures/* ./
sudo chmod -R 777 large_* small_*

fix /etc/nginx/nginx.conf so root /usr/share/nginx/html and restart nginx


tmux panes
===========
1. Commands
2. Task status checking
3. python3 manage.py shell_plus
4. pjournal
5. sar -Brbu -o perf_metrics_autoincrement 5


commands
========

http POST :8000/pulp/api/v3/repositories/ name=firstrepo
export REPO_HREF=$(http :8000/pulp/api/v3/repositories/ | jq -r '.results[] | select(.name == "firstrepo") | ._href')

http POST :8000/pulp/api/v3/repositories/ name=secondrepo
export REPO2_HREF=$(http :8000/pulp/api/v3/repositories/ | jq -r '.results[] | select(.name == "secondrepo") | ._href')

* commands

repository = Repository.objects.all()[0]
repository2 = Repository.objects.all()[1]

http POST :8000/pulp/api/v3/remotes/file/file/ name=large_1 url=http://localhost/large_1/PULP_MANIFEST policy='on_demand'
export LARGE_1_HREF=$(http :8000/pulp/api/v3/remotes/file/file/ | jq -r '.results[] | select(.name == "large_1") | ._href')

http POST :8000/pulp/api/v3/remotes/file/file/ name=large_2 url=http://localhost/large_2/PULP_MANIFEST policy='on_demand'
export LARGE_2_HREF=$(http :8000/pulp/api/v3/remotes/file/file/ | jq -r '.results[] | select(.name == "large_2") | ._href')

http POST :8000/pulp/api/v3/remotes/file/file/ name=large_3 url=http://localhost/large_3/PULP_MANIFEST policy='on_demand'
export LARGE_3_HREF=$(http :8000/pulp/api/v3/remotes/file/file/ | jq -r '.results[] | select(.name == "large_3") | ._href')

http POST :8000/pulp/api/v3/remotes/file/file/ name=large_4 url=http://localhost/large_4/PULP_MANIFEST policy='on_demand'
export LARGE_4_HREF=$(http :8000/pulp/api/v3/remotes/file/file/ | jq -r '.results[] | select(.name == "large_4") | ._href')

http POST :8000/pulp/api/v3/remotes/file/file/ name=large_5 url=http://localhost/large_5/PULP_MANIFEST policy='on_demand'
export LARGE_5_HREF=$(http :8000/pulp/api/v3/remotes/file/file/ | jq -r '.results[] | select(.name == "large_5") | ._href')

http POST :8000/pulp/api/v3/remotes/file/file/ name=small_1 url=http://localhost/small_1/PULP_MANIFEST policy='on_demand'
export SMALL_1_HREF=$(http :8000/pulp/api/v3/remotes/file/file/ | jq -r '.results[] | select(.name == "small_1") | ._href')

http POST :8000/pulp/api/v3/remotes/file/file/ name=small_2 url=http://localhost/small_2/PULP_MANIFEST policy='on_demand'
export SMALL_2_HREF=$(http :8000/pulp/api/v3/remotes/file/file/ | jq -r '.results[] | select(.name == "small_2") | ._href')

http POST :8000/pulp/api/v3/remotes/file/file/ name=small_3 url=http://localhost/small_3/PULP_MANIFEST policy='on_demand'
export SMALL_3_HREF=$(http :8000/pulp/api/v3/remotes/file/file/ | jq -r '.results[] | select(.name == "small_3") | ._href')

http POST :8000/pulp/api/v3/remotes/file/file/ name=small_4 url=http://localhost/small_4/PULP_MANIFEST policy='on_demand'
export SMALL_4_HREF=$(http :8000/pulp/api/v3/remotes/file/file/ | jq -r '.results[] | select(.name == "small_4") | ._href')

http POST :8000/pulp/api/v3/remotes/file/file/ name=small_5 url=http://localhost/small_5/PULP_MANIFEST policy='on_demand'
export SMALL_5_HREF=$(http :8000/pulp/api/v3/remotes/file/file/ | jq -r '.results[] | select(.name == "small_5") | ._href')


make sure system statistics data collection has started
clear out the page caches

* commands

sync; echo 1 > /proc/sys/vm/drop_caches


http POST ':8000'$LARGE_1_HREF'sync/' repository=$REPO_HREF mirror=False
http POST ':8000'$SMALL_1_HREF'sync/' repository=$REPO_HREF mirror=False

* commands

repo_version = RepositoryVersion.latest(repository)
%timeit {c['_type']: c['count'] for c in repo_version.content.values('_type').annotate(count=Count('_type'))}
%timeit list(Content.objects.filter(pk__in=repo_version.content))

* record task + command times

http POST ':8000'$LARGE_2_HREF'sync/' repository=$REPO_HREF mirror=False
http POST ':8000'$SMALL_2_HREF'sync/' repository=$REPO_HREF mirror=False

* commands

repo_version = RepositoryVersion.latest(repository)
%timeit {c['_type']: c['count'] for c in repo_version.content.values('_type').annotate(count=Count('_type'))}
%timeit list(Content.objects.filter(pk__in=repo_version.content))

* record task + command times

http POST ':8000'$LARGE_3_HREF'sync/' repository=$REPO_HREF mirror=False
http POST ':8000'$SMALL_3_HREF'sync/' repository=$REPO_HREF mirror=False

* commands

repo_version = RepositoryVersion.latest(repository)
%timeit {c['_type']: c['count'] for c in repo_version.content.values('_type').annotate(count=Count('_type'))}
%timeit list(Content.objects.filter(pk__in=repo_version.content))

* record task + command times

http POST ':8000'$LARGE_4_HREF'sync/' repository=$REPO_HREF mirror=False
http POST ':8000'$SMALL_4_HREF'sync/' repository=$REPO_HREF mirror=False

* commands

repo_version = RepositoryVersion.latest(repository)
%timeit {c['_type']: c['count'] for c in repo_version.content.values('_type').annotate(count=Count('_type'))}
%timeit list(Content.objects.filter(pk__in=repo_version.content))

* record task + command times

http POST ':8000'$LARGE_5_HREF'sync/' repository=$REPO2_HREF mirror=False
http POST ':8000'$SMALL_5_HREF'sync/' repository=$REPO2_HREF mirror=False

* commands

repo_version = RepositoryVersion.latest(repository2)
%timeit {c['_type']: c['count'] for c in repo_version.content.values('_type').annotate(count=Count('_type'))}
%timeit list(Content.objects.filter(pk__in=repo_version.content))

* record task + command times

25. stop recording system satistics
26. pulp-manager dbshell
27. /d+
28. SELECT pg_size_pretty( pg_database_size('pulp') );

* record pulp database size


(4-4/5)