-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ed55997
commit 9169cb8
Showing
48 changed files
with
932 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
real 283m7.795s | ||
user 270m45.706s | ||
sys 11m37.685s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
alias make="/usr/bin/make -j 40" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
real 34m54.800s | ||
user 379m16.856s | ||
sys 13m35.479s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.. _kiali: | ||
|
||
============== | ||
kiali管控面板 | ||
============== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.. _skywalking: | ||
|
||
====================== | ||
Apache SkyWalking | ||
====================== | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
intro_skywalking.rst | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
source/linux/storage/filesystem/reserved_space_for_root_on_filesystem.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>`_ |
Oops, something went wrong.