[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4779: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4781: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4782: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4783: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3887)
Gentoo Taiwan 討論區 • 檢視主題 - [分享]讓 Gentoo 的 emerge 下載速度更快

[分享]讓 Gentoo 的 emerge 下載速度更快

什麼?Gentoo 裝不起來?核心怎麼編?安裝失敗等問題?來這裡求救吧!

版主: Forums Team

[分享]讓 Gentoo 的 emerge 下載速度更快

文章TyroneYeh » 週五 6月 26, 2009 1:53 am

原文 http://siryeh.com/module-News-display-sid-19.htm

axel 就是利用多線程的下載程式,像 wget 是單線程下載,Gentoo Portage (emerge) 預設就是用 wget
安裝 axel

emerge axel
裝好之後會寫

* To use axel with portage, try these settings in your make.conf
*
* FETCHCOMMAND='/usr/bin/axel -a -o "\${DISTDIR}/\${FILE}.axel" "\${URI}" && mv "\${DISTDIR}/\${FILE}.axel" "\${DISTDIR}/\${FILE}"'
* RESUMECOMMAND="${FETCHCOMMAND}"
意思是說要把 Gentoo 的 Portage 安裝管理程式改用 axel 的方式就要在 /etc/make.conf 下增加這兩行,如果是用安裝的說明下去會出現 no state file,cannot resume 的錯誤,要改成下面這樣才不會出錯!!

FETCHCOMMAND='/usr/bin/axel -a -S4 -o "\${DISTDIR}/\${FILE}" "\${URI}"'
RESUMECOMMAND="${FETCHCOMMAND}"
這樣就在用 emerge 安裝軟體時下載的速度應該可以更快哦!!

另外要調速參數可以編輯 /etc/axelrc 這個設定檔,例如線程預設是4個,想多一點少一點都可以調整!!

來試一下 emerge-webrsync 吧!! 看到下載的樣子變這樣

[ 95%] [...........0 ........................2..........3 ] [ 472.8KB/s] [00:02]
這樣感覺是有快一些囉!!

另外 connection_timeout 要改一下,預設是 45 秒,太慢了我改成 5 秒就 timeout,連不到的 server 就不要等啦!!
最後由 TyroneYeh 於 週六 6月 27, 2009 12:32 am 編輯,總共編輯了 1 次。
--
Best Respects,
TyroneYeh
TyroneYeh
 
文章: 156
註冊時間: 週一 3月 20, 2006 3:19 pm

Re: [分享]讓 Gentoo 的 emerge 下載速度更快

文章scsi » 週五 6月 26, 2009 10:34 am

感謝分享,這樣下載檔案的時候時間就可以縮短了 :D

另外之前Jackie也提一個不錯的方法,也很暴力… :mrgreen:

viewtopic.php?f=22&t=44475
世界再大,不過是妳我之間的事
:111.gif: 欲使用GOT的ebuild請看
圖檔  
頭像
scsi
 
文章: 1326
註冊時間: 週二 10月 14, 2003 7:49 am

Re: [分享]讓 Gentoo 的 emerge 下載速度更快

文章TyroneYeh » 週五 6月 26, 2009 12:27 pm

好像一樣哩! 只是用的多線程的下載工具不同 @_@"
--
Best Respects,
TyroneYeh
TyroneYeh
 
文章: 156
註冊時間: 週一 3月 20, 2006 3:19 pm

Re: [分享]讓 Gentoo 的 emerge 下載速度更快

文章Jackie » 週五 6月 26, 2009 3:54 pm

原來除了aria2以外另外還有一隻相同類型的工具啊
怪的是當初我想找這類的工具都找不到....
aria2出來之後我馬上就習慣用它了 = =

不過我之前提供的那個方法還有用一隻script去把多線程分散在多台伺服器上面
這樣對別人伺服器也好...對使用者來說應該也會更快下載到東西...
axel應該也可以如法炮製
Jackie
 
文章: 137
註冊時間: 週六 7月 08, 2006 10:13 pm

Re: [分享]讓 Gentoo 的 emerge 下載速度更快

文章TyroneYeh » 週五 6月 26, 2009 5:53 pm

--
Best Respects,
TyroneYeh
TyroneYeh
 
文章: 156
註冊時間: 週一 3月 20, 2006 3:19 pm

Re: [分享]讓 Gentoo 的 emerge 下載速度更快

文章scsi » 週五 6月 26, 2009 10:48 pm

世界再大,不過是妳我之間的事
:111.gif: 欲使用GOT的ebuild請看
圖檔  
頭像
scsi
 
文章: 1326
註冊時間: 週二 10月 14, 2003 7:49 am

Re: [分享]讓 Gentoo 的 emerge 下載速度更快

文章TyroneYeh » 週六 6月 27, 2009 12:29 am

--
Best Respects,
TyroneYeh
TyroneYeh
 
文章: 156
註冊時間: 週一 3月 20, 2006 3:19 pm

Re: [分享]讓 Gentoo 的 emerge 下載速度更快

文章Jackie » 週六 6月 27, 2009 2:58 am

axel會到透過一個網站去搜尋mirror(像FlashGet那樣,aria2少了這個功能,不過整體上aria2功能更多)
所以TyroneYeh說得沒錯...
的確這樣的設置有機會把流量分散到不同的伺服器...
只不過不是GENTOO_MIRRORS設定的那些站點

依照portage的設計...一次只會餵給下載程式一個網址...
就算GENTOO_MIRRORS設定多個站點也一樣(畢竟wget也只支援一個)
除非第一個站點下載失敗才會試第二個

可是我們都知道Gentoo的鏡像站點全世界很多台...
根本不需透過某個網站去搜尋鏡像(而且不一定搜得到...)
所以才要透過一個script去餵給下載程式其它mirror...
Jackie
 
文章: 137
註冊時間: 週六 7月 08, 2006 10:13 pm

Re: [分享]讓 Gentoo 的 emerge 下載速度更快

文章scsi » 週六 6月 27, 2009 11:29 am

這樣我就了解了…axel並非讀取GENTOO_MIRROR的設定
而是透過一網站來協助搜尋別的複本的位置,也是一個好辦法 :102.gif:
世界再大,不過是妳我之間的事
:111.gif: 欲使用GOT的ebuild請看
圖檔  
頭像
scsi
 
文章: 1326
註冊時間: 週二 10月 14, 2003 7:49 am

Re: [分享]讓 Gentoo 的 emerge 下載速度更快

文章TyroneYeh » 週四 7月 23, 2009 11:26 am

今天又裝了一臺 Gentoo, 就先改了用 axel 看他第一個有用 GENTOO_MIRRORS 其他就用它測試速度的 MIRROR 了
不過它會看起來第一個會等... 之後的好像都跑到背景下載了!
就是做 emerge -uD world 時, 會更新一堆套件, 後面幾個套件就沒看到它再下載了!!

下 netstat -tn 看到一堆 走 21 port 出去的!! 這樣下載跟 Compile 就是同步在做了
--
Best Respects,
TyroneYeh
TyroneYeh
 
文章: 156
註冊時間: 週一 3月 20, 2006 3:19 pm

Re: [分享]讓 Gentoo 的 emerge 下載速度更快

文章scsi » 週一 7月 27, 2009 3:16 pm

世界再大,不過是妳我之間的事
:111.gif: 欲使用GOT的ebuild請看
圖檔  
頭像
scsi
 
文章: 1326
註冊時間: 週二 10月 14, 2003 7:49 am

Re: [分享]讓 Gentoo 的 emerge 下載速度更快

文章TyroneYeh » 週一 7月 27, 2009 9:09 pm

--
Best Respects,
TyroneYeh
TyroneYeh
 
文章: 156
註冊時間: 週一 3月 20, 2006 3:19 pm


回到 Gentoo 安裝

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 5 位訪客

cron