Skip to content

Commit

Permalink
lvm extend
Browse files Browse the repository at this point in the history
  • Loading branch information
huataihuang committed Jul 30, 2023
1 parent ed55997 commit 9169cb8
Show file tree
Hide file tree
Showing 48 changed files with 932 additions and 4 deletions.
2 changes: 2 additions & 0 deletions source/clang/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ C Atlas
upgrade_cmake_on_centos7.rst
upgrade_gcc_on_centos7.rst
upgrade_gcc_on_suse12.5.rst
upgrade_gcc_on_ubuntu22.04.rst
parallel_make.rst

.. only:: subproject and html

Expand Down
28 changes: 28 additions & 0 deletions source/clang/parallel_make.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.. _parallel_make:

======================
并行make
======================

我在为 :ref:`build_glusterfs_11_for_suse_12` 做 :ref:`upgrade_gcc_on_suse12.5` ,发现一个麻烦的事情,编译 GCC 实在太耗时了。同事提醒可以修改configure参数,增加多核并行。

我想起来当时编译时确实发现只有一个 ``cc1plus`` 进程运行,完全浪费了多cpu core的高性能服务器资源。当时因为只处理一台编译,也就没有再尝试优化。

没有启用 ``-j XX`` 参数 :ref:`` 耗时:

.. literalinclude:: parallel_make/build_gcc_before_parallel_time
:caption: 没有启用 ``-j XX`` 参数之前编译gcc 耗时
:emphasize-lines: 1

由于服务器有48个cpu core,所以执行以下命令配置 ``make`` 并行度 ``40`` :

.. literalinclude:: parallel_make/make_j

使用 ``-j 40`` :

.. literalinclude:: parallel_make/make_j_output
:caption: 使用40个并发任务执行make可以大大加速编译gcc速度

.. note::

使用 ``-j`` 参数并发在多处理器服务器上运行编译,可以看到 ``real`` 时间远小于 ``system`` 和 ``user`` 累加的时间。这是因为 ``system`` 和 ``user`` 消耗时间是在多个处理器上累加起来的,多个并发实际完成时间大大缩短 ( ``real`` 时间 )。详见 :ref:`time`
3 changes: 3 additions & 0 deletions source/clang/parallel_make/build_gcc_before_parallel_time
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
real 283m7.795s
user 270m45.706s
sys 11m37.685s
1 change: 1 addition & 0 deletions source/clang/parallel_make/make_j
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alias make="/usr/bin/make -j 40"
3 changes: 3 additions & 0 deletions source/clang/parallel_make/make_j_output
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
real 34m54.800s
user 379m16.856s
sys 13m35.479s
2 changes: 1 addition & 1 deletion source/clang/upgrade_gcc_on_centos7/build_gcc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version=10.5.0

wget wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-${version}/gcc-${version}.tar.gz
wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-${version}/gcc-${version}.tar.gz
tar xfz gcc-${version}.tar.gz
cd gcc-${version}

Expand Down
53 changes: 53 additions & 0 deletions source/clang/upgrade_gcc_on_ubuntu22.04.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.. _upgrade_gcc_on_ubuntu22.04:

===========================
Ubuntu 22.04升级GCC
===========================

其实没有必要在 :ref:`ubuntu_linux` 22.04 上升级GCC,因为发行版提供的 gcc 11.3 已经足够新,支持足够的C feature。不过,我最近在 :ref:`upgrade_gcc_on_suse12.5` 编译GCC非常缓慢,考虑到服务器是多核处理器性能足够强劲,但是依然没有快速完成编译,显然是编译并行没有搞好。所以我想重新在我的 ``zcloud`` 上验证以下并行编译和非并行编译的差异。(对于 :ref:`gentoo_linux` 的 :ref:`emerge` 配置参数有)

- 编译准备: 安装基本GCC toolchain和扩展工具

.. literalinclude:: upgrade_gcc_on_ubuntu22.04/prepare_build_gcc
:caption: 编译gcc准备(GCC工具链和扩展工具)

.. note::

:ref:`ubuntu_linux` `的软件包命名规律和 :ref:`redhat_linux` 不同:

.. literalinclude:: upgrade_gcc_on_ubuntu22.04/lib_dev
:caption: ubuntu 和 CentOS 对开发库包名差异

- 编译安装GCC:

.. literalinclude:: upgrade_gcc_on_ubuntu22.04/build_gcc
:caption: 编译gcc

.. note::

GCC编译非常耗时,建议 :ref:`parallel_make`

在 ``./configure`` 时,我遇到如下提示信息:

.. literalinclude:: upgrade_gcc_on_ubuntu22.04/configue_info
:caption: configure输出信息显示缺少isl和makeinfo

则需要补充安装::

# textinfo提供makeinfo
# libisl-dev提供isl
sudo apt install texinfo libisl-dev

参考
======

- `Building GCC 10 on Ubuntu Linux <https://solarianprogrammer.com/2016/10/07/building-gcc-ubuntu-linux/>`_
- `What is makeinfo, and how do I get it? <https://stackoverflow.com/questions/338317/what-is-makeinfo-and-how-do-i-get-it>`_
- `Prerequisites for GCC <https://gcc.gnu.org/install/prerequisites.html>`_ ::

isl Library version 0.15 or later.
Necessary to build GCC with the Graphite loop optimizations. It can be downloaded from https://gcc.gnu.org/pub/gcc/infrastructure/.
If an isl source distribution is found in a subdirectory of your GCC sources named isl, it will be built together with GCC.
Alternatively, the --with-isl configure option should be used if isl is not installed in your default library search path.

- `isl package in Ubuntu <https://launchpad.net/ubuntu/+source/isl>`_
9 changes: 9 additions & 0 deletions source/clang/upgrade_gcc_on_ubuntu22.04/build_gcc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version=13.2.0

wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-${version}/gcc-${version}.tar.gz
tar xfz gcc-${version}.tar.gz
cd gcc-${version}

./configure --disable-multilib --enable-languages=c,c++
make
sudo make install
9 changes: 9 additions & 0 deletions source/clang/upgrade_gcc_on_ubuntu22.04/configue_info
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
...
required isl version is 0.15 or later
*** This configuration is not supported in the following subdirectories:
gnattools gotools target-libada target-libphobos target-zlib target-libbacktrace target-libgfortran target-libgo target-libffi target-libgm2 target-libobjc
(Any other directories should still work fine.)
...
checking for makeinfo... no
/home/huatai/docs/gcc/gcc-13.2.0/missing: 81: makeinfo: not found
...
3 changes: 3 additions & 0 deletions source/clang/upgrade_gcc_on_ubuntu22.04/lib_dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
gmp-devel ==> libgmp-dev
mpfr-devel ==> libmpfr-dev
libmpc-devel ==> libmpc-dev
3 changes: 3 additions & 0 deletions source/clang/upgrade_gcc_on_ubuntu22.04/prepare_build_gcc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sudo apt install build-essential wget m4 flex bison \
libgmp-dev libmpfr-dev libmpc-dev \
textinfo libisl-dev
13 changes: 13 additions & 0 deletions source/devops/docs/kindle/read_e-books_after_kindle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
后Kindle时代阅读电子书
========================

个人的电子书同步
==================

随着亚马逊Kindle电子书退出中国市场,给我们阅读又带来了更多的不便。作为技术工作者以及渴望 :ref:`open_your_mind` ,需要有一个自由阅读的解决方案:

我在跨 :ref:`macos` 和 Linux 平台工作时,非常关注如何同步电子书以及在跨平台阅读的方案。最初我向选择苹果的iCloud,也就是采用苹果 ``Books`` 工具云端存储电子书:
Expand All @@ -23,3 +26,13 @@ Google则侧重于WEB应用,所有Android上的Google全家桶都提供了WEB
- 在Linux平台使用 :ref:`google_play` 在线阅读以及下载到本地采用轻量级 :ref:`read_ebook_in_linux`

- 在手机上主要采用Google Books来进行电子书阅读

使用哪个平台?
===============

其实Kindle退出中国,最大的影响是如何找到和购买正版电子书:

- 虽然可以通过搜索引擎找到很多免费资源,但是非正版带来的困扰是: 你必须花费大量的时间和精力来甄选,无法在一个平台获得良好、统一的阅读体验
- 专业中文书籍后续是一个难题,没有出版社支持的话,中文专业书籍会更加下滑

我现在还不知道该选用哪个平台, `V2EX: 中亚 kindle 停止电子书运营后还有哪些替代方案 <https://www.v2ex.com/t/856951>`_ 提到了 zlib ...
2 changes: 2 additions & 0 deletions source/kubernetes/istio/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ Istio服务网格
istio_architecture.rst
istio_startup.rst
istio_bookinof_demo.rst
istio_integrations.rst
kiali.rst
traffic_management/index
envoy/index
16 changes: 16 additions & 0 deletions source/kubernetes/istio/istio_integrations.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.. _istio_integrations:

===========================
Istio集成第三方软件
===========================

Istio通过集成第三方开源软件提供了强大的能力:

- :ref:`cert-manager`
- :ref:`kiali`
- :ref:`skywalking`

参考
=====

- `Istio Documentation > Operations > Integrations <https://istio.io/latest/docs/ops/integrations/>`_
5 changes: 5 additions & 0 deletions source/kubernetes/istio/kiali.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.. _kiali:

==============
kiali管控面板
==============
1 change: 1 addition & 0 deletions source/kubernetes/monitor/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Kubernetes监控
mixins/index
opentelemetry/index
jaeger/index
skywalking/index
signoz/index
node_health/index
netdata.rst
Expand Down
11 changes: 11 additions & 0 deletions source/kubernetes/monitor/skywalking/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.. _skywalking:

======================
Apache SkyWalking
======================

.. toctree::
:maxdepth: 1

intro_skywalking.rst

17 changes: 17 additions & 0 deletions source/kubernetes/monitor/skywalking/intro_skywalking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.. _intro_skywalking:

=======================
Apache SkyWalking简介
=======================

起源
=======

`Apache SkyWalking开源项目 <https://skywalking.apache.org/>`_

参考
=====

- `Skywalking 中文资料 <https://skywalking.apache.org/zh/>`_ (京东有电子书 `Apache SkyWalking实战 <https://e.jd.com/30640502.html>`_ )
- `吴晟:SkyWalking 与 Apache 软件基金会的那些事 | DEV. Together 2021 中国开发者生态峰会 <https://developer.aliyun.com/article/805796>`_
- `Apache 首位华人董事吴晟谈开源:我对中国开源短期内是消极的 <https://developer.baidu.com/article/detail.html?id=294099>`_
7 changes: 4 additions & 3 deletions source/linux/storage/filesystem/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ Linux文件系统
gpt_partition.rst
parted.rst
choice_linux_filesystem.rst
xfs/index
ext/index
quota/index
reserved_space_for_root_on_filesystem.rst
linux_overlayfs.rst
remount_without_reboot.rst
fstrim.rst
chattr.rst
xfs/index
ext/index
quota/index

.. only:: subproject and html

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _reserved_space_for_root_on_filesystem:

=========================
文件系统为root保留空间
=========================

参考
======

- `Reserved space for root on a filesystem - why? <https://unix.stackexchange.com/questions/7950/reserved-space-for-root-on-a-filesystem-why>`_

0 comments on commit 9169cb8

Please sign in to comment.