hydrus/help/launch_arguments.html

71 lines
5.2 KiB
HTML

<html>
<head>
<title>launch arguments</title>
<link href="hydrus.ico" rel="shortcut icon" />
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="content">
<h3 id="intro"><a href="#intro">launch arguments</a></h3>
<p>You can launch the program with several different arguments to alter core behaviour. If you are not familiar with this, you are essentially putting additional text after the launch command that runs the program. You can run this straight from a terminal console (usually good to test with), or you can bundle it into an easy shortcut that you only have to double-click. An example of a launch command with arguments:</p>
<blockquote>C:\Hydrus Network\client.exe -d="E:\hydrus db" --no_db_temp_files</blockquote>
<p>You can also add --help to your program path, like this:</p>
<blockquote>
<pre>client.py --help</pre>
<pre>server.exe --help</pre>
<pre>./server --help</pre>
</blockquote>
<p>Which gives you a full listing of all below arguments, however this will not work with the built client executables, which are bundled as a non-console programs and will not give you text results to any console they are launched from. As client.exe is the most commonly run version of the program, here is the list, with some more help about each command:</p>
<ul>
<li>
<b>-d DB_DIR, --db_dir DB_DIR</b>
<p>Lets you customise where hydrus should use for its base database directory. This is install_dir/db by default, but many advanced deployments will move this around, as described <a href="database_migration.html">here</a>. When an argument takes a complicated value like a path that could itself include whitespace, you should wrap it in quote marks, like this:</p>
<blockquote>
<pre>-d="E:\my hydrus\hydrus db"</pre>
</blockquote>
</li>
<li>
<b>--temp_dir TEMP_DIR</b>
<p>This tells all aspects of the client, including the SQLite database, to use a different path for temp operations. This would be by default your system temp path, such as:</p>
<blockquote>
<pre>C:\Users\You\AppData\Local\Temp</pre>
</blockquote>
<p>But you can also check it in <i>help->about</i>. A handful of database operations (PTR tag processing, vacuums) require a lot of free space, so if your system drive is very full, or you have unusual ramdisk-based temp storage limits, you may want to relocate to another location or drive.</p>
</li>
<li>
<b>--db_journal_mode {WAL,TRUNCATE,PERSIST,MEMORY}</b>
<p>Change the <i>journal</i> mode of the SQLite database. The default is WAL, which works great for SSD drives, but if you have a very old or slow drive, a different mode <i>may</i> work better. Full docs are <a href="https://sqlite.org/pragma.html#pragma_journal_mode">here</a>.</p>
<p>Briefly:</p>
<ul>
<li>WAL - Clever write flushing that takes advantage of new drive synchronisation tools to maintain integrity and reduce total writes.</li>
<li>TRUNCATE - Compatibility mode. Use this if your drive cannot launch WAL.</li>
<li>PERSIST - This is newly added to hydrus. The ideal is that if you have a high latency HDD drive and want sync with the PTR, this will work more efficiently than WAL journals, which will be regularly wiped and recreated and be fraggy. Unfortunately, with hydrus's multiple database file system, SQLite ultimately treats this as DELETE, which in our situation is basically the same as TRUNCATE, so does not increase performance. Hopefully this will change in future.</li>
<li>MEMORY - Danger mode. Extremely fast, but you had better guarantee a lot of free ram.</li>
</ul>
</li>
<li>
<b>--db_cache_size DB_CACHE_SIZE</b>
<p>Change the size of the cache SQLite will use for each db file, in MB. By default this is 200, for 200MB, which for the four main client db files could mean 800MB peak use if you run a very heavy client and perform a long period of PTR sync. This does not matter so much (nor should it be fully used) if you have a smaller client.</p>
</li>
<li>
<b>--db_synchronous_override {0,1,2,3}</b>
<p>Change the rules governing how SQLite writes committed changes to your disk. Full docs <a href="https://sqlite.org/pragma.html#pragma_synchronous">here</a>. The hydrus default is 1 with WAL, 2 otherwise.</p>
</li>
<li>
<b>--no_db_temp_files</b>
<p>When SQLite performs very large queries, it may spool temporary table results to disk. These go in your temp directory. If your temp dir is slow but you have a <i>ton</i> of memory, set this to never spool to disk, as <a href="https://sqlite.org/pragma.html#pragma_temp_store">here</a>.</p>
</li>
<li>
<b>--boot_debug</b>
<p>Prints additional debug information to the log during the bootup phase of the application.</p>
</li>
<li>
<b>--no_daemons</b>
<p>Launch the program without some background workers. This is an old debug command and does not do much any more.</p>
</li>
</ul>
<p>The server supports the same arguments. It also takes a <i>positional</i> argument of 'start' (start the server, the default), 'stop' (stop any existing server), or 'restart' (do a stop, then a start), which should go before any of the above arguments.</p>
</div>
</body>
</html>