Skip to content

Commit

Permalink
Add green it article
Browse files Browse the repository at this point in the history
  • Loading branch information
princess-entrapta committed Oct 27, 2023
1 parent 819c9c5 commit 627bdfa
Show file tree
Hide file tree
Showing 11 changed files with 107 additions and 7 deletions.
53 changes: 53 additions & 0 deletions content/posts/green-it.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: "Green It"
date: 2023-10-27T18:53:49+02:00
draft: false
toc: false
images:
tags:
- untagged
---

# Some figures about carbon footprint

- Electronic devices and other IT related activity represent 4% of the total global carbon footprint, a figure that is growing every year due to sector growth.
- If the proportion may look small, it actually is important regarding other industry sectors; automobile sector, known for its pollution side effects, in its whole is for example estimated weighting roughly 6 to 9% of GES. The entiere plane fleet is 2%.
- A computer (laptop or desktop) will during the course of its life emit a bit less than 100kg of CO2 eq. per year, cost which is between 70-90% manufacturing carbon footprint and the remaining in electricity costs.
- Among e-waste, monitors represent a significant volume. E-waste is difficult to recycle, and may under some circumstances become an environmental hazard.

# Misconceptions around green IT

## Latest model efficiency compensates for replamement

This is trivially wrong based on the above facts. Even 10 years ago, e-devices were for most part energetically sober. However, their manufacturing and disposal are polluting processes.
Besides, unlike it could be the case for a car, having more efficiency at hand does not necessarily result in less consumption. If anything, more powerful model create new uses, creating more consumption.

## Some programming languages are less green than others

Some people pointed out because Python is several tenths times less efficient than C, it is thenth times less green than C.
While not completely wrong, this is simplistic, because only measuring runtime power consumption. Programs written in Python could take less time to write, thus possibly compensating.
Resources on server side are rarely optimised below a certain threshold, so if two programs take one same vps instance, they are polluting the same.
Finally, providing services more efficiently power-wise might not decrease overall consuption for tech, if it drives price down it may in turn increase demand.

## We need to sober up on emails

This is among all conceptions I heard one of the most strange one. SMTP traffic is perhaps 1% of the world's internet traffic. A mail is a few KB. A single video on yt will be thousands of times more costy.
Yet, this is a misconception I often have seen vehiculed by some corporations, encouraging their employees to "green gestures" such as deleting their email. But that's a drop in the ocean

# Positively changing actions

Over the last few years, there have been a massive schift in our usage of digital devices.

- We use videos a ton, for everything
- We spend a lot more time gaming
- We get helped more and more by new content generators and smart assistants

These 3 usages are heavily impacting traffic and waste, each in a different manner:

- Netflix, YouTube, Tiktok, Amazon prime, Disney +, cumulate almost 40% of the global internet traffic, with massive repercussions on the usage of servers, routers etc. since video content is heavy
- Gaming represent a fair portion of traffic, but more importantly have become an increasingly common reason to renew hardware for more powerful versions
- Content generators are sober on their apparent side, but bots like ChatGpt requires absolutely massive backend infrastructure to ingest and process a lot of data. No less than 240 CO2 tons (500 computer manufacturing equivalent) are thrown every year in the training of the artificial intelligence. And this is becoming ordinary business...

# Conclusion

Concerns about electronic pollution is legitimate. But it would be foolish to believe we could stop it by writing more efficient programs. We however can take responsibility in reducing the entertainment usage of the digital tool, and use data-hungry AI models with measure.
2 changes: 1 addition & 1 deletion public/index.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Diane M's blog</title><link>https://princess-entrapta.github.io/blog/</link><description>Recent content on Diane M's blog</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.</copyright><lastBuildDate>Wed, 25 Oct 2023 12:56:00 +0200</lastBuildDate><atom:link href="https://princess-entrapta.github.io/blog/index.xml" rel="self" type="application/rss+xml"/><item><title>Dockerfile for small Rust images (with dependency build caching)</title><link>https://princess-entrapta.github.io/blog/posts/build-rust-dockerfile/</link><pubDate>Wed, 25 Oct 2023 12:56:00 +0200</pubDate><guid>https://princess-entrapta.github.io/blog/posts/build-rust-dockerfile/</guid><description>Introduction After reading multiple tutorials for building docker images and optimize them, I compiled an optimized Dockerfile that can:
<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Diane M's blog</title><link>https://princess-entrapta.github.io/blog/</link><description>Recent content on Diane M's blog</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><copyright>This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.</copyright><lastBuildDate>Fri, 27 Oct 2023 18:53:49 +0200</lastBuildDate><atom:link href="https://princess-entrapta.github.io/blog/index.xml" rel="self" type="application/rss+xml"/><item><title>Green It</title><link>https://princess-entrapta.github.io/blog/posts/green-it/</link><pubDate>Fri, 27 Oct 2023 18:53:49 +0200</pubDate><guid>https://princess-entrapta.github.io/blog/posts/green-it/</guid><description>Some figures about carbon footprint Electronic devices and other IT related activity represent 4% of the total global carbon footprint, a figure that is growing every year due to sector growth. If the proportion may look small, it actually is important regarding other industry sectors; automobile sector, known for its pollution side effects, in its whole is for example estimated weighting roughly 6 to 9% of GES. The entiere plane fleet is 2%.</description></item><item><title>Dockerfile for small Rust images (with dependency build caching)</title><link>https://princess-entrapta.github.io/blog/posts/build-rust-dockerfile/</link><pubDate>Wed, 25 Oct 2023 12:56:00 +0200</pubDate><guid>https://princess-entrapta.github.io/blog/posts/build-rust-dockerfile/</guid><description>Introduction After reading multiple tutorials for building docker images and optimize them, I compiled an optimized Dockerfile that can:
Have final images that are small, in the 50MB range Benefit from docker caching, allowing to have build times under 10s if you don&amp;rsquo;t change dependencies We will assume here you start with a project my_app you already have or have created with cargo new.
Setting up We use this docker file.</description></item><item><title>About Me</title><link>https://princess-entrapta.github.io/blog/about-me/</link><pubDate>Wed, 25 Oct 2023 00:00:00 +0000</pubDate><guid>https://princess-entrapta.github.io/blog/about-me/</guid><description>Coming soon</description></item></channel></rss>
2 changes: 1 addition & 1 deletion public/posts/build-rust-dockerfile/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@
</span></span><span class=line><span class=cl><span class=na>version</span> <span class=o>=</span> <span class=s>&#34;0.3&#34;</span>
</span></span></code></pre></div><p>You can learn more about what is jemalloc <a href=https://jemalloc.net/>here</a></p><p>If you use things that are dependent of ssl, such as reqwest, you might also need to tweak the dependency to include <code>rust-tls</code>:</p><div class=highlight><pre tabindex=0 class=chroma><code class=language-ini data-lang=ini><span class=line><span class=cl><span class=na>reqwest</span> <span class=o>=</span> <span class=s>{version = &#34;0.11&#34;, default-features = false, features = [&#34;json&#34;, &#34;rustls-tls&#34;] }</span>
</span></span></code></pre></div><h2 id=running>Running<a href=#running class=anchor aria-hidden=true><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 7h3a5 5 0 015 5 5 5 0 01-5 5h-3m-6 0H6a5 5 0 01-5-5 5 5 0 015-5h3"/><line x1="8" y1="12" x2="16" y2="12"/></svg></a></h2><p>Try to <code>docker build</code> your image. If it is successful, try to <code>docker run</code> the obtained container. It should execute your binary.</p><p>You notice your first <code>docker build</code> was probably long, several minutes long perhaps.</p><p>Try to modify your sources, then <code>docker build</code> again. You should notice the build to be significantly faster.</p><p>Use <code>docker images</code> and inspect image size. Smaller images are faster to push and pull over network, they also cost less to store.</p><h1 id=conclusion>Conclusion<a href=#conclusion class=anchor aria-hidden=true><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 7h3a5 5 0 015 5 5 5 0 01-5 5h-3m-6 0H6a5 5 0 01-5-5 5 5 0 015-5h3"/><line x1="8" y1="12" x2="16" y2="12"/></svg></a></h1><p>We learned to make a multi-stage build to produce small docker images for Rust, and use the best of docker caching to avoid a costy rebuild
of dependencies at every source change.</p><h2 id=thanks-to--further-reading>Thanks to / further reading<a href=#thanks-to--further-reading class=anchor aria-hidden=true><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 7h3a5 5 0 015 5 5 5 0 01-5 5h-3m-6 0H6a5 5 0 01-5-5 5 5 0 015-5h3"/><line x1="8" y1="12" x2="16" y2="12"/></svg></a></h2><ul><li><a href=https://docs.docker.com/build/building/multi-stage/>Multi stage build for docker</a></li><li><a href=https://hackmd.io/@kobzol/S17NS71bh>Notes from cargo team on dependency caching</a></li></ul></div><hr class=post-end><footer class=post-info><p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6A2 2 0 004 4v16a2 2 0 002 2h12a2 2 0 002-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>527 Words</p><p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-calendar"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>2023-10-25 12:56 +0200</p></footer></article><div class="post-nav thin"></div><div id=comments class=thin></div></main><footer id=site-footer class="section-inner thin animated fadeIn faster"><p>&copy; 2023 <a href=https://princess-entrapta.github.io/blog>Diane M.</a> &#183; <a href=https://creativecommons.org/publicdomain/zero/1.0/ target=_blank rel=noopener>CC0 License</a></p><p>Made with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a> &#183; Theme <a href=https://github.com/Track3/hermit target=_blank rel=noopener>Hermit</a> &#183; <a href=https://princess-entrapta.github.io/blog/posts/index.xml target=_blank title=rss><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 019 9"/><path d="M4 4a16 16 0 0116 16"/><circle cx="5" cy="19" r="1"/></svg></a></p></footer><script src=https://princess-entrapta.github.io/blog/js/bundle.min.580988ed2982bcbb74a1773c7abea97b43e4c43b9324e10cda0813ec6ec4bb67.js integrity="sha256-WAmI7SmCvLt0oXc8er6pe0PkxDuTJOEM2ggT7G7Eu2c=" crossorigin=anonymous></script></body></html>
of dependencies at every source change.</p><h2 id=thanks-to--further-reading>Thanks to / further reading<a href=#thanks-to--further-reading class=anchor aria-hidden=true><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 7h3a5 5 0 015 5 5 5 0 01-5 5h-3m-6 0H6a5 5 0 01-5-5 5 5 0 015-5h3"/><line x1="8" y1="12" x2="16" y2="12"/></svg></a></h2><ul><li><a href=https://docs.docker.com/build/building/multi-stage/>Multi stage build for docker</a></li><li><a href=https://hackmd.io/@kobzol/S17NS71bh>Notes from cargo team on dependency caching</a></li></ul></div><hr class=post-end><footer class=post-info><p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6A2 2 0 004 4v16a2 2 0 002 2h12a2 2 0 002-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/><polyline points="10 9 9 9 8 9"/></svg>527 Words</p><p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-calendar"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>2023-10-25 12:56 +0200</p></footer></article><div class="post-nav thin"><a class=next-post href=https://princess-entrapta.github.io/blog/posts/green-it/><span class=post-nav-label><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><line x1="19" y1="12" x2="5" y2="12"/><polyline points="12 19 5 12 12 5"/></svg>&nbsp;Newer</span><br><span>Green It</span></a></div><div id=comments class=thin></div></main><footer id=site-footer class="section-inner thin animated fadeIn faster"><p>&copy; 2023 <a href=https://princess-entrapta.github.io/blog>Diane M.</a> &#183; <a href=https://creativecommons.org/publicdomain/zero/1.0/ target=_blank rel=noopener>CC0 License</a></p><p>Made with <a href=https://gohugo.io/ target=_blank rel=noopener>Hugo</a> &#183; Theme <a href=https://github.com/Track3/hermit target=_blank rel=noopener>Hermit</a> &#183; <a href=https://princess-entrapta.github.io/blog/posts/index.xml target=_blank title=rss><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentcolor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 019 9"/><path d="M4 4a16 16 0 0116 16"/><circle cx="5" cy="19" r="1"/></svg></a></p></footer><script src=https://princess-entrapta.github.io/blog/js/bundle.min.580988ed2982bcbb74a1773c7abea97b43e4c43b9324e10cda0813ec6ec4bb67.js integrity="sha256-WAmI7SmCvLt0oXc8er6pe0PkxDuTJOEM2ggT7G7Eu2c=" crossorigin=anonymous></script></body></html>
Loading

0 comments on commit 627bdfa

Please sign in to comment.