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

Add script to test S1 performance #24

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

Add script to test S1 performance #24

wants to merge 16 commits into from

Conversation

ocaisa
Copy link
Member

@ocaisa ocaisa commented Jun 7, 2023

Example (pretty-printed) output

{
	"2023-06-09": [{
			"http://rug-nl.stratum1.cvmfs.eessi-infra.org/cvmfs/@fqrn@": {
				"time": "23.44",
				"speed": "38163",
				"speed_unit": "SPEED(K/S)",
				"data": "1832350",
				"data_unit": "CACHEUSE(K)",
				"application": "TensorFlow",
				"arch": "x86_64/intel/haswell"
			}
		},
		{
			"http://bgo-no.stratum1.cvmfs.eessi-infra.org/cvmfs/@fqrn@": {
				"time": "25.90",
				"speed": "38163",
				"speed_unit": "SPEED(K/S)",
				"data": "1832350",
				"data_unit": "CACHEUSE(K)",
				"application": "TensorFlow",
				"arch": "x86_64/intel/haswell"
			}
		},
		{
			"http://azure-us-east1.stratum1.cvmfs.eessi-infra.org/cvmfs/@fqrn@": {
				"time": "36.11",
				"speed": "38163",
				"speed_unit": "SPEED(K/S)",
				"data": "1832350",
				"data_unit": "CACHEUSE(K)",
				"application": "TensorFlow",
				"arch": "x86_64/intel/haswell"
			}
		},
		{
			"http://aws-eu-west1.stratum1.cvmfs.eessi-infra.org/cvmfs/@fqrn@": {
				"time": "28.19",
				"speed": "38190",
				"speed_unit": "SPEED(K/S)",
				"data": "1834483",
				"data_unit": "CACHEUSE(K)",
				"application": "TensorFlow",
				"arch": "x86_64/intel/haswell"
			}
		}
	]
}

# Edit the config file to point to a single S1 option, e.g.,
echo 'CVMFS_SERVER_URL="'"$s1server"'"' | sudo tee /etc/cvmfs/domain.d/eessi-hpc.org.local > /dev/null
# Reconfigure CVMFS
sudo cvmfs_config setup
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have a way to check the user has the required sudo rights

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't the idea to run this in a container, with bind mounts to empty directories for /var/lib/cvmfs & co (so empty cache), which would totally alleviate the need for sudo?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It wasn't my idea...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It actually doesn't seem like running it in a container can work:

Apptainer> cvmfs_config stat pilot.eessi-hpc.org    
pilot.eessi-hpc.org not mounted
Apptainer> source /cvmfs/pilot.eessi-hpc.org/latest/init/bash 
Found EESSI pilot repo @ /cvmfs/pilot.eessi-hpc.org/versions/2021.12!
archspec says aarch64/graviton2
Using aarch64/graviton2 as software subdirectory.
Using /cvmfs/pilot.eessi-hpc.org/versions/2021.12/software/linux/aarch64/graviton2/modules/all as the directory to be added to MODULEPATH.
Found Lmod configuration file at /cvmfs/pilot.eessi-hpc.org/versions/2021.12/software/linux/aarch64/graviton2/.lmod/lmodrc.lua
Initializing Lmod...
Prepending /cvmfs/pilot.eessi-hpc.org/versions/2021.12/software/linux/aarch64/graviton2/modules/all to $MODULEPATH...
Environment set up to use EESSI pilot software stack, have fun!
[EESSI pilot 2021.12] $ cvmfs_config stat pilot.eessi-hpc.org
pilot.eessi-hpc.org not mounted
[EESSI pilot 2021.12] $ cvmfs_config wipecache
root privileges required
[EESSI pilot 2021.12] $ cvmfs_config setup    
root privileges required

I can get away with not wiping the cache since I control it, and I guess I can just overwrite the EESSI configuration file with a bind mount, but I am only left with timing the command if I can't run cvmfs_config stat

Copy link
Member Author

@ocaisa ocaisa Jun 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, more than that, I need to be able to run cvmfs_config setup to put the new configuration in place. Otherwise I need to bind mount a new configuration and run each S1 in a separate container execution step.

I really don't see the worth, we would lose a lot of valuable info and this implementation will run just fine as a CI job.

@terjekv
Copy link
Member

terjekv commented Jun 7, 2023

Should we make this more self-contained to the point of running in a container that has CVMFS? Right now, we assume the machine doing the testing either has CVMFS installed or that we run this into a container. I'd love it if this was a job I could run on a server that has very little of anything installed, but rather pulls a container and uses that to do the work.

realtime=$({ ./run.sh > /dev/null ; } 2> >(grep real | awk '{print $2}'))
KB_per_sec=$(cvmfs_config stat pilot.eessi-hpc.org | column -t -H 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,19,20 | tail -1)
# Print json output
json_array+=("{\"$s1server\": [{\"time\":\"$realtime\"},{\"speed\":\"${KB_per_sec}KB/sec\"}]}")
Copy link
Member

@terjekv terjekv Jun 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For parsing reasons, could we do something like this instead?
json_array+=("{\"$s1server\": [{\"time\":\"$realtime\"},{\"speed\":\"${KB_per_sec}\",{\"speed_units\":\"KB/sec}\"}]}")

(I'm not sold on using JSON in command line environments though, I fear the parsing in general.)

@ocaisa
Copy link
Member Author

ocaisa commented Jun 9, 2023

@terjekv I tried to get this working inside apptainer but the relevant cvmfs_config commands don't work. Here's the patch in case someone has some inspiration: https://gist.github.com/ocaisa/3d429c6c77365d94aadcbcd960a2a6ec

@terjekv
Copy link
Member

terjekv commented Jun 9, 2023

@terjekv I tried to get this working inside apptainer but the relevant cvmfs_config commands don't work. Here's the patch in case someone has some inspiration: https://gist.github.com/ocaisa/3d429c6c77365d94aadcbcd960a2a6ec

Meh, yeah, I was afraid of that. Another option is to dedicate a VM to run these tests and leave it at that.

@ocaisa
Copy link
Member Author

ocaisa commented Jun 9, 2023

I think we can do better than that, we will probably use our own GitHub runner soon, and can just run the tests in CI from this repo then and upload a json artifact.

@terjekv
Copy link
Member

terjekv commented Jun 15, 2023

I'm included to take this as is, and go with the proposed solution of an action. At least that gives us a starting point and we can always work around that later if need be.

@ocaisa ocaisa closed this May 8, 2024
@ocaisa ocaisa deleted the ocaisa-patch-1 branch May 8, 2024 20:14
@ocaisa ocaisa restored the ocaisa-patch-1 branch June 7, 2024 08:10
@ocaisa ocaisa reopened this Jun 7, 2024
@ocaisa
Copy link
Member Author

ocaisa commented Jun 7, 2024

We still don't have any testing for measuring S1 performance, so I'm reopening this until it is replaced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants