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 install pulp rpm sudo dnf install -y gcc make cmake bzip2-devel expat-devel file-devel glib2-devel libcurl-devel libxml2-devel python3-devel rpm-devel openssl-devel sqlite-devel xz-devel zchunk-devel zlib-devel 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 ======== 1. http POST :8000/pulp/api/v3/repositories/ name=firstrepo 2. http POST :8000/pulp/api/v3/repositories/ name=secondrepo * commands repository = Repository.objects.all()[0] repository2 = Repository.objects.all()[1] 3. http POST :8000/pulp/api/v3/remotes/file/file/ name=large_1 url=http://localhost/large_1/PULP_MANIFEST policy='on_demand' 4. http POST :8000/pulp/api/v3/remotes/file/file/ name=large_2 url=http://localhost/large_2/PULP_MANIFEST policy='on_demand' 5. http POST :8000/pulp/api/v3/remotes/file/file/ name=large_3 url=http://localhost/large_3/PULP_MANIFEST policy='on_demand' 6. http POST :8000/pulp/api/v3/remotes/file/file/ name=large_4 url=http://localhost/large_4/PULP_MANIFEST policy='on_demand' 7. http POST :8000/pulp/api/v3/remotes/file/file/ name=large_5 url=http://localhost/large_5/PULP_MANIFEST policy='on_demand' 8. http POST :8000/pulp/api/v3/remotes/file/file/ name=small_1 url=http://localhost/small_1/PULP_MANIFEST policy='on_demand' 9. http POST :8000/pulp/api/v3/remotes/file/file/ name=small_2 url=http://localhost/small_2/PULP_MANIFEST policy='on_demand' 10. http POST :8000/pulp/api/v3/remotes/file/file/ name=small_3 url=http://localhost/small_3/PULP_MANIFEST policy='on_demand' 11. http POST :8000/pulp/api/v3/remotes/file/file/ name=small_4 url=http://localhost/small_4/PULP_MANIFEST policy='on_demand' 12. http POST :8000/pulp/api/v3/remotes/file/file/ name=small_5 url=http://localhost/small_5/PULP_MANIFEST policy='on_demand' 13. http POST :8000/pulp/api/v3/remotes/rpm/rpm/ name=EPEL url=https://dl.fedoraproject.org/pub/epel/7/x86_64/ policy='on_demand' make sure system statistics data collection has started clear out the page caches * commands sync; echo 1 > /proc/sys/vm/drop_caches 14. http POST :8000/pulp/api/v3/remotes/file/file/1/sync/ repository=/pulp/api/v3/repositories/1/ mirror=False 15. http POST :8000/pulp/api/v3/remotes/file/file/6/sync/ repository=/pulp/api/v3/repositories/1/ 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 16. http POST :8000/pulp/api/v3/remotes/file/file/2/sync/ repository=/pulp/api/v3/repositories/1/ mirror=False 17. http POST :8000/pulp/api/v3/remotes/file/file/7/sync/ repository=/pulp/api/v3/repositories/1/ 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 18. http POST :8000/pulp/api/v3/remotes/file/file/3/sync/ repository=/pulp/api/v3/repositories/1/ mirror=False 19. http POST :8000/pulp/api/v3/remotes/file/file/8/sync/ repository=/pulp/api/v3/repositories/1/ 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 20. http POST :8000/pulp/api/v3/remotes/file/file/4/sync/ repository=/pulp/api/v3/repositories/1/ mirror=False 21. http POST :8000/pulp/api/v3/remotes/file/file/9/sync/ repository=/pulp/api/v3/repositories/1/ 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 22. http POST :8000/pulp/api/v3/remotes/file/file/5/sync/ repository=/pulp/api/v3/repositories/2/ mirror=False 23. http POST :8000/pulp/api/v3/remotes/file/file/10/sync/ repository=/pulp/api/v3/repositories/2/ 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 24. http POST :8000/pulp/api/v3/remotes/rpm/rpm/11/sync/ repository=/pulp/api/v3/repositories/2/ 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 25. stop recording system satistics 26. pulp-manager dbshell 27. /d+ 28. SELECT pg_size_pretty( pg_database_size('pulp') ); * record pulp database size