?i»?

Your IP : 3.149.239.100


Current Path : /home/scgforma/www/cloud/core/doc/admin/configuration_server/
Upload File :
Current File : /home/scgforma/www/cloud/core/doc/admin/configuration_server/server_tuning.html

<!DOCTYPE html>


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Server tuning &mdash; Nextcloud 13 Administration Manual 13 documentation</title>
    
    <link rel="stylesheet" href="../_static/" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="../_static/main.min.css" type="text/css" />
    <link rel="stylesheet" href="../_static/styles.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '13',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/js/jquery-1.11.0.min.js"></script>
    <script type="text/javascript" src="../_static/js/jquery-fix.js"></script>
    <script type="text/javascript" src="../_static/bootstrap-3.1.0/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../_static/bootstrap-sphinx.js"></script>
    <link rel="top" title="Nextcloud 13 Administration Manual 13 documentation" href="../contents.html" />
    <link rel="up" title="Server configuration" href="index.html" />
    <link rel="next" title="Theming" href="theming.html" />
    <link rel="prev" title="Automatic configuration setup" href="automatic_configuration.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#1d2d44">

  </head>
  <body role="document">


<div class="wrap container not-front">
  <div class="content row">
  <main class="main">
    
			<div class="row">
				<div class="col-md-3">
					<div class="sidebar">
            <h1>Nextcloud 13 Administration Manual</h1>
            
            <div class="sidebar-search">
              <form class="headersearch" action="../search.html" method="get">
                <input type="text" value="" name="q" id="q" class="form-control" /> 
                <button  class="btn btn-default" type="submit" id="searchsubmit">Search</button>
              </form>
            </div>
            
							<div class="menu-support-container">
								<ul id="menu-support" class="menu">
									<ul>
                    <li><a href="../contents.html">Table of Contents</a></li>
									</ul>
                  <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../release_notes.html">Release notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Server configuration</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="security_setup_warnings.html">Warnings on admin page</a></li>
<li class="toctree-l2"><a class="reference internal" href="occ_command.html">Using the occ command</a></li>
<li class="toctree-l2"><a class="reference internal" href="activity_configuration.html">Configuring the activity app</a></li>
<li class="toctree-l2"><a class="reference internal" href="caching_configuration.html">Configuring memory caching</a></li>
<li class="toctree-l2"><a class="reference internal" href="background_jobs_configuration.html">Defining background jobs</a></li>
<li class="toctree-l2"><a class="reference internal" href="config_sample_php_parameters.html">Config.php Parameters</a></li>
<li class="toctree-l2"><a class="reference internal" href="email_configuration.html">Email configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="external_sites.html">Linking external sites</a></li>
<li class="toctree-l2"><a class="reference internal" href="language_configuration.html">Language configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="logging_configuration.html">Logging configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="harden_server.html">Hardening and security guidance</a></li>
<li class="toctree-l2"><a class="reference internal" href="reverse_proxy_configuration.html">Reverse proxy configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="thirdparty_php_configuration.html">Using third party PHP components</a></li>
<li class="toctree-l2"><a class="reference internal" href="automatic_configuration.html">Automatic configuration setup</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="">Server tuning</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#using-cron-to-perform-background-jobs">Using cron to perform background jobs</a></li>
<li class="toctree-l3"><a class="reference internal" href="#caching">Caching</a></li>
<li class="toctree-l3"><a class="reference internal" href="#using-mariadb-mysql-instead-of-sqlite">Using MariaDB/MySQL instead of SQLite</a></li>
<li class="toctree-l3"><a class="reference internal" href="#using-redis-based-transactional-file-locking">Using Redis-based transactional file locking</a></li>
<li class="toctree-l3"><a class="reference internal" href="#ssl-encryption-app">SSL / encryption app</a></li>
<li class="toctree-l3"><a class="reference internal" href="#enable-http2-for-faster-loading">Enable HTTP2 for faster loading</a></li>
<li class="toctree-l3"><a class="reference internal" href="#enable-php-opcache">Enable PHP OPcache</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="theming.html">Theming</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../configuration_user/index.html">User management</a></li>
<li class="toctree-l1"><a class="reference internal" href="../configuration_files/index.html">File sharing and management</a></li>
<li class="toctree-l1"><a class="reference internal" href="../file_workflows/index.html">File workflows</a></li>
<li class="toctree-l1"><a class="reference internal" href="../configuration_database/index.html">Database configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../configuration_mimetypes/index.html">Mimetypes management</a></li>
<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues and troubleshooting</a></li>
</ul>

								</ul>
							</div>
					</div>
				</div>
        

				<div class="col-md-9">
					<div class="page-content">
            
<ul class="prevnext-title list-unstyled list-inline">
  <li class="prev">
    <a href="automatic_configuration.html" title="Previous Chapter: Automatic configuration setup"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm">&laquo; Automatic configuration setup</span>
    </a>
  </li>
  <li class="next">
    <a href="theming.html" title="Next Chapter: Theming"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm">Theming &raquo;</span>
    </a>
  </li>
</ul>
						
  <div class="section" id="server-tuning">
<h1>Server tuning<a class="headerlink" href="#server-tuning" title="Permalink to this headline">¶</a></h1>
<div class="section" id="using-cron-to-perform-background-jobs">
<h2>Using cron to perform background jobs<a class="headerlink" href="#using-cron-to-perform-background-jobs" title="Permalink to this headline">¶</a></h2>
<p>See <a class="reference internal" href="background_jobs_configuration.html"><em>Defining background jobs</em></a> for a description and the
benefits.</p>
</div>
<div class="section" id="caching">
<span id="id1"></span><h2>Caching<a class="headerlink" href="#caching" title="Permalink to this headline">¶</a></h2>
<p>Caching improves performance by storing data, code, and other objects in memory.
Memory cache configuration for the Nextcloud server must be installed and configured.
See <a class="reference internal" href="caching_configuration.html"><em>Configuring memory caching</em></a>.</p>
</div>
<div class="section" id="using-mariadb-mysql-instead-of-sqlite">
<h2>Using MariaDB/MySQL instead of SQLite<a class="headerlink" href="#using-mariadb-mysql-instead-of-sqlite" title="Permalink to this headline">¶</a></h2>
<p>MySQL or MariaDB are preferred because of the <a class="reference external" href="http://www.sqlite.org/whentouse.html">performance limitations of
SQLite with highly concurrent applications</a>, like Nextcloud.</p>
<p>See the section <a class="reference internal" href="../configuration_database/linux_database_configuration.html"><em>Database configuration</em></a> for how to
configure Nextcloud for MySQL or MariaDB. If your installation is already running on
SQLite then it is possible to convert to MySQL or MariaDB using the steps provided
in <a class="reference internal" href="../configuration_database/db_conversion.html"><em>Converting database type</em></a>.</p>
</div>
<div class="section" id="using-redis-based-transactional-file-locking">
<h2>Using Redis-based transactional file locking<a class="headerlink" href="#using-redis-based-transactional-file-locking" title="Permalink to this headline">¶</a></h2>
<p>File locking is enabled by default, using the database locking backend. This
places a significant load on your database. See the section
<a class="reference internal" href="../configuration_files/files_locking_transactional.html"><em>Transactional file locking</em></a> for how to
configure Nextcloud to use Redis-based Transactional File Locking.</p>
</div>
<div class="section" id="ssl-encryption-app">
<h2>SSL / encryption app<a class="headerlink" href="#ssl-encryption-app" title="Permalink to this headline">¶</a></h2>
<p>SSL (HTTPS) and file encryption/decryption can be offloaded to a processor&#8217;s
AES-NI extension. This can both speed up these operations while lowering
processing overhead. This requires a processor with the <a class="reference external" href="http://wikipedia.org/wiki/AES_instruction_set">AES-NI instruction set</a>.</p>
<p>Here are some examples how to check if your CPU / environment supports the
AES-NI extension:</p>
<ul class="simple">
<li>For each CPU core present: <code class="docutils literal"><span class="pre">grep</span> <span class="pre">flags</span> <span class="pre">/proc/cpuinfo</span></code> or as a summary for
all cores: <code class="docutils literal"><span class="pre">grep</span> <span class="pre">-m</span> <span class="pre">1</span> <span class="pre">^flags</span> <span class="pre">/proc/cpuinfo</span></code> If the result contains any
<code class="docutils literal"><span class="pre">aes</span></code>, the extension is present.</li>
<li>Search eg. on the Intel web if the processor used supports the extension
<a class="reference external" href="http://ark.intel.com/MySearch.aspx?AESTech=true">Intel Processor Feature Filter</a> You may set a filter by
<code class="docutils literal"><span class="pre">&quot;AES</span> <span class="pre">New</span> <span class="pre">Instructions&quot;</span></code> to get a reduced result set.</li>
<li>For versions of openssl &gt;= 1.0.1, AES-NI does not work via an engine and
will not show up in the <code class="docutils literal"><span class="pre">openssl</span> <span class="pre">engine</span></code> command. It is active by default
on the supported hardware. You can check the openssl version via <code class="docutils literal"><span class="pre">openssl</span>
<span class="pre">version</span> <span class="pre">-a</span></code></li>
<li>If your processor supports AES-NI but it does not show up eg via grep or
coreinfo, it is maybe disabled in the BIOS.</li>
<li>If your environment runs virtualized, check the virtualization vendor for
support.</li>
</ul>
</div>
<div class="section" id="enable-http2-for-faster-loading">
<h2>Enable HTTP2 for faster loading<a class="headerlink" href="#enable-http2-for-faster-loading" title="Permalink to this headline">¶</a></h2>
<p>HTTP2 has <a class="reference external" href="https://www.troyhunt.com/i-wanna-go-fast-https-massive-speed-advantage/">huge speed improvements</a> over HTTP with multiple request. Most <a class="reference external" href="http://caniuse.com/#feat=http2">browsers already support HTTP2 over SSL (HTTPS)</a>. So refer to your server manual for guides on how to use HTTP2.</p>
</div>
<div class="section" id="enable-php-opcache">
<h2>Enable PHP OPcache<a class="headerlink" href="#enable-php-opcache" title="Permalink to this headline">¶</a></h2>
<p>The <a class="reference external" href="http://php.net/manual/en/intro.opcache.php">OPcache</a> improves the performance of PHP applications by caching precompiled bytecode. We recommend at least following settings:</p>
<div class="code ini highlight-python"><div class="highlight"><pre><span class="n">opcache</span><span class="o">.</span><span class="n">enable</span><span class="o">=</span><span class="mi">1</span>
<span class="n">opcache</span><span class="o">.</span><span class="n">enable_cli</span><span class="o">=</span><span class="mi">1</span>
<span class="n">opcache</span><span class="o">.</span><span class="n">interned_strings_buffer</span><span class="o">=</span><span class="mi">8</span>
<span class="n">opcache</span><span class="o">.</span><span class="n">max_accelerated_files</span><span class="o">=</span><span class="mi">10000</span>
<span class="n">opcache</span><span class="o">.</span><span class="n">memory_consumption</span><span class="o">=</span><span class="mi">128</span>
<span class="n">opcache</span><span class="o">.</span><span class="n">save_comments</span><span class="o">=</span><span class="mi">1</span>
<span class="n">opcache</span><span class="o">.</span><span class="n">revalidate_freq</span><span class="o">=</span><span class="mi">1</span>
</pre></div>
</div>
<p>For more details check out the <a class="reference external" href="http://php.net/manual/en/opcache.configuration.php">official documentation</a> or <a class="reference external" href="https://www.scalingphpbook.com/blog/2014/02/14/best-zend-opcache-settings.html">this blog post about some recommended settings</a>.</p>
</div>
</div>


            
<ul class="prevnext-title list-unstyled list-inline">
  <li class="prev">
    <a href="automatic_configuration.html" title="Previous Chapter: Automatic configuration setup"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm">&laquo; Automatic configuration setup</span>
    </a>
  </li>
  <li class="next">
    <a href="theming.html" title="Next Chapter: Theming"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm">Theming &raquo;</span>
    </a>
  </li>
</ul>
					</div>
				</div>
			</div>
  </main>  
  </div>
</div>
  </body>
</html>