PROJET AUTOBLOG


Planet-Libre

source: Planet-Libre

⇐ retour index

Francois Aichelbaum : My neighbor is noisy

vendredi 17 avril 2020 à 10:11

Don’t worry, I won’t discuss about my personal neighbors during the Covid-19 confinement. Lately, several of my customers had random and difficult-to-diagnose issues with their Cloud instances. As this is not related to a specific provider (some of them are using AWS while the others are using OVH Public Cloud), the root cause remains the same. Before going into more detail, I’ll give you a quick answer: their neighbors are noisy.

Protesters demonstrate against Donald Trump's presidency during the campaign trail in 2016 (by AP)
Protesters demonstrate against Donald Trump’s presidency during the campaign trail in 2016 (by AP)

Some quick reminder

Of course, you all know what the Cloud is, don’t you? So no, it’s not just your online storage, it’s not just your photo sharing. According to Wikipedia, as we’re discussing especially about Cloud Computing:

Cloud computing is the on-demand availability of computer system resources, especially data storage and computing power, without direct active management by the user. The term is generally used to describe data centers available to many users over the Internet. Large clouds, predominant today, often have functions distributed over multiple locations from central servers. If the connection to the user is relatively close, it may be designated an edge server.

Technically, those are virtual resources, easily manageable. By virtual resources, I mean a segmentation of the physical machine into different instances, dedicated to different customers. All of this at the scale of entire data centers.

The virtualization provided is based on usual market solutions (VMware, kvm, …) with potentially management overlay, or home-made solutions. So we talk about hypervisor for the host machine, and instance for the virtual machine.

Virtual Architecture
Virtual Architecture

The subject that interests us here is in itself neither new nor unknown to Cloud providers: they are all gradually releasing offers with “guaranteed performance” or “dedicated resources”. But why this?

Let’s go back to our virtual architecture: we see it as a segmentation of the host machine. Let’s replace our server by a cake and the instances by slices. So you can cut your cake into as many slices as you want, as long as there is cake. Therefore, to have more slices, you have to make them smaller. The same is theoretically true for virtualization.

Theoretically is the important word here: indeed, your providers bet that not all their customers were using all the resources allocated to their instances at the same time. They then decided to keep larger sizes for the instances than the host machine can handle. This is called overbooking.

Most of the time they are right. But the moments that make them wrong, are detrimental to you. This overbooking is predictable for you, customers, depending on the tariff of your provider: the cheaper it is, the higher the probability and the coefficient of overbooking. In addition to dedicated resources, some providers promise you an adequate infrastructure where storage would be the absolute key, through fully SSD-based storage. That’s good. But that’s not all.

Tip: I can’t repeat it enough to my various contacts: no the ‘Cloud’ is not cheap and not very quickly you cost an arm and a leg.

My noisy neighbor is named…

Because of this overbooking, whether it’s naturally related to the mass of instances, or specifically due to a single instance (our Noisy Neighbor), the effect is the same: you have at a given time, less resources available than expected.

The first question I hear most often then is:

But how do you detect it?

This is the most difficult part for you because, in the middle of a run, this can manifest itself in various ways, with obvious signals only in some rare cases. The other signals will simply be the direct consequences on your own service.

On Linux, top can provide one of the obvious signal. Have you ever wonder what is the st value at the end of the second line ? To be conciese, st, for “steal time”, is only relevant in virtualized environments (your Cloud setup here). It represents time when the CPU, from the host, was not available to the current instance: it was stolen. If you want more details about this steal time, you can refer to this tech paper from IBM.

A recommendation to all my customers, when we work on their monitoring platforms, is to include behavior change and comparison tests. Do latency levels suddenly increase? Does the system have hangs without being loaded, and without I/O?

Monitoring room in China
Monitoring room in China

On latency, for example, I remember one client where we worked on their content distribution services using nginx and doing some pretty advanced fine-tuning. From there, we launched tests and set up monitoring for each of the instances concerned. Very low latencies and high bandwidths, at all times, whatever the instance and the Cloud provider. Then one morning, this customer called me with a catastrophic call: all his European customers were complaining about abnormally long latencies when opening the hosted videos. The analysis tests went quite far:

While we’re testing in all directions, with no configuration changes other than juggling the nginx debugging options, the service returns to normal. The next day, around the same time, the same client contacts me again in a panic over the same subject. Same analysis, same result, same return to normal.

After (too) long exchanges with the support of this provider, we finally got the information: another instance was behaving abnormally and was consuming a good part of the machine resources, in particular the network part (speed and number of connections). You said peer-to-peer for last summer’s family videos?

My neighbor moves me

On the subject of the “hang system”, it’s a little more vicious and specific. A client in the video industry, does massive transcoding using ffmpeg. Part of the work is done via CPUs (the smaller resolutions) while the higher resolutions (HD / 4K in mind) are done via GPUs. The setup works well except that regularly some live streams are disturbed in an incomprehensible way, exclusively from the CPU instances. After a long analysis, the only common point of all its interruptions, both in terms of chronology of events, behaviour and logs, is the “bridle” of ffmpeg to a single CPU thread actually used.

Delivery guy collecting a package
Delivery guy collecting a package

We therefore focused our analytical work on understanding what could cause this behavioural change on the part of ffmpeg. After different stress-tests of the instances, only one allowed to reproduce the behavior: the I/O stress-tests at the kernel level, causing system hangs.

At that time, my client remembered having vaguely seen some automated storage migration emails passing by the concerned provider, at the same time as the famous interruptions.

So yes, another important reminder:

Tip: Theoretically transparent host or storage moves are rarely transparent in practice.

Let me be!

The next question, they usually ask, is:

But how do you prevent it?

It all depends on your budget!

Large instance consumers allow themselves to test an instance when spawning it to make sure there are no noisy neighbors from the start. Tests are typically stress-tests specific to each instance template used, the results of which are compared to the average values of the instances considered “valid”. Automation of your entire infrastructure is key here.

This pre-use stage of the instance can quickly become expensive: some people have been surprised to see dozens of attempts before having a viable instance. Time being money in the Cloud world, …

A dog hunting
A dog hunting

Most people implement corrective solutions. The monitoring (see above) is then interfaced with the automation tools and will restart a new instance to replace the one detected as disturbed.

This is the least expensive but can have two impacts depending on your service/infrastructure:

Another solution would be to host your services on dedicated infrastructure when it makes sense, and consider Cloud services as overflow solutions.

Do you agree?

I remember an article explaining that it was the fault of your application and not of cloud hosting. We could go back to the eternal war between Dev and Ops, but these articles usually completely overlook the monitoring aspects and therefore the observability of what is going on. Their point of view is therefore valid, but not gospel.

On your side, have you ever been through these setbacks? How did you react?

Gravatar de Francois Aichelbaum
Original post of Francois Aichelbaum.Votez pour ce billet sur Planet Libre.

genma : Yunohost - Un serveur VPN ?

vendredi 17 avril 2020 à 09:00

Quand on fait tourner Yunohost sur un serveur VPS, on en vient à se demander si on ne pourrait pas aussi utiliser ce serveur comme serveur VPN, pour avoir une connexion sécurisée par laquelle passer pour surfer quand on est en situation de nomadisme.

Openvpn

L'application Openvpn pour Yunohost n'est plus maintenue depuis des années et n'est plus fonctionnelle. J'ai regardé un peu les forums de Yunohost, mais n'est pas chercher à aller plus loin.

J'ai donc cherché comment installer Openvpn de façon facilité directement sur le serveur. (Yunohost reposant sur Debian, ça reste du Debian). J'ai donc trouvé assez facilement le script de Nyr, https://github.com/Nyr/openvpn-install

OpenVPN road warrior installer for Debian, Ubuntu and CentOS. This script will let you setup your own VPN server in no more than a minute, even if you haven't used OpenVPN before. It has been designed to be as unobtrusive and universal as possible.

Donc la promesse est d'installer Openvpn très facilement.

Avant de le lancer, j'ai tout de même pris le temps de lire et de comprendre ce que faisait le script. C'est du shell et pour un administrateur système ayant quelques notions de base, cela est assez compréhensible. Une fois lancé, c'est effectivement très rapide.

Un fichier ".ovpn" permettant pour le client est alors téléchargeable. Il suffit d'importer ce fichier dans son client VPN (dans le Network Manager sous Ubuntu par exemple) pour pouvoir alors utiliser sa connexion via le serveur OpenVPN.

Au niveau de Yunohost, cela ne change pas grand chose si ce n'est que le port ouvert pour le serveur VPN apparaît dans les interfaces d'administrations webs du firewall. Mais le service n'apparaît pas dans l'interface d'administration, vu que ce n'est pas un service installé via Yunohost.

Wireguard ?

Wireguard est un VPN dont on entend beaucoup parlé en ce moment. J'ai fait quelques tests d'installation, mais comme le logiciel évolue vite, n'est disponible que dans les dépôts SID de Debian et que mon serveur Yunohost est sous Debian 9, je n'ai pas cherché à aller plus loin. Ce sera le sujet d'un autre billet de blog un peu plus tard, quand j'aurai fait de réelles expérimentations.

Gravatar de genma
Original post of genma.Votez pour ce billet sur Planet Libre.

antistress : Au revoir Debian, bonjour Debian avec Flatpak (mise à jour)

mercredi 15 avril 2020 à 16:41

Des rangées de cartons de produits plats d'un magasin Ikea

J'avais évoqué, à l'occasion de la sortie de Debian 9 Stretch, la combinaison Debian Stable + Flatpak, que je déclarais gagnante sur le papier… Il est temps de passer à la pratique !

Ce billet, initialement rédigé le 10 juin 2019, a été refondu le 15 avril 2020 pour y intégrer les récents développements logiciels (corrections de bogues, nouveaux paquets Flatpak…).

Sommaire

  1. Pourquoi Flatpak ?
  2. Comment Flatpak ?
  3. Compte-rendu de mon expérience de flatpak-isation de ma Debian Testing

Pourquoi Flatpak ?

Déjà précisons que ma machine tourne sous Debian GNU/Linux Testing avec GNOME-Wayland.

Je vois plusieurs avantages à Flatpak, que je vous présente par ordre d'intérêt décroissant :

Les deux derniers points ne concernent toutefois pleinement que ceux des Flatpak qui ont été générés par les développeurs de l'application eux-mêmes, nous y reviendrons.

J'ai eu l'occasion de me frotter à Flatpak pour la première fois lors de mes tests de la version de développement de Pitivi (logiciel de montage vidéo pour GNOME) pour lesquels la version Flatpak du logiciel est recommandée (notamment parce que, étant générée par les développeurs du logiciel eux-mêmes, elle permet à l'utilisateur de faire tourner exactement la même version que les développeurs, ce qui facilite le débogage).

Comment Flatpak ?

Vous avez le choix entre la ligne de commande ou une interface graphique.

Pour ce qui est de comprendre les bases du fonctionnement de Flatpak en ligne de commande, je vous renvoie aux premières pages de ce manuel, et aux nombreux tutos disponibles sur la Toile.

Si vous préférez une interface graphique, la logithèque de GNOME vous permettra d'installer de manière transparente aussi bien de paquets .deb que de paquets Flatpak (sous Debian, installer pour cela le paquet gnome-software-plugin-flatpak).

Pour certains paquets Flatpak installés via la Logithèque de GNOME, l'interface était restée en anglais. J'ai donc dû installer les traductions du logiciel en ligne de commande (ajouter « .Locale » à la fin de l'identifiant du logiciel pour installer ses traductions. Le problème serait réglé avec les versions 3.32 ou suivantes de la Logithèque.

Il existe un dépôt central, Flathub, qui héberge un grand nombre d'applications. C'est d'ailleurs là-bas, à la page du logiciel concerné, que je récupère l'identifiant Flatpak des logiciels qui m’intéressent (l'identifiant peut aussi être récupéré avec la commande $ flatpak search nom-de-l'application). Attention, toutes les applications qui y figurent ne sont pas libres. C'est la raison pour laquelle, sur un certain nombre de distributions, ce dépôt n'est pas configuré par défaut. Il faudra donc l'ajouter ainsi : $ flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo.

Au sujet de Flathub, j'ai découvert que certains paquets Flatpak sont préparés par les développeurs de l'application (directement du producteur au consommateur, pourrait-on écrire), comme LibreOffice, GIMP, Pitivi ou encore Firefox, tandis que d'autres, comme Audacity, Avidemux, Thunderbird, Transmission ou VLC media player sont générés indépendamment de leurs développeurs. Dans tous les cas, il ne s'agit pas des développeurs de votre distribution (d'où le titre de ce billet), ce qui est un changement de paradigme dans la distribution des logiciels sous GNU/Linux.

Compte-rendu de mon expérience de flatpak-isation de ma Debian Testing

Sans plus attendre, voici les paquets deb que j'ai choisi de remplacer par leur équivalent Flatpak, et les éventuels problèmes auxquels j'ai été confronté (en gras, les plus gênants).

Les Flatpak qui sont générés par les développeurs de l'application eux-mêmes figurent en vert et sont affublés de l'étiquette « [Flatpak officiel] ».

Toutes ces applications peuvent êtres installées dans leur version stable en une ligne de commande : $ flatpak install flathub org.audacityteam.Audacity org.avidemux.Avidemux com.calibre_ebook.calibre org.gnome.DejaDup org.gnome.Evince org.gnome.Extensions org.filezillaproject.Filezilla org.mozilla.firefox org.frozen_bubble.frozen-bubble org.gimp.GIMP org.libreoffice.LibreOffice org.gnome.Boxes org.pitivi.Pitivi org.gnome.Rhythmbox3 net.scribus.Scribus org.gnome.Shotwell org.mozilla.Thunderbird com.transmissionbt.Transmission org.videolan.VLC.

À la date du 15 avril 2020, il n'y a donc guère que Evince, Firefox et Rhythmbox que j'utilise encore dans leurs versions .deb (pour les raisons sus-mentionnées).

Par ailleurs, certains logiciels que j'utilise ne sont pas (encore ?) sur Flathub : Brasero, DevedeNG, Imagination, Liferea, MComix, GNOME Web. On me fait remarquer que Chromium n'y est pas non plus. Notez que, par contre, plein de jeux ou d'émulateurs (ScummVM…), libres ou non, y sont.

En ce qui me concerne, je ne vois que des avantages à utiliser les versions Flatpak de mes logiciels usuels. Et pour celles qui ne fonctionnent pas correctement, et bien, il suffit de rester sur la version fournie par votre distribution en attendant que le problème soit réglé !


Remarque finale : à l'occasion de la stabilisation des versions natives Wayland de Thunderbird et Firefox, j'ai tenté d'activer la fonctionnalité expérimentale « XWayland à la demande » introduite avec GNOME 3.34 puisque mes applications quotidiennes (Firefox, Thunderbird, Liferea), ainsi que la plupart des autres, n'ont plus besoin de XWayland pour fonctionner. Mais je suis confronté à ce bogue impliquant Flatpak qui m'a contraint à désactiver ladite fonctionnalité pour le moment.

Gravatar de antistress
Original post of antistress.Votez pour ce billet sur Planet Libre.

Articles similaires

Marthym : Curriculum Vitae, le bon, la brute et le truand

mercredi 15 avril 2020 à 02:00
En ce moment, je suis en télé-travail et ma société reste ouverte. On est même en phase de recrutement. On recrute plusieurs profils, des développeurs fullstack, un architecte front et un sysadmin. Tout ça pour dire que je vois passer beaucoup de CVs. Et je dois dire, sur la quantité que je vois passer, je suis affligé de voir le peu de soin qui est donné aux candidatures. Comme j’ai besoin de laisser sortir un peu de ma frustration de voir autant de CV si peu soigner, je partage ça ici.

Gravatar de Marthym
Original post of Marthym.Votez pour ce billet sur Planet Libre.

Marthym : Curriculum Vitae, le bon, la brute et le truant

mercredi 15 avril 2020 à 02:00
En ce moment, je suis en télé-travail et ma société reste ouverte. On est même en phase de recrutement. On recrute plusieurs profils, des développeurs fullstack, un architecte front et un sysadmin. Tout ça pour dire que je vois passer beaucoup de CVs. Et je dois dire, sur la quantité que je vois passer, je suis affligé de voir le peu de soin qui est donné aux candidatures. Comme j’ai besoin de laisser sortir un peu de ma frustration de voir autant de CV si peu soigner, je partage ça ici.

Gravatar de Marthym
Original post of Marthym.Votez pour ce billet sur Planet Libre.