Home
Packages
Forums
Wiki
GitLab
Security
AUR
Download
コンテンツにスキップ
メインメニュー
メインメニュー
サイドバーに移動
非表示
案内
メインページ
目次
コミュニティに貢献
最近の出来事
おまかせ表示
特別ページ
交流
ヘルプ
貢献
最近の更新
最近の議論
新しいページ
統計
リクエスト
ArchWiki
検索
検索
表示
アカウント作成
ログイン
個人用ツール
アカウント作成
ログイン
E4ratのソースを表示
ページ
議論
日本語
閲覧
ソースを閲覧
履歴を表示
ツール
ツール
サイドバーに移動
非表示
操作
閲覧
ソースを閲覧
履歴を表示
全般
リンク元
関連ページの更新状況
ページ情報
表示
サイドバーに移動
非表示
←
E4rat
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
[[Category:ブートプロセス]] [[en:E4rat]] [[es:E4rat]] [[ru:E4rat]] [[zh-CN:E4rat]] {{Related articles start}} {{Related2|Improve Boot Performance|ブートパフォーマンスの向上}} {{Related2|Preload|Preload}} {{Related|Ureadahead}} {{Related|Ext4}} {{Related articles end}} [http://e4rat.sourceforge.net/ e4rat] は e4 'reduced access time' (ext4 ファイルシステムのみ) の略語で、Andreas Rid と Gundolf Kiefer によるプロジェクトです。[http://e4rat.sourceforge.net/ e4rat range of tools] は e4rat-collect, e4rat-realloc, e4rat-preload から成り立っています。 現在のバージョンは 0.2.3 です。 == プロセス == 古典的な [[bootchart]] を見ると、ブートプロセスの間にディスクも CPU も完全には使われていないことに気づくかもしれません。e4rat はブートプロセスでディスクと CPU をフルに使うようにして、起動時間を劇的に縮めます。3つの段階に分かれています: * '''e4rat-collect''' - 特定時間ファイルを収集します (デフォルトは120秒ですが変更することも可能です) * '''e4rat-realloc''' - ファイルを再配置します * '''e4rat-preload''' - ファイルをプリロードします === 利益を得る人、得ない人 === X を起動して、多数のプログラムを開くような、典型的なシングルユーザーセットアップで e4rat は大変効果があることが証明されています。サーバーセットアップで CLI で起動するような場合、起動時間の短縮はあまり効果があらわれないでしょう。SSD ドライブを使っている場合も利益はあまりありません、可動部がないためディスクの遅延が(ほとんど)ないためです - [[Ureadahead]] はチェックする価値があるかもしれません。 {{Note|'''(ureadahead のユーザーへ)''' [http://e4rat.sourceforge.net/wiki/index.php/Main_Page#Ubuntu_and_ureadahead e4rat の公式マニュアル] には ureadahead が e4rat と衝突すると書かれています。この記述は Ubuntu では正しいですが、Arch Linux では e4rat と ureadahead を一緒に使っても問題なく動作します。ただし起動時間はあまり短縮されません。}} 備えあれば憂いなし。パーティションに入っているデータを消失したくないのならばバックアップを取っておきましょう。 == インストール == [[AUR|AUR]] から {{AUR|e4rat}} をインストールしてください。 {{Note|ビルドするために、最初に {{ic|staticlibs}} オプションを明示的に有効にして {{Pkg|audit}} を [[ABS|ABS]] からリビルドする必要があります。デフォルトの {{Pkg|audit}} パッケージをインストールするだけではビルドエラーが発生します。}} {{Note|audit を使うには audit をサポートしたカーネルが必要です。カーネルコンフィグで audit (CONFIG_AUDIT) と audit のシステムコールのサポート (CONFIG_AUDITSYSCALL) を有効にしてください。[[Kernels/Compilation/Arch Build System|カーネル/コンパイル/Arch Build System]] も参照。そして {{ic|1=audit=1}} パラメータを使ってカーネルを実行します。}} == 使用方法 == それでは本題に入ります: === e4rat-collect === e4rat にファイルのリストを収集させるために {{ic|1=init=/sbin/e4rat-collect}} を[[カーネルパラメータ]]に追加します。例: kernel /vmlinuz-linux root=/dev/disk/by-label/ARCH init=/sbin/e4rat-collect ro 5 これは一度だけやれば十分なので、grub のコマンドラインなどにこのコマンドを追加すれば良いでしょう。 起動時に e4rat-collect はデフォルトで120秒間システムを監視します。なので起動したら、2分の間に、X にログインして、お気に入りのブラウザやメールクライアントを開いたりしてください。それらの活動すべてが記録されます。デフォルトの120秒を変更したいときは {{ic|/etc/e4rat.conf}} を編集してください。手動で e4rat-collect を停止するには次を入力: e4rat-collect -k もしくは: pkill e4rat-collect ちゃんと起動して規定の時間待機したら {{ic|/var/lib/e4rat/startup.log}} ファイルを見て下さい。 そして忘れずに[[ブートローダー]]の設定ファイルから e4rat-collect コマンドを取り除いておきましょう (grub のコマンドラインに追加した場合は必要ありません)。 === e4rat-realloc === 再配置を行うために init 1 に変更: sudo init 1 {{Note|[[systemd|systemd]] に切り替えたユーザーは[[runlevels|ランレベル]]を変える必要はありません。root でログインして ''e4rat-collect'' が完了したら {{ic|e4rat-realloc}} ユーティリティを実行するだけです。ただし {{ic|systemctl isolate rescue}} でレスキューモードに切り替える ([[Systemd#ターゲット表]]) ことで multiuser.target ではフリーにならない inode やブロックを再配置することが可能になります。}} root でログインして次を実行: e4rat-realloc /var/lib/e4rat/startup.log startup.log ファイルに記述されたファイルの数によってしばらく時間がかかります。 {{Note|It may be worthwhile to repeat the reallocation step multiple times before exiting or rebooting in order to further reduce the fragmentation count. Simply re-run the command a few times to see if this is possible on the your setup. If so you'll see the count number reduced after a few runs. This is perfectly safe and shouldn't cause any issues with booting.}} === e4rat-preload === {{ic|1=init=/sbin/e4rat-preload}} を永続的に[[カーネルパラメータ]]に追加してください。 === 代案: e4rat-preload-lite === [https://bbs.archlinux.org/viewtopic.php?id=117776&p=1 jlindgren] によって開発されている代わりの preload バイナリが存在し、起動時間をさらに数秒ほど縮めます。 起動時間が短縮されるわけは: * C だけを使用し外部のライブラリに依存しません、それによってリンクされる .so ファイルの数を22から3にまで減らしています。 {{Note|Current [0.2.3] version of e4rat-preload is linked against 5 .so libraries, including libc, libm, libpthread ! So there is not much of a difference here.}} * /sbin/init を起動するまではファイルを100個しかプリロードしません、それからは通常のブートシーケンスと同時に残りのファイルをロードします。 [[AUR|AUR]] の {{AUR|e4rat-preload-lite}} でインストールできます。 [[カーネルパラメータ]]に {{ic|1=init=/usr/sbin/e4rat-preload-lite}} を追加 (または置換) してください。 == e4rat と init システム == e4rat-collect defaults to replacing itself with {{ic|/sbin/init}} upon completion. If you need to specify another process with PID 1, such as '''/usr/lib/systemd/systemd''', you can change this in {{ic|/etc/e4rat.conf}} by setting the ''init'' parameter: init /usr/lib/systemd/systemd This allows to launch both e4rat-preload and bootchart in the same boot sequence. == Bootchart == {{Warning|This has not worked for and is still in development - any suggestions welcome}} You will see a noticeable improvement but nothing can beat a nice [[Bootchart]]. Have it run before and after e4rat installation and gawk at the difference. === bootchart 0.9-9 === このバージョンの [[bootchart]] は[[ディスプレイマネージャ]]が立ち上がるとすぐにログの記録を停止します。以下のように上書きすることでログを停止しないようにすることができます: To continue logging adjust your {{ic|/etc/bootchartd.conf}} as follows: AUTO_STOP_LOGGER="no" To stop it manually type: # bootchartd stop To run both e4rat-preload and bootchart append the following to your grub kernel line: init=/sbin/bootchartd bootchart_init=/sbin/e4rat-preload === bootchart2 === e4rat と共に [[bootchart]]2 を動作させるには {{ic|/sbin/bootchartd}} を編集して次の行を: init="/sbin/init" 以下のように置き換えて下さい: init="/sbin/e4rat-preload" This will allow you to measure your boot time with the fine informations that Bootchart2 provides. It's easy to set up when to stop bootchart2 (on opposite to bootchat) by editing its configuration file {{ic|/etc/bootchartd.conf}}. Simply adjust the line EXIT_PROC="kdm_greet xterm konsole gnome-terminal metacity mutter compiz ldm icewm-session enlightenment" with any program you want Bootchart2 stop logging when it launches, or rather left it empty for logging to be stopped manually. == トラブルシューティング == If things do not work you may want to try the following. === startup.log が作られない === * auditd サービスを無効にする * ヒントがないか次を確認 dmesg | grep e4rat * {{ic|e4rat.conf}} の verbose と loglevel を31にまで増やす ===e4rat が誤って ext2 ファイルシステムと認識する=== {{ic|1=rootfstype=ext4}} をブートローダーの[[カーネルパラメータ]]に追加してください。 === /var/lib/e4rat/startup.log にアクセスできない === This suggests that you have {{ic|/var}} on a separate partition which is not yet mounted during boot. You need move your {{ic|startup.log}} to an accessible partition ({{ic|/etc/e4rat/}} is just fine) and adjust your {{ic|/etc/e4rat.conf}} to reflect this change: startup_log_file /etc/e4rat/startup.log === うるさいブートメッセージを削除する === 起動中の e4rat-preload のメッセージがうっとうしい場合は、{{ic|/etc/e4rat.conf}} で verbose を 1 に減らします。 == 参照 == * [https://bbs.archlinux.org/viewtopic.php?id=115976 Main discussion on the forum] * [https://bbs.archlinux.org/viewtopic.php?id=117776 Improved e4rat-preload - forum thread]
このページで使用されているテンプレート:
テンプレート:AUR
(
ソースを閲覧
)
テンプレート:Ic
(
ソースを閲覧
)
テンプレート:META Related articles start
(
ソースを閲覧
)
テンプレート:Note
(
ソースを閲覧
)
テンプレート:Pkg
(
ソースを閲覧
)
テンプレート:Related
(
ソースを閲覧
)
テンプレート:Related articles end
(
ソースを閲覧
)
テンプレート:Related articles start
(
ソースを閲覧
)
テンプレート:Tip
(
ソースを閲覧
)
テンプレート:Warning
(
ソースを閲覧
)
E4rat
に戻る。
検索
検索
E4ratのソースを表示
話題を追加