PROJET AUTOBLOG


Shaarli - Les discussions de Shaarli

Archivé

Site original : Shaarli - Les discussions de Shaarli du 23/07/2013

⇐ retour index

Bases d’ergo : notions à connaître et à appliquer | Margaux l'ergo

mercredi 12 août 2015 à 15:26
Les Liens de Memiks
Règles d'ergonomie à appliquer sur les interfaces web.
(Permalink)
Serendipity
Un listing de notions et bonnes pratiques à appliquer en ergo web.
(Permalink)

No, You Really Can’t (Mary Ann Davidson Blog)

mercredi 12 août 2015 à 15:23
Nekoblog.org :: Marque-pages
« Oracle *really* hates both reverse engineers and bug bounties » (https://twitter.com/mikko/status/631050032293236736)
Une autre sauvegarde du txt > http://pastebin.com/raw.php?i=urN8Vyv1
(via https://twitter.com/pbeyssac/status/631057167576137728)
(Permalink)

OBD-II PIDs - Wikipedia, the free encyclopedia

mercredi 12 août 2015 à 15:11
Links Lounge
(Permalink)

CAN Hacking: Protocols | Hackaday

mercredi 12 août 2015 à 15:11
Links Lounge
(Permalink)

OBD2 Dongle français vulnérable, une Corvette piratée à distance en live | UnderNews

mercredi 12 août 2015 à 15:08
Liens en vrac de SimonLefort
-Tiens, si on connectait un truc sur le bus de terrain de notre voiture pour envoyer des infos vers un équipement mobile ?
-Oh oui, quelle bonne idée !
-Et puis on laissera des failles hein, sinon c'est pas drôle...
-Gnarkgnark!

:-|
(Permalink)

Le nouveau Nouvel Hollywood — . punch-drunk pop .

mercredi 12 août 2015 à 15:00
Nekoblog.org :: Marque-pages
Un long texte sur l'industrie du "cinéma fast-food" et la fin des réalisateurs un tant soit peu auteurs.
« La solution est donc de se rendre compte qu’aller voir un film revient à voter pour tout le processus qui l’a fait arriver à l’écran »
(via https://twitter.com/FlorencePorcel/status/631436069045673984)
(Permalink)

Comment se (re)mettre à la lecture

mercredi 12 août 2015 à 14:39
Nekoblog.org :: Marque-pages
(via https://twitter.com/NeilJomunsi/status/631389350031396864)
(Permalink)

Alphabet

mercredi 12 août 2015 à 14:23
ZeShaarli
L'adresse de la holding de google : https://abc.xyz.
Tiens je ne savais pas qu'il y avait une extension .xyz.
(Permalink)

La route tue bien plus qu'on ne croit

mercredi 12 août 2015 à 14:17
ZeShaarli
23 crashs par jour ! 23 punaise.
(Permalink)

Coding for SSDs – Part 6: A Summary – What every programmer should know about solid-state drives | Code Capsule

mercredi 12 août 2015 à 14:06
palkeo - liens
Basics
1. Memory cell types

A solid-state drives (SSD) is a flash-memory based data storage device. Bits are stored into cells, which exist in three types: 1 bit per cell (single level cell, SLC), 2 bits per cell (multiple level cell, MLC), 3 bits per cell (triple-level cell, TLC).

See also: Section 1.1
2. Limited lifespan

Each cell has a maximum number of P/E cycles (Program/Erase), after which the cell is considered defective. This means that NAND-flash memory wears off and has a limited lifespan.

See also: Section 1.1
3. Benchmarking is hard

Testers are humans, therefore not all benchmarks are exempt of errors. Be careful when reading the benchmarks from manufacturers or third parties, and use multiple sources before trusting any numbers. Whenever possible, run your own in-house benchmarking using the specific workload of your system, along with the specific SSD model that you want to use. Finally, make sure you look at the performance metrics that matter most for the system at hand.

See also: Sections 2.2 and 2.3
Pages and blocks
4. NAND-flash pages and blocks

Cells are grouped into a grid, called a block, and blocks are grouped into planes. The smallest unit through which a block can be read or written is a page. Pages cannot be erased individually, only whole blocks can be erased. The size of a NAND-flash page size can vary, and most drive have pages of size 2 KB, 4 KB, 8 KB or 16 KB. Most SSDs have blocks of 128 or 256 pages, which means that the size of a block can vary between 256 KB and 4 MB. For example, the Samsung SSD 840 EVO has blocks of size 2048 KB, and each block contains 256 pages of 8 KB each.

See also: Section 3.2
5. Reads are aligned on page size

It is not possible to read less than one page at once. One can of course only request just one byte from the operating system, but a full page will be retrieved in the SSD, forcing a lot more data to be read than necessary.

See also: Section 3.2
6. Writes are aligned on page size

When writing to an SSD, writes happen by increments of the page size. So even if a write operation affects only one byte, a whole page will be written anyway. Writing more data than necessary is known as write amplification. Writing to a page is also called “to program” a page.

See also: Section 3.2
7. Pages cannot be overwritten

A NAND-flash page can be written to only if it is in the “free” state. When data is changed, the content of the page is copied into an internal register, the data is updated, and the new version is stored in a “free” page, an operation called “read-modify-write”. The data is not updated in-place, as the “free” page is a different page than the page that originally contained the data. Once the data is persisted to the drive, the original page is marked as being “stale”, and will remain as such until it is erased.

See also: Section 3.2
8. Erases are aligned on block size

Pages cannot be overwritten, and once they become stale, the only way to make them free again is to erase them. However, it is not possible to erase individual pages, and it is only possible to erase whole blocks at once.

See also: Section 3.2
SSD controller and internals
9. Flash Translation Layer

The Flash Translation Layer (FTL) is a component of the SSD controller which maps Logical Block Addresses (LBA) from the host to Physical Block Addresses (PBA) on the drive. Most recent drives implement an approach called “hybrid log-block mapping” or one of its derivatives, which works in a way that is similar to log-structured file systems. This allows random writes to be handled like sequential writes.

See also: Section 4.2
10. Internal parallelism

Internally, several levels of parallelism allow to write to several blocks at once into different NAND-flash chips, to what is called a “clustered block”.

See also: Section 6
11. Wear leveling

Because NAND-flash cells are wearing off, one of the main goals of the FTL is to distribute the work among cells as evenly as possible so that blocks will reach their P/E cycle limit and wear off at the same time.

See also: Section 3.4
12. Garbage collection

The garbage collection process in the SSD controller ensures that “stale” pages are erased and restored into a “free” state so that the incoming write commands can be processed.

See also: Section 4.4
13. Background operations can affect foreground operations

Background operations such as garbage collection can impact negatively on foreground operations from the host, especially in the case of a sustained workload of small random writes.

See also: Section 4.4
Access patterns
14. Never write less than a page

Avoid writing chunks of data that are below the size of a NAND-flash page to minimize write amplification and prevent read-modify-write operations. The largest size for a page at the moment is 16 KB, therefore it is the value that should be used by default. This size depends on the SSD models and you may need to increase it in the future as SSDs improve.

See also: Sections 3.2 and 3.3

15. Align writes

Align writes on the page size, and write chunks of data that are multiple of the page size.

See also: Sections 3.2 and 3.3
16. Buffer small writes

To maximize throughput, whenever possible keep small writes into a buffer in RAM and when the buffer is full, perform a single large write to batch all the small writes.

See also: Sections 3.2 and 3.3
17. To improve the read performance, write related data together

Read performance is a consequence of the write pattern. When a large chunk of data is written at once, it is spread across separate NAND-flash chips. Thus you should write related data in the same page, block, or clustered block, so it can later be read faster with a single I/O request, by taking advantage of the internal parallelism.

See also: Section 7.3
18. Separate read and write requests

A workload made of a mix of small interleaved reads and writes will prevent the internal caching and readahead mechanism to work properly, and will cause the throughput to drop. It is best to avoid simultaneous reads and writes, and perform them one after the other in large chunks, preferably of the size of the clustered block. For example, if 1000 files have to be updated, you could iterate over the files, doing a read and write on a file and then moving to the next file, but that would be slow. It would be better to reads all 1000 files at once and then write back to those 1000 files at once.

See also: Section 7.4
19. Invalidate obsolete data in batch

When some data is no longer needed or need to be deleted, it is better to wait and invalidate it in a large batches in a single operation. This will allow the garbage collector process to handle larger areas at once and will help minimizing internal fragmentation.

See also: Section 4.4
20. Random writes are not always slower than sequential writes

If the writes are small (i.e. below the size of the clustered block), then random writes are slower than sequential writes.
If writes are both multiple of and aligned to the size of a clustered block, the random writes will use all the available levels of internal parallelism, and will perform just as well as sequential writes. For most drives, the clustered block has a size of 16 MB or 32 MB, therefore it is safe to use 32 MB.

See also: Section 7.2
21. A large single-threaded read is better than many small concurrent reads

Concurrent random reads cannot fully make use of the readahead mechanism. In addition, multiple Logical Block Addresses may end up on the same chip, not taking advantage or of the internal parallelism. A large read operation will access sequential addresses and will therefore be able to use the readahead buffer if present, and use the internal parallelism. Consequently if the use case allows it, it is better to issue a large read request.

See also: Section 7.3
22. A large single-threaded write is better than many small concurrent writes

A large single-threaded write request offers the same throughput as many small concurrent writes, however in terms of latency, a large single write has a better response time than concurrent writes. Therefore, whenever possible, it is best to perform single-threaded large writes.

See also: Section 7.2
23. When the writes are small and cannot be grouped or buffered, multi-threading is beneficial

Many concurrent small write requests will offer a better throughput than a single small write request. So if the I/O is small and cannot be batched, it is better to use multiple threads.

See also: Section 7.2
24. Split cold and hot data

Hot data is data that changes frequently, and cold data is data that changes infrequently. If some hot data is stored in the same page as some cold data, the cold data will be copied along every time the hot data is updated in a read-modify-write operation, and will be moved along during garbage collection for wear leveling. Splitting cold and hot data as much as possible into separate pages will make the job of the garbage collector easier.

See also: Section 4.4
25. Buffer hot data

Extremely hot data and other high-change metadata should be buffered as much as possible and written to the drive as infrequently as possible.

See also: Section 4.4
System optimizations
26. PCI Express and SAS are faster than SATA

The two main host interfaces offered by manufacturers are SATA 3.0 (550 MB/s) and PCI Express 3.0 (1 GB/s per lane, using multiple lanes). Serial Attached SCSI (SAS) is also available for enterprise SSDs. In their latest versions, PCI Express and SAS are faster than SATA, but they are also more expensive.

See also: Section 2.1
27. Over-provisioning is useful for wear leveling and performance

A drive can be over-provisioned simply by formatting it to a logical partition capacity smaller than the maximum physical capacity. The remaining space, invisible to the user, will still be visible and used by the SSD controller. Over-provisioning helps the wear leveling mechanisms to cope with the inherent limited lifespan of NAND-flash cells. For workloads in which writes are not so heavy, 10% to 15% of over-provisioning is enough. For workloads of sustained random writes, keeping up to 25% of over-provisioning will improve performance. The over-provisioning will act as a buffer of NAND-flash blocks, helping the garbage collection process to absorb peaks of writes.

See also: Section 5.2
28. 
Enable the TRIM command

Make sure your kernel and filesystem support the TRIM command. The TRIM command notifies the SSD controller when a block is deleted. The garbage collection process can then erase blocks in background during idle times, preparing the drive to face large writes workloads.

See also: Section 5.1
29. Align the partition

To ensure that logical writes are truly aligned to the physical memory, you must align the partition to the NAND-flash page size of the drive.

See also: Section 8.1
Conclusion

This summary concludes the “Coding for SSDs” article series. I hope that I was able to convey in an understandable manner what I have learned during my personal research over solid-state drives.

If after reading this series of articles you want to go more in-depth about SSDs, a good first step would be to read some of the publications and articles linked in the reference sections of Part 2 to 5.

Another great resource is the FAST conference (the USENIX Conference on File and Storage Technologies). A lot of excellent research is being presented there every year. I highly recommend their website, a good starting point being the videos and publications for FAST 2013.

[sed] supprimer les espaces et les tabulations

mercredi 12 août 2015 à 14:03
Liens en vrac de SimonLefort
J'ai un fichier CSV contenant deux colonnes, séparées par une virgule. Je veux supprimer tous les espaces et les tabulations sur ce fichier.

| ========
$ sed "s/[ \t]//g" fichier-original.csv >> fichier-sortie.csv
| ========
(Permalink)

Quelques citations intéressantes

mercredi 12 août 2015 à 13:59
shaarli de disanv pareañ
Sous le coude.
   « Un peuple prêt à sacrifier un peu de liberté pour un peu de sécurité ne mérite ni l'une ni l'autre, et finit par perdre les deux. »



—  Benjamin Franklin
[réf. nécessaire]

   « L'adversaire d'une vraie liberté est un désir excessif de sécurité. »



—  Jean de La Fontaine
[réf. nécessaire]

   « Marchander sa liberté contre de la sécurité, c'est un pacte diabolique. Une fois la transaction signée, on n'a plus ni liberté ni sécurité. »



— Gerry Spence (avocat américain)

   « La  droite  dit : la première liberté, c'est la sécurité. Nous disons au contraire : la première sécurité, c'est la liberté »



—  Pierre Mauroy  en 1981 1 .

   « Le président de la république, il est très gentil, parce qu'il nous laisse des libertés. Et tout le monde sait très bien que s'il nous les retirait, personne dirait rien. »



—  Coluche
(Permalink)

CredCrack - Testez la sécurité de votre réseau Windows - Korben

mercredi 12 août 2015 à 13:42
Liens en vrac de SimonLefort
Pas encore eu le temps de tester le truc, mais je suis curieux de voir ce que ça pourrait donner.

Lien du projet sur Github : https://github.com/gojhonny/CredCrack
(Permalink)

MySQL replication primer: pt-table-checksum, pt-table-sync

mercredi 12 août 2015 à 13:40
@jeekajoo shaarlinks
"""
pt-table-checksum and pt-table-sync are the finest tools from Percona Toolkit to validate data between master/slave(s). With the help of these tools you can easily identify data drifts and fix them
"""
Encore des supers outils de l'excellente suite "Percona Toolkit".

Voir aussi pt-archiver https://fralef.me/links/?KaxoGw + xtrabackup https://fralef.me/links/?zi8wkw
(Permalink)

Yahoo! victime d'une vaste campagne de publicités malveillantes, les attaquants ont encore exploité une vulnérabilité dans Flash

mercredi 12 août 2015 à 13:33
Liens en bazar
Je n'ai pas besoin d'utiliser d'antivirus, je fais attention et ne vais que sur des sites de confiance, bla bla bla.

Dernier exemple en date : une campagne de publicités malveillantes sur tous les sites de Yahoo! (site de confiance, non ?) et probablement d'autres sites qui utilisent cette régie. Et l'utilisateur n'a rien besoin de faire pour être infecté, je cite : « [...] les annonces malveillantes ne nécessitent aucun type d’interaction de l’utilisateur afin d'exécuter leur charge utile. Le simple fait de naviguer sur un site Web qui a des annonces (et la plupart des sites, si pas tous, en ont) est suffisant pour démarrer la chaîne d’infection »

Ce n'est pas la première fois qu'une telle chose arrive, en plus.

Question : est-ce qu'un bloqueur publicitaire permet d'éviter ces infections ? Bloquent-ils le contenu avant ou après leur interprétation/exécution ?
(Permalink)

Doing Terrible Things To Your Code · Coding Horror

mercredi 12 août 2015 à 13:31
Liens de WebManiaK
Un très bon post qui traite des erreurs que font régulièrement les développeurs et qui traite de l'enfer du développement face au testeur.
(Permalink)

Les processeurs Intel x86 souffrent d'un défaut qui permet d'installer des logiciels malveillants dans l'espace protégé des puces

mercredi 12 août 2015 à 13:25
Liens en bazar
Contrairement à ce que laisse sous-entendre l'article, il n'est pas possible d'écrire un logiciel dans le CPU, il s'agit d'une faille permettant la reprogrammation du système d'exploitation (cf. commentaires).

Cela n'empêche que ça reste important comme faille.
(Permalink)

[Vidéo] Last Week Tonight with John Oliver: Sex Education

mercredi 12 août 2015 à 13:15
Links | Adrian Gaudebert
Ohlala cette émission est sérieusement cool. Le fond est dramatique, les exemples montrés sont déprimants, mais encore une fois, y a des gens qui en parlent, et qui en parlent bien ! J'aimerais beaucoup savoir quel impact cette émission a aux USA, combien de gens la regardent, et si ça fait avancer le débat public.

Et puis encore une fois le meilleur est à la fin.
(Permalink)

WalkCar

mercredi 12 août 2015 à 13:13
Une cascade de liens
Le moyen de transport de demain
(Permalink)

Did I Remember To - Test Guide - Site Home - MSDN Blogs

mercredi 12 août 2015 à 13:01
Liens de WebManiaK
Une liste sympathique de choses dont il faut se souvenir lorsqu'on teste une application. Vous pensiez que c'était simple ? Bah non, bien sûr que non !
(Permalink)