Difference between pages "CPU FLAGS" and "Package:Tengine"

From Funtoo
(Difference between pages)
Jump to navigation Jump to search
 
m (add passenger garbage)
 
Line 1: Line 1:
This page lists processor instruction sets that can be enabled on Funtoo Linux systems using the {{c|CPU_FLAGS_*}} variables.
{{Ebuild
|Summary=Robust, small and high performance http and reverse proxy server
|CatPkg=www-servers/tengine
|Maintainer=
|Homepage=http://tengine.taobao.org
}}
Tengine is an {{package|www-servers/nginx}} fork.  It supports DSO module loading, meaning it can have external modules without the need to compile them in.


==CPU_FLAGS_X86 ==
===Installation===
==== Shared & Static Modules ====
If you happen to want all modules installed dynamically, you, still, need to install some static modules. Make sure to add this to your {{c|/etc/portage/make.conf}} file:


{{TableStart}}
{{file|name=/etc/portage/make.conf|desc=Tengine all-modules build|body=
<tr><th>Flag</th><th>Introduced</th><th>By</th><th>Part of</th><th>Adopted in</th><th>Name</th><th>Links</th></tr>
...
<tr><td>{{c|mmx}}</td><td>1997 (Pentium MMX)</td><td>Intel</td><td></td><td></td><td>MMX</td><td>See [[Wikipedia:MMX (instruction set)]] </td></tr>
TENGINE_SHARED_MODULES_HTTP="access addition autoindex browser charset_filter empty_gif fastcgi flv footer_filter geoip image_filter limit_conn limit_req lua map memcached mp4 random_index referer reqstat rewrite scgi secure_link slice split_clients sub sysguard tfs trim_filter upstream_ip_hash upstream_least_conn upstream_session_sticky user_agent userid_filter uwsgi xslt"
<tr><td>{{c|3dnow}}</td><td>1998 (AMD K6-2)</td><td>AMD</td><td></td><td></td><td>3DNow!</td><td>See [[Wikipedia:3DNow!]] </td></tr>
TENGINE_STATIC_MODULES_HTTP="concat dav degradation geo gunzip gzip gzip_static perl proxy realip spdy ssi ssl stub_status upstream-rbtree upstream_check upstream_consistent_hash upstream_keepalive"
<tr><td>{{c|mmxext}}</td><td>1999</td><td>AMD</td><td>{{c|sse}}</td><td>Intel Pentium III (as part of SSE)</td><td>AMD MMX Extensions</td><td>See [[Wikipedia:Extended MMX]]</td></tr>
...
<tr><td>{{c|3dnowext}}</td><td>1999 (AMD Athlon)</td><td>AMD</td><td></td><td></td><td>3DNow! Extensions</td><td>See [[Wikipedia:3DNow!#3DNow extensions]] </td></tr>
}}
<tr><td>{{c|sse}}</td><td>1999 (Pentium III)</td><td>AMD</td><td></td><td>Athlon XP</td><td>Streaming SIMD Extensions (SSE)</td><td>See [[Wikipedia:Streaming SIMD Extensions]]</td></tr>
 
<tr><td>{{c|sse2}}</td><td>2001 (Pentium 4)</td><td>Intel</td><td></td><td>AMD Athlon 64/Opteron</td><td>Streaming SIMD Extensions 2 (SSE2)</td><td>See [[Wikipedia:SSE2]]</td></tr>
==== External Modules ====
<tr><td>{{c|sse3}}</td><td>2004 (Pentium 4 Prescott)</td><td>Intel</td><td></td><td>AMD Athlon 64 (some steppings)</td><td>Streaming SIMD Extensions 3 (SSE3/PNI)</td><td>See [[Wikipedia:SSE3]]</td></tr>
If you want to run passenger:
<tr><td>{{c|ssse3}}</td><td>2006 (Core 2 Woodcrest)</td><td>Intel</td><td></td><td>AMD Bobcat/Bulldozer</td><td>Supplemental Streaming SIMD Extensions 3 (SSSE3)</td><td>See [[Wikipedia:SSSE3]]</td></tr>
{{file|name=/etc/portage/make.conf|desc=build the passenger module|body=
<tr><td>{{c|sse4_1}}</td><td>2007 (Core Penryn)</td><td>Intel</td><td></td><td>AMD Bulldozer</td><td>Supplemental Streaming SIMD Extensions 4.1</td><td>See [[Wikipedia:SSSE4#SSE4.1]]</td></tr>
TENGINE_EXTERNAL_MODULES_HTTP="passenger"
<tr><td>{{c|sse4a}}</td><td>late 2007 (Barcelona/Phenom)</td><td>AMD</td><td></td><td>N/A</td><td>Supplemental Streaming SIMD Extensions 4a</td><td>See [[Wikipedia:SSSE4#SSE4a]]</td></tr>
}}
<tr><td>{{c|sse4_2}}</td><td>late 2008 (Nehalem/Core i7)</td><td>Intel</td><td></td><td>AMD Bulldozer</td><td>Supplemental Streaming SIMD Extensions 4.2</td><td>See [[Wikipedia:SSSE4#SSE4.2]]</td></tr>
 
<tr><td>{{c|popcnt}}</td><td>2007</td><td>AMD</td><td></td><td>Intel Nehalem</td><td>POPCNT</td><td>See [[Wikipedia:SSE4#POPCNT_and_LZCNT]]</td></tr>
Then, just:  
<tr><td>{{c|lzcnt}}</td><td>2007</td><td>AMD</td><td></td><td>Intel Haswell</td><td>LZCNT</td><td>See [[Wikipedia:SSE4#POPCNT_and_LZCNT]]</td></tr>
{{console|body=###i## emerge tengine}}
<tr><td>{{c|xop}}</td><td>2011 (Bulldozer)</td><td>AMD</td><td></td><td></td><td>XOP Instruction set</td><td>See [[Wikipedia:XOP instruction set]]</td></tr>
 
<tr><td>{{c|avx}}</td><td>2011 (Sandy Bridge)</td><td>Intel</td><td></td><td>AMD Bulldozer</td><td>Advanced Vector Extensions</td><td>See [[Wikipedia:Advanced Vector Extensions]]</td></tr>
===Configuration===
<tr><td>{{c|fma4}}</td><td>2011 (Bulldozer)</td><td>AMD</td><td></td><td>N/A</td><td>FMA3</td><td>See [[Wikipedia:FMA instruction set]]</td></tr>
Files for configuration are located at {{c|/etc/tengine}}
<tr><td>{{c|fma3}}</td><td>2012 (Piledriver)</td><td>AMD</td><td></td><td>Intel Haswell</td><td>FMA3</td><td>See [[Wikipedia:FMA instruction set]]</td></tr>
 
{{TableEnd}}
The major differing point in tengine from nginx is that you have to specifically declare which modules are loaded.  Available modules are located at {{c|/var/lib/tengine/modules}}.
 
{{file|name=/etc/tengine/tengine.conf|desc=DSO module statements|body=
...
dso {
load ngx_http_charset_filter_module.so;
load ngx_http_fastcgi_module.so;
load ngx_http_rewrite_module.so;
}
...
}}
 
===Tengine===
{{c|/etc/tengine/tengine.conf}} contains engine specific configurations.
 
===Sites===
{{c|/etc/tengine/sites-available/localhost}} has site specific configurations. Generally localhost is copied to domain.tld file formats in the {{c|/etc/tengine/sites-available/}} directory.
 
===PHP-FPM===
Tengine does not natively support php, so we delegate that responsibility to [[Package:PHP#Fpm | php-fpm]]
 
{{file|name=/etc/tengine/sites-available/localhost|desc=fpm tcp/ip configuration|body=
server {
        ...
index index.php index.cgi index.htm index.html;
location ~ \.php$ {
        fastcgi_pass 127.0.0.1:9000;
include fastcgi.conf;
        }
        ...
}
}}
 
===Usage===
To start the tengine server:
 
{{console|body=###i## rc-update add tengine default
###i## rc}}
 
{{EbuildFooter}}

Revision as of 22:37, March 26, 2015

Tengine

   Tip

We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.

Tengine is an www-servers/nginx fork. It supports DSO module loading, meaning it can have external modules without the need to compile them in.

Installation

Shared & Static Modules

If you happen to want all modules installed dynamically, you, still, need to install some static modules. Make sure to add this to your /etc/portage/make.conf file:

   /etc/portage/make.conf - Tengine all-modules build
...
TENGINE_SHARED_MODULES_HTTP="access addition autoindex browser charset_filter empty_gif fastcgi flv footer_filter geoip image_filter limit_conn limit_req lua map memcached mp4 random_index referer reqstat rewrite scgi secure_link slice split_clients sub sysguard tfs trim_filter upstream_ip_hash upstream_least_conn upstream_session_sticky user_agent userid_filter uwsgi xslt"
TENGINE_STATIC_MODULES_HTTP="concat dav degradation geo gunzip gzip gzip_static perl proxy realip spdy ssi ssl stub_status upstream-rbtree upstream_check upstream_consistent_hash upstream_keepalive"
...

External Modules

If you want to run passenger:

   /etc/portage/make.conf - build the passenger module
TENGINE_EXTERNAL_MODULES_HTTP="passenger"

Then, just:

root # emerge tengine

Configuration

Files for configuration are located at /etc/tengine

The major differing point in tengine from nginx is that you have to specifically declare which modules are loaded. Available modules are located at /var/lib/tengine/modules.

   /etc/tengine/tengine.conf - DSO module statements
...
dso {
	load ngx_http_charset_filter_module.so;
	load ngx_http_fastcgi_module.so;
	load ngx_http_rewrite_module.so;
}
...

Tengine

/etc/tengine/tengine.conf contains engine specific configurations.

Sites

/etc/tengine/sites-available/localhost has site specific configurations. Generally localhost is copied to domain.tld file formats in the /etc/tengine/sites-available/ directory.

PHP-FPM

Tengine does not natively support php, so we delegate that responsibility to php-fpm

   /etc/tengine/sites-available/localhost - fpm tcp/ip configuration
server {
        ...
	index index.php index.cgi index.htm index.html;
	location ~ \.php$ {
	        fastcgi_pass 127.0.0.1:9000;
		include fastcgi.conf;
        }
        ...
}

Usage

To start the tengine server:

root # rc-update add tengine default
root # rc