<commit_before>#+TITLE: Linux

* Table of Contents :TOC_2_gh:
- [[#overview][Overview]]
- [[#how-to][How-to]]
- [[#topics][Topics]]
- [[#reference][Reference]]
  - [[#iostat][iostat]]
- [[#terminology][Terminology]]
- [[#staging][Staging]]

* Overview
- http://www.brendangregg.com/linuxperf.html

[[file:img/screenshot_2017-08-16_20-34-39.png]]
* How-to
* Topics
* Reference
** iostat
- https://www.percona.com/blog/2014/06/25/why-util-number-from-iostat-is-meaningless-for-mysql-capacity-planning/

#+BEGIN_SRC shell
  iostat -xmdz 1
  #       ││││ └─ Repeat every 1 second
  #       │││└─ Omit output for any devices for which there was no activity during the sample period
  #       ││└─ Display the device utilization report
  #       │└─ Display statistics in megabytes per second
  #       └─ Display extended statistics
#+END_SRC

* Terminology
* Staging<commit_msg>Write about iostat<commit_after>#+TITLE: Linux

* Table of Contents :TOC_2_gh:
- [[#overview][Overview]]
- [[#how-to][How-to]]
- [[#topics][Topics]]
- [[#reference][Reference]]
  - [[#iostat][iostat]]
- [[#terminology][Terminology]]
- [[#staging][Staging]]

* Overview
- http://www.brendangregg.com/linuxperf.html

[[file:img/screenshot_2017-08-16_20-34-39.png]]
* How-to
* Topics
* Reference
** iostat
- https://www.percona.com/blog/2014/06/25/why-util-number-from-iostat-is-meaningless-for-mysql-capacity-planning/

#+BEGIN_SRC shell
  iostat -xmdz 1
  #       ││││ └─ repeat every 1 second
  #       │││└─ omit output for any devices for which there was no activity during the sample period
  #       ││└─ display the device utilization report
  #       │└─ display statistics in megabytes per second
  #       └─ display extended statistics
#+END_SRC

#+BEGIN_EXAMPLE
  Device:         rrqm/s   wrqm/s     r/s     w/s    rMB/s    wMB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
  xvdf              0.00  2934.00    0.00 2000.00     0.00    48.69    49.86     2.59    1.30    0.00    1.30   0.50  99.60
#+END_EXAMPLE

- ~%util~ :: Percentage of CPU time during whchi I/O requests were issed to the device. 
  High ~%util~ doesn't always say that there is an overload.
  If the device serves requests in parallel, this value can constantly be high.

* Terminology
* Staging
{'fraction_non_alphanumeric': 0.14847547503314185, 'fraction_numerical': 0.04330534688466637, 'mean_word_length': 3.1465201465201464, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7413760', 'n_tokens_mistral': 915, 'n_tokens_neox': 856, 'n_words': 204}