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

(Difference between pages)
m (add passenger garbage)
 
(CPU_FLAGS_X86: explain FMA a little better)
 
Line 1: Line 1:
{{Ebuild
+
This page lists processor instruction sets that can be enabled on Funtoo Linux systems using the {{c|CPU_FLAGS_*}} variables.
|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.
+
  
===Installation===
+
==CPU_FLAGS_X86 ==
==== 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:
+
  
{{file|name=/etc/portage/make.conf|desc=Tengine all-modules build|body=
+
{{TableStart}}
...
+
<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>
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|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_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|3dnow}}</td><td>1998 (AMD K6-2)</td><td>AMD</td><td></td><td></td><td>3DNow!</td><td>See [[Wikipedia:3DNow!]] </td></tr>
...
+
<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>
==== External Modules ====
+
<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>
If you want to run passenger:
+
<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>
{{file|name=/etc/portage/make.conf|desc=build the passenger module|body=
+
<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>
TENGINE_EXTERNAL_MODULES_HTTP="passenger"
+
<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>
}}
+
<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>
Then, just:  
+
<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>
{{console|body=###i## emerge tengine}}
+
<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>
 
+
<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>
===Configuration===
+
<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>
Files for configuration are located at {{c|/etc/tengine}}
+
<tr><td>{{c|fma4}}</td><td>2011 (Bulldozer)</td><td>AMD</td><td></td><td>N/A</td><td>4-operand fused multiply-add (a × b + c)</td><td>See [[Wikipedia:FMA instruction set]]</td></tr>
 
+
<tr><td>{{c|fma3}}</td><td>2012 (Piledriver)</td><td>AMD</td><td></td><td>Intel Haswell</td><td>3-operand fused multiply-add (a × b + c)</td><td>See [[Wikipedia:FMA instruction set]]</td></tr>
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}}.
+
{{TableEnd}}
 
+
{{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:46, March 26, 2015

This page lists processor instruction sets that can be enabled on Funtoo Linux systems using the CPU_FLAGS_* variables.

CPU_FLAGS_X86

FlagIntroducedByPart ofAdopted inNameLinks
mmx1997 (Pentium MMX)IntelMMXSee Wikipedia:MMX (instruction set)
3dnow1998 (AMD K6-2)AMD3DNow!See Wikipedia:3DNow!
mmxext1999AMDsseIntel Pentium III (as part of SSE)AMD MMX ExtensionsSee Wikipedia:Extended MMX
3dnowext1999 (AMD Athlon)AMD3DNow! ExtensionsSee Wikipedia:3DNow!#3DNow extensions
sse1999 (Pentium III)AMDAthlon XPStreaming SIMD Extensions (SSE)See Wikipedia:Streaming SIMD Extensions
sse22001 (Pentium 4)IntelAMD Athlon 64/OpteronStreaming SIMD Extensions 2 (SSE2)See Wikipedia:SSE2
sse32004 (Pentium 4 Prescott)IntelAMD Athlon 64 (some steppings)Streaming SIMD Extensions 3 (SSE3/PNI)See Wikipedia:SSE3
ssse32006 (Core 2 Woodcrest)IntelAMD Bobcat/BulldozerSupplemental Streaming SIMD Extensions 3 (SSSE3)See Wikipedia:SSSE3
sse4_12007 (Core Penryn)IntelAMD BulldozerSupplemental Streaming SIMD Extensions 4.1See Wikipedia:SSSE4#SSE4.1
sse4alate 2007 (Barcelona/Phenom)AMDN/ASupplemental Streaming SIMD Extensions 4aSee Wikipedia:SSSE4#SSE4a
sse4_2late 2008 (Nehalem/Core i7)IntelAMD BulldozerSupplemental Streaming SIMD Extensions 4.2See Wikipedia:SSSE4#SSE4.2
popcnt2007AMDIntel NehalemPOPCNTSee Wikipedia:SSE4#POPCNT_and_LZCNT
lzcnt2007AMDIntel HaswellLZCNTSee Wikipedia:SSE4#POPCNT_and_LZCNT
xop2011 (Bulldozer)AMDXOP Instruction setSee Wikipedia:XOP instruction set
avx2011 (Sandy Bridge)IntelAMD BulldozerAdvanced Vector ExtensionsSee Wikipedia:Advanced Vector Extensions
fma42011 (Bulldozer)AMDN/A4-operand fused multiply-add (a × b + c)See Wikipedia:FMA instruction set
fma32012 (Piledriver)AMDIntel Haswell3-operand fused multiply-add (a × b + c)See Wikipedia:FMA instruction set