<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by RocketCompute Dev Team on Medium]]></title>
        <description><![CDATA[Stories by RocketCompute Dev Team on Medium]]></description>
        <link>https://medium.com/@rocketcompute-com?source=rss-449f9d17333d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*PoSKQJzyhMP5k7Qu8DF9kQ.png</url>
            <title>Stories by RocketCompute Dev Team on Medium</title>
            <link>https://medium.com/@rocketcompute-com?source=rss-449f9d17333d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 15:48:55 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rocketcompute-com/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AWS CloudWatch vs. Telegraf]]></title>
            <link>https://rocketcompute-com.medium.com/aws-cloudwatch-vs-telegraf-e14346c7e086?source=rss-449f9d17333d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e14346c7e086</guid>
            <category><![CDATA[cpu]]></category>
            <category><![CDATA[telegraf]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloudwatch]]></category>
            <dc:creator><![CDATA[RocketCompute Dev Team]]></dc:creator>
            <pubDate>Tue, 16 Mar 2021 05:03:06 GMT</pubDate>
            <atom:updated>2021-03-31T09:02:28.829Z</atom:updated>
            <content:encoded><![CDATA[<p>There is no shortage of options when it comes to real-time monitoring applications. There are several that allow preventive as well as corrective actions notifying the administration team well in advance. However, as Metric Collector and Metric Storage, Telegraf and AWS CloudWatch, respectively, offer much more than this. They are convenient to set up, can be employed on-premise or on the cloud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aeGDlABSEvxephBqwSijeA.jpeg" /></figure><h3>Understanding AWS CloudWatch</h3><p>AWS CloudWatch is a tool from Amazon that allows system architects, developers, and administrators to help them perform real-time monitoring of their AWS applications hosted on the cloud. The software is automated and configured to give metrics on latency, request counts, CPU usage, etc.</p><h3><strong>Codebase</strong></h3><p>According to our research, CloudWatch code is based on telegraf agent. Because of the similar structure of the launch log and config file. More info <a href="https://rocketcompute.com/aws_cloudwatch_agent_vs_telegraf_agent">here</a></p><h3>The need for AWS CloudWatch</h3><p>The CloudWatch software also supports custom metrics, and users can push their logs directly to CloudWatch for monitoring purposes. The reports and data that the software generates allow administrators to track resource usage, application performance, any constraints, and operational issues. In other words, the tool is critical for foreseeing and resolving technical issues well in time to streamline organization-wide operations.</p><p>However, the most significant benefit of CloudWatch is that it is done to integrate automatically with Amazon Web Services (AWS) while being scalable and flexible.</p><h3>Features of AWS CloudWatch</h3><p>The Amazon CloudWatch is equipped with salient features, which are:</p><h3>Data Collection</h3><p>The AWS CloudWatch allows users to collate and store real-time data logs from different apps, resources, and services. Typically, these include vendor logs, logs published under the AWS services banner, and custom-designed logs. The logs can be quickly published by installing the AWS CloudWatch agent.</p><p>The software comes with many built-in metrics, but users can also customize as per their requirements. You can aggregate the collected container logs and metrics within the ecosystem as well.</p><h3>Monitoring</h3><p>The AWS CloudWatch dashboards allow system administrators to visualize their resource performance on the cloud by creating reusable visual graphs. The central dashboard offers logs data and graph metrics in a unified view so that you can act on the issue in a faster manner. Gaining knowledge of the context is key to understanding and resolving the root cause of the problem.</p><p>AWS CloudWatch also simplifies the analysis of between metrics and logs so that you can move on from diagnosis to resolution.</p><h3>Automation</h3><p>The AWS CloudWatch comes equipped with Auto Scaling to automate the application’s resource planning and capacity monitoring. You can set alarms and even trigger automated action.</p><p>With CloudWatch Events&#39; help, users can view a real-time stream of events describing any changes to the AWS resources. As a result, your response time reduces, and you can correct the issues faster.</p><h3>Analysis</h3><p>With AWS CloudWatch, users can view trends in real-time and retain nearly 15 months of data for analysis purposes. This historical data can prove to be the key to fine-tuning the utilization of resources. The software also provides granular data in real-time, thereby creating better visualization and analysis to optimize application performance.</p><h3>Security</h3><p>The AWS CloudWatch software is predesigned to integrate with IAM — AWS Identity and Access Management. As a result, the system administrators can define which resources or users can access the controls and data. Further, the data is encrypted while it is being transferred, also ensuring security and compliance.</p><h3>Advantages of AWS CloudWatch Agent</h3><p>The advantages of using AWS CloudWatch agent include:</p><p>● The convenience of switching between essential monitoring and detailed monitoring depending on your automated monitoring requirements.</p><p>● The same software is capable of monitoring other resources as well.</p><p>● You have the ease of creating custom metrics and monitoring using these for your particular applications. These metrics can be made using basic API requests.</p><p>● You can automatically troubleshoot, maintain, and store affected log files in case of an error. The views can be represented in graphs for better understanding.</p><p>● As one of the best software for checking and monitoring cloud resources, the AWS CloudWatch agent enables quick response and effective monitoring in one single package.</p><h3>Understanding Telegraf</h3><p>Telegraf is an agent for collecting, aggregating, processing, as well as writing metrics. It is an open-source server agent that helps collect data from stacks, systems, and IoT sensors.</p><h3>The need for Telegraf</h3><p>Telegraf’s primary purpose is data collection and transmission. The software performs this employing different components, including databases, systems, and IoT sensors. The software can connect to various data sources like MySQL, MongoDB, Redis, etc., to collate and transmit metrics. Metrics can then be collected from a varied stack of cloud platforms, orchestrators, and containers. It also enables collecting critical stateful data like temperature levels, pressure levels, etc., by connecting with various IoT devices and sensors.</p><h3>Coverage</h3><p>Telegraf simplifies metric collection from your endpoints as it comes with more than 200 plugins defined by SMEs (subject matter experts) from the community. Designing and building plugins are straightforward, meaning that you can develop customized plugins that cater to your particular monitoring requirements. Above all, the Telegraf monitoring software can be used to parse any input data formats directly into metrics, including JSON, InfluxDB Line Protocol, Value, Graphite, Collectd, and Nagios.</p><h3>Agent</h3><p>Plugins drive Telegraf for data collection as well as data output making it easily extendable. The software application can collect metrics covering a wide range of input avenues and code them into an equally wide range of outputs. Written in Go, the code is a standalone, compiled binary that can be implemented without external dependencies. In other words, it does not require npm, gem, pip, or such package management tools.</p><h3>Convenience</h3><p>The Telegraf plugin architecture comes with the flexibility to support your internal organizational processes. You need not modify your workflows to suit the application’s technology. It can be a centralized platform, or you can place it on the system&#39;s edge to fit your process requirements. In other words, it is incredibly convenient to implement.</p><h3>Advantages of Telegraf</h3><p>Like AWS CloudWatch, Telegraf comes with several advantages and negligible disadvantages.</p><p>● Like AWS CloudWatch, the Telegraf open-source monitoring solution is also a cohesive stack catering to all your monitoring requirements in one package.</p><p>● A single Telegraf agent is capable of functioning as multiple exporters with bare minimum handling requirements.</p><p>● The open-source platform is readily available to one and all and is continuously updated by the community with the latest developments.</p><p>● Telegraf agent comes with a wide array of metrics, and users can customize these to suit their organizational monitoring requirements.</p><p>● The software also comes with its set of multiple plugins that are more than enough for most organization-wide requirements. However, in case more is required, then additional plugins can be customized using different languages.</p><h3>Popular CPU Metrics for AWS CloudWatch and Telegraf Agent</h3><p>Both AWS CloudWatch and Telegraf come with an extension of metrics that support their monitoring capabilities.</p><p>Some popular CPU metrics are:</p><p>● cpu_time_active</p><p>This metric refers to the amount of time for which the CPU remains active irrespective of the capacity. These monitoring software tools are capable of measuring this metric in hundredths of one second.</p><p>● cpu_time_guest</p><p>This metric refers to the amount of time for which the CPU operates a virtual CPU for guest OS (operating system). Like most other monitoring metrics, this metric is also measured one-hundredths of a second.</p><p>● cpu_time_guest_nice</p><p>This metric refers to the total amount of time for which the CPU operates a virtual CPU for a guest OS. Typically, this operating system is low in priority. As a result, it can be interrupted by other more critical processes. Its measurement is done in hundredths of a second.</p><p>● cpu_time_nice</p><p>This metric refers to the total amount of time for which the CPU is in actual user mode while operating low priority processes. These are processes that can be interrupted by other higher-priority methods quickly. The tools are capable of measuring this metric in hundredths of a second for efficient monitoring.</p><p>● cpu_usage_active</p><p>As the name suggests, this metric refers to the total percentage of time for which the CPU remains active in any capacity. The percentage is the unit of measurement for this metric.</p><p>Other popular CPU metrics include:</p><p>● time_user (float)</p><p>● time_system (float)</p><p>● time_idle (float)</p><p>● time_active (float)</p><p>● time_nice (float)</p><p>● time_iowait (float)</p><p>● time_irq (float)</p><p>● time_softirq (float)</p><p>● time_steal (float)</p><p>● time_guest (float)</p><p>● time_guest_nice (float)</p><p>● usage_user (float, percent)</p><p>● usage_system (float, percent)</p><p>● usage_idle (float, percent)</p><h3>Conclusion</h3><p>In all instances where applications are deployed on Amazon Web Services (AWS), users have pre-configured AWS CloudWatch for automated monitoring and insights.</p><p>There are a few things to<a href="https://context.reverso.net/%D0%BF%D0%B5%D1%80%D0%B5%D0%B2%D0%BE%D0%B4/%D0%B0%D0%BD%D0%B3%D0%BB%D0%B8%D0%B9%D1%81%D0%BA%D0%B8%D0%B9-%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9/keep+in+mind"> keep in mind</a>:</p><ul><li>AWS CloudWatch agent will collect metrics like a disk, network, and CPU utilization, and it cannot measure EC2 memory consumption or default disk utilization.</li></ul><p>This gap is effectively filled in by Telegraf, which is highly suitable for EC2 memory usage monitoring. Hence, both AWS CloudWatch and Telegraf can be complementary to each other when implemented efficiently.</p><ul><li>AWS CloudWatch can be <a href="https://context.reverso.net/%D0%BF%D0%B5%D1%80%D0%B5%D0%B2%D0%BE%D0%B4/%D0%B0%D0%BD%D0%B3%D0%BB%D0%B8%D0%B9%D1%81%D0%BA%D0%B8%D0%B9-%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9/expensive">expensive</a>.</li><li>AWS CloudWatch was<a href="https://context.reverso.net/%D0%BF%D0%B5%D1%80%D0%B5%D0%B2%D0%BE%D0%B4/%D0%B0%D0%BD%D0%B3%D0%BB%D0%B8%D0%B9%D1%81%D0%BA%D0%B8%D0%B9-%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9/set+up+for"> set up for</a> Amazon Cloud and <a href="https://context.reverso.net/%D0%BF%D0%B5%D1%80%D0%B5%D0%B2%D0%BE%D0%B4/%D0%B0%D0%BD%D0%B3%D0%BB%D0%B8%D0%B9%D1%81%D0%BA%D0%B8%D0%B9-%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9/isn%27t+working">isn’t working</a> with Google Cloud, Oracle Cloud, IONOS Cloud, and others.</li><li>Telegraf has<a href="https://context.reverso.net/%D0%BF%D0%B5%D1%80%D0%B5%D0%B2%D0%BE%D0%B4/%D0%B0%D0%BD%D0%B3%D0%BB%D0%B8%D0%B9%D1%81%D0%BA%D0%B8%D0%B9-%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9/has+a+higher"> higher</a> <a href="https://context.reverso.net/%D0%BF%D0%B5%D1%80%D0%B5%D0%B2%D0%BE%D0%B4/%D0%B0%D0%BD%D0%B3%D0%BB%D0%B8%D0%B9%D1%81%D0%BA%D0%B8%D0%B9-%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9/flexibility">flexibility</a> in<a href="https://context.reverso.net/%D0%BF%D0%B5%D1%80%D0%B5%D0%B2%D0%BE%D0%B4/%D0%B0%D0%BD%D0%B3%D0%BB%D0%B8%D0%B9%D1%81%D0%BA%D0%B8%D0%B9-%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B9/customizing"> customizing</a> than AWS CloudWatch.</li></ul><p>So, <a href="https://rocketcompute.com/">RocketCompute.com</a> recommends that better attention be paid to Telegraf. In our team, we have many highly specialized and technical professionals. We can help with implementation, custom plugins building, and metrics selection for monitoring.</p><p>***</p><p>Vladimir Kobzev, RocketCompute</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e14346c7e086" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimal NVIDIA Stack for training Mask R-CNN]]></title>
            <link>https://rocketcompute-com.medium.com/optimal-nvidia-stack-for-training-mask-r-cnn-b368630727d0?source=rss-449f9d17333d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b368630727d0</guid>
            <category><![CDATA[gpu]]></category>
            <category><![CDATA[nvidia]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[cuda]]></category>
            <dc:creator><![CDATA[RocketCompute Dev Team]]></dc:creator>
            <pubDate>Fri, 26 Feb 2021 11:03:30 GMT</pubDate>
            <atom:updated>2021-04-14T12:33:33.339Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oLxD7ayzJ0ybOcy--_1Frw.png" /></figure><p><strong>Intro</strong></p><p>Containerization technology is greatly simplified GPU computations for machine learning by wrapping software stack above Kernel level in containers and allowing to juggle with different combinations of frameworks, low level libraries, and hardware drivers. Technologies like nvidia-docker even unlocked new stack combinations (driver plus CUDA toolkit) that were not feasible before. This, however, adds another dimension to the performance optimization problem, and now you not only need to choose optimal hardware for your machine learning task but also variate driver/CUDA combination to fine-tune the performance further.</p><p>The goal of this short article is to illustrate that such optimization is not only feasible but also makes sense.</p><p><strong>Experiment</strong></p><p>The exercise is very similar to what has been done in my first <a href="https://rocketcompute-com.medium.com/choosing-the-right-cloud-instance-for-training-deep-learning-models-part-1-fb2340a2a179">article</a>:</p><p><em>Workload:</em> Mask R-CNN model trained on COCO dataset. I used reference <a href="https://github.com/mlcommons/training/tree/master/object_detection/pytorch">implementation</a> from <a href="https://mlcommons.org/en/">MLCommons</a> set. It is built on PyTorch 1.0.1 which supports both CUDA v.9.0 and v.10.0 and you can switch between these two versions without changing any line of code. I tweaked the number of training steps to reduce benchmark time to 20–90 minutes depending on GPU.</p><p><em>Infrastructure:</em> I took one cheapest single-GPU instance for each GPU family available on AWS. There were four of them: p2.xlarge, g3s.xlarge, p3.2xlarge and g4dn.xlarge.</p><p><em>Stack:</em><strong> </strong>For installing different driver versions I used the approach that I described in the <a href="https://rocketcompute-com.medium.com/yet-another-guide-on-how-to-install-nvidia-drivers-on-linux-fd72c6cc38f6">previous</a> article. Framework together with the corresponding CUDA toolkit was packaged in a docker image together with the benchmark code.</p><p>For each set of {GPU instance, driver, CUDA} I did at least three runs.</p><p><strong>Results</strong></p><p>Below figures shows how benchmark runtime in seconds (Y axis) depends on device driver version (X axis) for each GPU. Curves correspond to a certain CUDA toolkit version (red for v9.0 and blue for v10.0). Each dot on a graph equals to average runtime and the vertical interval shows the standard<br>error around this mean value. Each point aggregates at least 3 independent benchmark runs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DzPPYvcrWBxVWW3g9FyIbQ.png" /><figcaption><strong>Figure 1. NVIDIA K80 with 11Gb VRAM, 4vCPU, 61Gb RAM</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nGMbQBcdj4bCrf_d-Pr9qw.png" /><figcaption><strong>Figure 2. NVIDIA M60 with 7Gb VRAM, 4vCPU, 31Gb RAM</strong></figcaption></figure><p>Instances with K80 (Figure 1) and M60 (Figure 2) show the smallest variation from the driver version (8% and 4% correspondingly). For M60 overall variation of the performance comparable to the variation for a particular driver which does not allow to make any conclusion regarding the best performing combination. For the K80, however, CUDA v.10.0 and driver v.418 on average better than any other combination.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bpCPHdQqOXt396C8bonpUA.png" /><figcaption><strong>Figure 3. NVIDIA V100 with 16Gb VRAM, 8x vCPU, 61Gb RAM</strong></figcaption></figure><p>Instances with V100 revealed the most interesting results (Figure 3). This GPU shows the highest variation of the benchmark score (15%) which is significantly higher than the variation of most individual software stacks. On average there is a clear optimum (CUDA v.10.0 and driver v.418) and a clear worst performing stack (CUDA v.9.0 and driver v.384). The difference between these two combinations can exceed 15% (the highest gap we saw between individual data points was c.20%)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HRGX1fuIl2VBGv2WLNAU2w.png" /><figcaption><strong>Figure 4. NVIDIA T4 with 15Gb VRAM, 4x vCPU, 16Gb RAM</strong></figcaption></figure><p>For T4 (Figure 4), which is the most modern GPU in the set, it is hard to say which combination is the best, despite significant variation of performance (14%). However, there is a clear loser (CUDA v.9.0 and driver v.410). It is<br>safe to say that recent drivers show comparable performance. This graph missing the result for driver v.384 as this version of the driver is not compatible with this GPU family.</p><p><strong>Conclusion</strong></p><p>As you can see even a quick straightforward check shows that the right driver/CUDA combination can save up to 15–20% of time/cost and add another layer of optimization after choosing the optimal GPU/instance for the job.</p><p>It potentially can cause an even bigger impact for inference workloads by reducing both the amount of compute required and latency of each request.</p><p>This exercise was just a quick check of the idea and more sorrow research will follow covering the latest versions of CUDA, drivers, and neural net architectures.</p><p>Egor Bykov</p><p>RocketCompute</p><p><a href="https://rocketcompute.com/">https://rocketcompute.com/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b368630727d0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Yet Another Guide on How to install Nvidia Drivers on Linux.]]></title>
            <link>https://rocketcompute-com.medium.com/yet-another-guide-on-how-to-install-nvidia-drivers-on-linux-fd72c6cc38f6?source=rss-449f9d17333d------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd72c6cc38f6</guid>
            <category><![CDATA[gpu]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[cuda]]></category>
            <category><![CDATA[nvidia]]></category>
            <category><![CDATA[driver]]></category>
            <dc:creator><![CDATA[RocketCompute Dev Team]]></dc:creator>
            <pubDate>Thu, 18 Feb 2021 03:12:04 GMT</pubDate>
            <atom:updated>2021-05-25T11:09:20.291Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*-1IRwrH8XA5CigohjuUOAg.png" /></figure><p><strong>Intro</strong></p><p>There are a lot of guides on how to install Nvidia drivers in the wild, but still, when I needed to set-up a system where I can easily switch between driver versions for our research, I spent several days trying to figure out the most seamless way to achieve that.</p><p>Here I want to summarize multiple days of my googling, trials, errors, and the final solution I came up with which appeared to be way simpler than I thought.</p><p>I am using Ubuntu distro as a reference, the process should be the same for any version above 16.04. For other distros, the main part of the installation process should be similar with some differences in getting the required system packages and handling already installed graphics drivers.</p><p><strong>Necessary Background</strong></p><p>Below is a summary of my findings that helped me better understand the issue and why certain combinations of Nvidia low level libraries work and others do not.</p><p>Each driver version was developed against a certain version of Linux Kernel (which, I believe was mainstream at the time of development). This means that you have almost no chances to install old drivers on Linux distros with more modern kernel and it doesn’t matter which way of installation you choose, most probably such drivers just do not exist (e.g. I was not able to install drivers older than version 440 on Ubuntu 18.04 with kernel 4.15 or higher).</p><p>However, due to the backward compatibility of Linux kernels, you can install newer drivers on older kernels (e.g. version 450 or even higher on Ubuntu 16.04)</p><p>If you plan to install CUDA libraries on your host as well you do not need to install the driver separately as it goes together with the CUDA package due to certain compatibility requirements. CUDA installation deserves a separate article but can be done similarly.</p><p>If you plan to run CUDA dependent code inside a container you do not need to install the CUDA toolkit at all. The only requirement is that the driver package contains the library required to run a CUDA-enabled container (later I will show how to check that).</p><p><strong>Installation Process</strong></p><p>Download installer from Nvidia <a href="https://www.nvidia.com/Download/index.aspx?lang=en-us">site</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/563/1*Ia9IDox353SRrjOSbkdRLA.png" /></figure><p>According to my observations, there is no difference in what product or product type you are choosing, you will get the same installation file. The only difference is if you choose “Data Center / Tesla” instead of e.g. “GeForce” you will get a drop-down for the CUDA Toolkit version. Don’t be confused you will not get CUDA Toolkit together with the driver. Varying CUDA versions you will get a minimal driver version compatible with chosen CUDA Toolkit version. (e.g. if you pick 10.0 as the CUDA version you will get driver v.410, for CUDA v.11.0 you will get driver v.450).<br>Be aware that your GPU generation should be compatible with chosen CUDA Toolking version. The older you GPU the more options you have in terms of driver/CUDA versions.</p><p>After setting up all parameters you will download a self-installation archive. This archive contains pre-compiled libraries and source files necessary to build kernel modules. To build the driver you will need the following packages:</p><ul><li>gcc (C compiler)</li><li>make (utility used to automate compilation process)</li><li>linux-headers (kernel source files necessary to build kernel modules)</li></ul><p>One line installation:</p><pre>$ sudo apt install gcc make linux-headers-$(uname -r)</pre><p>“$(uname -r)” will add the kernel version of your system to the package name to grab exactly what is required in your case.</p><p>The next steps will depend on your particular set-up.</p><p><strong>Headless Server without pre-installed drivers</strong></p><p>This is the simplest case, you have a VM server with no windows manager (X server) booted from a pre-built image with no drivers (like AWS AMI without pre-installed drivers) and no X server running. Then you can simply run:</p><pre>$ sudo ./NVIDIA-Linux-x86_64–450.80.02.run --silent</pre><p>“--silent” option will turn off the interactive UI and will use default answers to all questions that are usually asked. No output except error messages will be printed.</p><p>After that you are good to go, no reboot required. You can verify that installation went well by listing loaded kernel modules having “nvidia” in its name:</p><pre>$ lsmod | grep nvidia</pre><p>you should get 3 modules: nvidia, nvidia_drm, and nvidia_modeset. Or you can run:</p><pre>$ nvidia-smi</pre><p>which will show the current driver version, and list of all GPUs present in the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/791/1*EiBUA_6Rih2j-Kz9I1-I8w.png" /><figcaption>Output from nvidia-smi</figcaption></figure><p>Note the CUDA version in the output. It is the highest version of the CUDA toolkit compatible with this driver, it does not mean that you have ANY version of the CUDA toolkit installed in your system. If you do not see this in the nvidia-smi output (I saw this several times) it means that the driver was installed without a library responsible for processing requests from CUDA libraries and your CUDA enabled containers will not work. In this case, you need to reinstall the driver (or even try a different version of it).</p><p>If you want to investigate the content of the package you can unpack it without installation by running:</p><pre>$ ./NVIDIA-Linux-x86_64–450.80.02.run --extract-only</pre><p>or</p><pre>$ ./NVIDIA-Linux-x86_64–450.80.02.run --target [NewDir]</pre><p>You can scrutinize other available installation options by running:</p><pre>$ ./NVIDIA-Linux-x86_64–450.80.02.run --advanced-options</pre><p><strong>Desktop or Server running windows manager</strong></p><p>For bare-metal or VM installation undertaken with GPGPU present during the installation, you need to disable default drivers first. To do this you need to create file /etc/modprobe.d/blacklist-nouveau.conf (you can use any name you like) and put the following lines into it:</p><pre>blacklist nouveau<br>options nouveau modeset=0</pre><p>After that you need to rebuild initramfs which is used to boot the system:</p><pre>$ sudo update-initramfs -u</pre><p>After reboot, you can do the steps described for the headless server above to install the driver.</p><p><strong>Uninstalling Nvidia driver</strong></p><p>If you already have an Nvidia driver installed on your system and want to install a different version of it (or simply get rid of it) you can uninstall the driver by running</p><pre>$ ./NVIDIA-Linux-x86_64–450.80.02.run --uninstall</pre><p><strong>Additional Note</strong></p><p>If you want to switch back to nouveau driver don’t forget to delete /etc/modprobe.d/blacklist-nouveau.conf (and rebuild initramfs if necessary) after deleting the Nvidia driver.</p><p>Sometimes, installing kernel updates will break compatibility with the installed driver. In this case, just uninstall and reinstall it again against the updated kernel (the process is the same).</p><p><strong>Closing</strong></p><p>I hope this sheds some light on the driver installation process and it will never trouble you again. Let me know if you would like to see a similar article on installing the CUDA toolkit or on how nvidia-docker enables containers with CUDA toolkit to run on the host with an incompatible driver.</p><p>Egor Bykov</p><p>RocketCompute</p><p><a href="https://rocketcompute.com/">https://rocketcompute.com/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd72c6cc38f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Telegram bot for AWS instances monitoring]]></title>
            <link>https://rocketcompute-com.medium.com/telegram-bot-for-aws-instances-monitoring-bb38aab23153?source=rss-449f9d17333d------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb38aab23153</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[iaas]]></category>
            <category><![CDATA[telegram]]></category>
            <category><![CDATA[monitoring]]></category>
            <dc:creator><![CDATA[RocketCompute Dev Team]]></dc:creator>
            <pubDate>Wed, 27 Jan 2021 20:51:05 GMT</pubDate>
            <atom:updated>2021-01-28T06:55:29.593Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/319/1*B9hv8vqwcx0buf4K7014hA.png" /></figure><p>Proper monitoring is a foundation for mindful configuration management. It’s a prerequisite for any optimization effort. Monitoring is useless without the ability to act on the insight.</p><p>What most monitoring solutions lack is easy access to instant and relevant action upon insights you gather. This post is about a bot-based notification and management layer that we’ve created to play with the ways we can deal with that exact problem and that’s, for now, is available in a beta mode for our selected customers.</p><p>We in the RC team resolve to provide three simple things — an ability to come up with your own insights (via continuous monitoring), get our insight to support you in your decision making (through anomaly &amp; bottleneck detection), and give you means to act instantly.</p><p>We wanted to provide our customers with means to communicate with their infrastructure. So, the obvious idea was, why not integrate this workflow with Telegram (or any other messenger) — the tool that is always with you and which goal is exactly that — instant communication?</p><p>Below are some other features of our bot MVP:</p><ol><li>Integration with AWS</li><li>Monitoring charts in chats</li><li>Notification settings</li><li>Reasonable security measures</li><li>Start with the most useful cases (e.g. hibernate if something’s terribly off)</li></ol><h3>Integration with AWS</h3><p>1.1 Metrics collection<br>1.2 Telegram authentication<br>1.3 Kapacitor’s events detection</p><p><strong>Metrics Collection</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/439/1*VGFKGLTz4e7nf7oq6eK06g.png" /></figure><p><a href="http://rocketcompute.com/">RocketCompute</a> uses Telegraf based metric collection agent it could be installed via command line or AWS launch template.</p><p><strong>Telegram bot authentication</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/309/1*V3IGPBTEl23c8QWEYeC0sg.png" /></figure><p>According to telegram <a href="https://core.telegram.org/bots/api">API</a>: you may use links like t.me/your_bot?start=XXXX that open your bot with a parameter (could be more than one). We use this feature to authenticate a user in the bot by passing the token.</p><h3><strong>Charts with anomaly events</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*qvmHsT15oMOgPgSpY-ozZw.png" /></figure><p>Initially, we didn’t send any pictures via the bot. There were just links to the Grafana-based monitoring portal. But after some feedback (basically, it’s too much trouble to decide if you’d like to click without at least a preview) we decided to try adding charts right to the bot message.</p><p>What can I say, we dig the result.</p><h3>Notification settings</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*aoEFSTCLFZLlCIWCJKDacw.gif" /></figure><p>First of all, every engineer prefers to have her own customizable instance list that she wants to watch over.</p><p>Fortunately, there is a checkbox feature in telegram. Exactly what is needed — users can get a list of active instances.</p><h3><strong>Security issues</strong></h3><p>Questions:</p><ul><li>What if someone gets a telegram token and access to the AWS management console through it?</li><li>What if someone stole a Telegram account from an engineer and somehow got AWS credentials through it?</li><li>What if our engineer makes critical changes from the Telegram bot (clients want hibernating instances straight from the bot)?</li></ul><p>In the initial version we’ve done the following:</p><ul><li>Account admin approves every Telegram user authentication</li><li>All users must have two-factor authentication for a telegram account</li><li>Only hibernating command available right from the Telegram bot. And it works only for instances in idle state (when the corresponding notification appears)</li><li>No SSH credentials in Telegram bot. Only link to AWS console with relevant parameters</li></ul><h3>Useful cases</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/583/1*SngoC91jVYXSK-SbzEeEjQ.png" /></figure><p>Best of all (from what we can gather so far) is the Hibernate button. It’s not something that is used often but it saves money.</p><p>Well, that’s it.</p><p>Pretty simple setup, that being combined with a personalized notification and anomaly detection system. It saves money from the very start and gives you the comfort of never losing sight of your infrastructure, which is especially important at times when you run something time consuming and infrastructure-heavy.</p><p>P.S.: If you think that this might be interesting for your applications (or if you’d like to have integrations with another messenger) — let us know, we’d be happy to give you a demo and discuss how we might be of help. We are keen to discover and learn about new cases to apply our tech.</p><p>P.P.S.: You can try our bot along with our monitoring and detection system via RocketCompute item on the <a href="https://www.rocketcompute.com/aws-monitoring-telegram-bot">AWS marketplace</a>.</p><p>Vladimir Kobzev,</p><p>Rocketocompute team</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb38aab23153" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Choosing the right cloud instance for training Deep Learning models. Part 1]]></title>
            <link>https://rocketcompute-com.medium.com/choosing-the-right-cloud-instance-for-training-deep-learning-models-part-1-fb2340a2a179?source=rss-449f9d17333d------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb2340a2a179</guid>
            <category><![CDATA[gpu-instance]]></category>
            <category><![CDATA[bert]]></category>
            <category><![CDATA[mask-r-cnn]]></category>
            <category><![CDATA[dl-training]]></category>
            <category><![CDATA[dlrm]]></category>
            <dc:creator><![CDATA[RocketCompute Dev Team]]></dc:creator>
            <pubDate>Mon, 28 Dec 2020 01:09:33 GMT</pubDate>
            <atom:updated>2020-12-29T00:42:04.317Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hNpb6iNVfoCDvNx4XmTLlw.png" /></figure><h3>Intro</h3><p>We at RocketCompute regularly optimize cloud HPC configurations for different workloads (e.g. <a href="https://blogs.oracle.com/cloud-infrastructure/hpc-hub-and-oracle-cloud-infrastructure-optimizing-cost-and-performance-for-weather-prediction-for-windyapp">this</a> case for weather prediction). It is quite common for us to see the price or performance variation as wide as 4x-5x for different HPC cluster configurations. This variation usually heavily depends on network latency within the cluster and unique requirements of a workload (algorithm, software stack, RAM and storage requirements, etc.)</p><p>When we started looking at deep learning workloads we discovered that our colleagues most of the time use one of the following rules of thumb while picking cloud configurations for training DL models:</p><ul><li>The cheapest instance in case of the tight budget</li><li>Instance with the most modern GPU available in case training time should be as low as possible</li></ul><p>We decided not to take it for granted and do our common routine that we usually do when we are looking for optimal configuration for computationally intensive workloads. (Spoiler: it appears that DL training jobs show the same 4x variation in terms of price/performance on different cloud configurations and variation is task-specific)</p><p>If you prefer fewer words and more numbers you can check out a formal white paper that our team put together on the topic <a href="https://www.rocketcompute.com/ml-performance-report">here</a>.</p><h3>Approach</h3><p>The standard approach that the RocketCompute team employs for these tasks is to put together a benchmark that approximates the target workload and can be quickly run on different configurations. The resulting set of benchmarks duration/cost shows the most efficient and fastest set-ups while key hardware performance metrics (e.g. CPU/GPU/RAM utilization, etc.) can shed some light on why certain instances are better than the others.</p><p>For benchmarks, we started with reference implementations of the MLPerf training benchmarks set (you can find detailed info <a href="https://mlperf.org/training-overview">here</a>). Out of 8 different neural network implementations available, we picked up 1 model for the most widely used domains. The resulting set is:</p><ul><li>For image processing — object detection Mask R-CNN model trained on COCO dataset</li><li>For natural language processing — BERT model trained on Wikipedia dump</li><li>For recommendations — DLRM model trained on 1Tb Kaggle AdDisplay Challenge dataset</li></ul><p>We then fixed the number of training steps to reduce benchmark time to 15–45 minutes on the instance with one V100 GPU. For the BERT model, we also reduced the dimensionality of the neural net from BERT Large to BERT Base to fit the model into GPUs with less than 8Gb of available video memory.</p><p>The experiment was done using all AWS single GPU instances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*GaPTdTIB11Lh6wjuy9LcTA.png" /></figure><h3>Key Results</h3><p>Below table shows (in relative terms) how long each benchmark run and how much each run costs. All numbers for a particular network architecture are normalized to the fastest (or cheapest) instance for this benchmark. For example, for BERT the cheapest run was on g4dn.xlarge instance while it costs four times more money to run the same benchmark on g4dn.8xlarge. Similarly, the fastest run for BERT was on p3.2xlarge instance while it took p2.xlarge 4.6x more time to finish the same job.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IKb14vTjBsBWrMU_QgRIXA.png" /><figcaption>(*) estimated duration. Actual test was stopped after 300 mins (all other runs took 15–120 mins)</figcaption></figure><p>Now let’s look carefully at these numbers:</p><ol><li>The cheapest instance for BERT and Mask R-CNN appears the most expensive for DLRM (g4dn.xlarge with T4)</li><li>The most expensive instance for Mask R-CNN appears the cheapest for DLRM (p2.xlarge with a half (!) of a dual GPU K80, the oldest GPU available on AWS)</li><li>It appears that for DLRM you can choose a very well-balanced instance both in terms of price and training time (g4dn.4xlarge) and it will be very close to fastest (only 4% longer) and cheapest (only 2% more expensive). And the same instance would be around 2.5x slower and pricier for other architectures</li><li>Generally, the instance with the best training time never gave the best training price and vice versa</li></ol><p>Looks odd, isn’t it? Let us drill down into hardware metrics to understand what makes the DLRM benchmark so special.</p><p>Let us start with memory usage. Below are the graphs showing how much RAM is utilized during the whole model training process for three instances with the same hardware but different RAM and vCPU counts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cPcHBnibqZZwWWoMkaykwg.png" /><figcaption>g4dn.2xlarge (Nvidia T4, 32 Gb of RAM, 8 vCPUs)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N3FgHginauNd1H-B3KV3iw.png" /><figcaption>g4dn.4xlarge (Nvidia T4, 64 Gb of RAM, 16 vCPUs)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6x9bRGoQaEhS8K9mVmbhvA.png" /><figcaption>g4dn.8xlarge (Nvidia T4, 128 Gb of RAM, 32 vCPUs)</figcaption></figure><p>Please ignore the yellow area for now, it shows how much RAM Linux kernel is using to cash IO operations. Focus on the green area, this is how much memory is used by the model. As you can see DLRM benchmark requires 42Gb of RAM minimum to put all required data into memory. According to the original DLRM paper (<a href="https://arxiv.org/abs/1906.00091">link</a>) all this space is used to convert categorical features into vector representations to feed them into the neural net. In case when memory is not enough the kernel has to dump part of the data on disk (using memory swap). Given that disk is at least by an order of magnitude slower than RAM, no wonder low RAM instances perform so badly.</p><p>Now let us look at GPU utilization charts for DLRM benchmark across the whole process of model training.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bwo8SxwZSlPGgRX42CVekw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wi4jrzv_KfGt3XfPLcfEUg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nqwUhlFEK5lhJjEDvXuPqQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ABHRloQZ_dWd_SDq5iISTA.png" /></figure><p>You can clearly see that the more powerful GPU we use the less it is being utilized (see max gpu_utilisation at the bottom of each chart). This means that the system (or potentially the training algorithm) is not capable of providing GPU with enough work to keep it busy and it becomes even worse the beefier GPU we use.</p><p>Another interesting thing here is the chart for the M60. This is a perfect illustration of how lack of RAM looks like on GPU utilization charts. It can be illustrated even better if we compare GPU utilization charts for g4dn.2xlarge where SWAP space is actively used for DLRM benchmark with g4dn.4xlarge where all the data fits into memory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ZQVKTmq_Pp13llKB7nwWw.png" /><figcaption>g4dn.2xlarge (32Gb of RAM, not enough RAM, swap is actively used)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nqwUhlFEK5lhJjEDvXuPqQ.png" /><figcaption>g4dn.4xlarge (64Gb of RAM, swap is not used)</figcaption></figure><p>Systems have exactly the same GPUs, same CPU family (though different number of vCPUs, but this is discussed later), most probably sliced out of the same physical server. Lack of 10Gb of RAM contributed additional 40 minutes to the benchmark and reduced max GPU utilization.</p><p>Finally, let us check CPU utilization charts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W5oMOp78Cy6ciywKQHOP1g.png" /><figcaption>p2.xlarge (Nvidia K80, 4 vCPU, 61Gb of RAM)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MCUsfxswOolK2KiMXAU_kw.png" /><figcaption>p3.2xlarge (Nvidia V100, 8 vCPU, 61Gb of RAM)</figcaption></figure><p>You can see that only one core is used during the training (25% out of 4 vCPUs and 13% out of 8 vCPUs), i.e. all data pre-processing before sending it to GPU is done by a single core. Looks like we found another bottleneck.</p><p>Now we have a clear picture of what had happened with DLRM benchmark and why it performed so differently from the other two:</p><ul><li>Significant RAM requirements imposed a harsh handicap for instances with available RAM of less than required. If you look at instances with T4 GPU, the performance is higher for the higher amount of RAM (for the same GPU in the system)</li><li>Single-threaded training script implementation caused an additional bottleneck in data throughput making the number of vCPU in the system irrelevant and giving performance advantage to instances with CPUs showing the best single-core performance (in our case it is g4dn instances with more modern Xeon CPU than others)</li></ul><h3>Conclusion</h3><p>As you can see, even the simplest experiment can show that choosing an instance for training a Deep Learning model is not an obvious task even when you vary only a handful of instance features (like the number of vCPU, RAM, GPU architecture). The best instance will vary depending on the model architecture, code implementation, and amount of data you need to process.</p><p>We just barely scratched the surface of different aspects of the training infrastructure and how it can drive performance. We haven’t mentioned software stack at all (especially effects from different drivers and CUDA libraries) as well as distributed training on multi-GPU nodes and multi-node GPU clusters. Each of these topics deserves a separate post and, hopefully, will be covered in future parts of this series.</p><p>Egor Bykov</p><p>RocketCompute</p><p><a href="https://rocketcompute.com/">https://rocketcompute.com/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb2340a2a179" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>