{"id":6272,"date":"2017-01-10T22:28:37","date_gmt":"2017-01-10T21:28:37","guid":{"rendered":"http:\/\/www.walkingrandomly.com\/?p=6272"},"modified":"2017-01-11T22:00:36","modified_gmt":"2017-01-11T21:00:36","slug":"over-73-of-users-of-our-high-performance-computing-hpc-service-only-ever-run-single-core-jobs","status":"publish","type":"post","link":"https:\/\/walkingrandomly.com\/?p=6272","title":{"rendered":"Over 73% of users of our High Performance Computing (HPC) service only ever run single core jobs"},"content":{"rendered":"<p>I work at <a href=\"http:\/\/www.sheffield.ac.uk\/\">The University of Sheffield<\/a>\u00a0where I am one of the leaders of the new <a href=\"http:\/\/rse.shef.ac.uk\/\">Research Software Engineering function<\/a>. One of the things that my group does is help people make use of <a href=\"http:\/\/docs.hpc.shef.ac.uk\/en\/latest\/iceberg\/cluster_specs.html\">Sheffield&#8217;s High Performance Computing cluster, Iceberg<\/a>.<\/p>\n<p>Iceberg is a heterogenous system with around 3440 CPU cores and a sprinkling of <a href=\"https:\/\/en.wikipedia.org\/wiki\/Graphics_processing_unit\">GPUs<\/a>. It&#8217;s been in use for several years and has been upgraded a few times over that period. It&#8217;s a very traditional HPC system that makes use of Linux and a variant of \u00a0<a href=\"https:\/\/arc.liv.ac.uk\/SGE\/\">Sun Grid Engine<\/a> as the scheduler and had served us well.<\/p>\n<p><a href=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2017\/01\/iceberg.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-6277\" src=\"https:\/\/www.walkingrandomly.com\/wp-content\/uploads\/2017\/01\/iceberg-300x154.png\" alt=\"iceberg\" width=\"300\" height=\"154\" srcset=\"https:\/\/walkingrandomly.com\/wp-content\/uploads\/2017\/01\/iceberg-300x154.png 300w, https:\/\/walkingrandomly.com\/wp-content\/uploads\/2017\/01\/iceberg.png 490w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>A while ago, the sysadmin pointed me to a goldmine of a resource &#8212; Iceberg&#8217;s accounting log. This 15 Gigabyte file contains information on every job submitted since July 2009. That&#8217;s more than 7 years of the HPC usage of 3249 users &#8212; over 46 million individual jobs.<\/p>\n<p>The file format is very straightforward. There&#8217;s one line per job and each line consists of a set of colon separated fields. \u00a0The first few fields look like something like this:<\/p>\n<pre>long.q:node54.iceberg.shef.ac.uk:el:abc07de:\r\n<\/pre>\n<p>The username is field 4 and the number of slots\u00a0used by the job is field 35. On our system, slots correspond to CPU cores. If you want to run a 16 core job, you ask for 16 slots.<\/p>\n<p>With one line of <a href=\"https:\/\/en.wikipedia.org\/wiki\/AWK\">awk<\/a>, we can determine the maximum number of slots ever requested by each user.<\/p>\n<pre>gawk -F: '$35&gt;=slots[$4] {slots[$4]=$35};END{for(n in slots){print n, slots[n]}}' accounting &gt; .\/users_max_slots.csv\r\n<\/pre>\n<p>As a quick check, I grepped the output file for my username and saw that the maximum number of cores I&#8217;d ever requested was 20. I ran a 32 core MPI &#8216;Hello World&#8217; job, reran the line of awk and confirmed that my new maximum was 32 cores.<\/p>\n<p>There are several ways I could have filtered the number of users but I was having awk lessons from <a href=\"https:\/\/twitter.com\/drjtwit\">David Jones<\/a>\u00a0so let&#8217;s create a new file containing the users who have only ever requested 1 slot.<\/p>\n<pre>gawk -F: '$35&gt;=slots[$4] {slots[$4]=$35};END{for(n in slots){if(slots[n]==1){print n, slots[n]}}}' accounting &gt; users_where_max_is_one_slot.csv\r\n<\/pre>\n<p>Running <a href=\"https:\/\/en.wikipedia.org\/wiki\/Wc_(Unix)\">wc<\/a> on these files allows us to determine how many users are in each group<\/p>\n<pre>wc users_max_slots.csv \r\n\r\n3250  6498 32706 users_max_slots.csv\r\n<\/pre>\n<p>One of those users turned out to be a blank line so 3249 usernames have been used on Iceberg over the last 7 years.<\/p>\n<pre>wc users_where_max_is_one_slot.csv \r\n2393  4786 23837 users_where_max_is_one_slot.csv\r\n<\/pre>\n<p>That is, 2393 of our 3249 users (just over 73%) over the last 7 years have only ever run 1 slot, and therefore 1 core, jobs.<\/p>\n<p><strong>High Performance?<\/strong><\/p>\n<p>So <strong>73% of all users have only ever submitted single core jobs<\/strong>. This does not necessarily mean that they have not been making use of parallelism. For example, they might have been running\u00a0<a href=\"http:\/\/wiki.gridengine.info\/wiki\/index.php\/Simple-Job-Array-Howto\">job arrays<\/a> &#8211; hundreds or thousands of single core jobs performing parameter sweeps or monte carlo simulations.<\/p>\n<p>Maybe they <strong>were<\/strong> running parallel codes but only asked the scheduler for one core. In the early days this would have led to oversubscribed nodes, possibly up to 16 jobs, each trying to run 16 cores.These days, our sysadmin does some voodoo to ensure that jobs can only use the number of cores that have been requested, no matter how many threads their code is spawning. Either way, making this mistake is not great for performance.<\/p>\n<p>Whatever is going on, this figure of 73% is surprising to me!<\/p>\n<p>Thanks to <a href=\"https:\/\/twitter.com\/drjtwit\">David Jones<\/a> for the awk lessons although if I&#8217;ve made a mistake, it&#8217;s all my fault!<\/p>\n<p><strong>Update (11th Jan 2017)<\/strong><\/p>\n<p>UCL&#8217;s Ian Kirker took a look at the usage of their general purpose cluster and found that 71.8% of their users have only ever run 1 core jobs.\u00a0<a href=\"https:\/\/twitter.com\/ikirker\/status\/819133966292807680\">https:\/\/twitter.com\/ikirker\/status\/819133966292807680<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I work at The University of Sheffield\u00a0where I am one of the leaders of the new Research Software Engineering function. One of the things that my group does is help people make use of Sheffield&#8217;s High Performance Computing cluster, Iceberg. Iceberg is a heterogenous system with around 3440 CPU cores and a sprinkling of GPUs. [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[68,41,80,67,79],"tags":[],"class_list":["post-6272","post","type-post","status-publish","format-standard","hentry","category-hpc","category-parallel-programming","category-rse","category-scientific-software","category-university-of-sheffield"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3swhs-1Da","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/6272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6272"}],"version-history":[{"count":6,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/6272\/revisions"}],"predecessor-version":[{"id":6281,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=\/wp\/v2\/posts\/6272\/revisions\/6281"}],"wp:attachment":[{"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/walkingrandomly.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}