Browse Source

Add tuning options related to performance warnings

Related: #16462.
PR #16538.
adaptive-webui-19844
Chocobo1 3 years ago committed by GitHub
parent
commit
ac97ed685f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 34
      src/base/bittorrent/session.cpp
  2. 12
      src/base/bittorrent/session.h
  3. 19
      src/gui/advancedsettings.cpp
  4. 4
      src/gui/advancedsettings.h
  5. 10
      src/webui/api/appcontroller.cpp
  6. 2
      src/webui/webapplication.h
  7. 20
      src/webui/www/private/views/preferences.html

34
src/base/bittorrent/session.cpp

@ -379,6 +379,7 @@ Session::Session(QObject *parent)
, m_checkingMemUsage(BITTORRENT_SESSION_KEY("CheckingMemUsageSize"), 32) , m_checkingMemUsage(BITTORRENT_SESSION_KEY("CheckingMemUsageSize"), 32)
, m_diskCacheSize(BITTORRENT_SESSION_KEY("DiskCacheSize"), -1) , m_diskCacheSize(BITTORRENT_SESSION_KEY("DiskCacheSize"), -1)
, m_diskCacheTTL(BITTORRENT_SESSION_KEY("DiskCacheTTL"), 60) , m_diskCacheTTL(BITTORRENT_SESSION_KEY("DiskCacheTTL"), 60)
, m_diskQueueSize(BITTORRENT_SESSION_KEY("DiskQueueSize"), (1024 * 1024))
, m_useOSCache(BITTORRENT_SESSION_KEY("UseOSCache"), true) , m_useOSCache(BITTORRENT_SESSION_KEY("UseOSCache"), true)
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
, m_coalesceReadWriteEnabled(BITTORRENT_SESSION_KEY("CoalesceReadWrite"), true) , m_coalesceReadWriteEnabled(BITTORRENT_SESSION_KEY("CoalesceReadWrite"), true)
@ -468,6 +469,7 @@ Session::Session(QObject *parent)
, m_peerTurnover(BITTORRENT_SESSION_KEY("PeerTurnover"), 4) , m_peerTurnover(BITTORRENT_SESSION_KEY("PeerTurnover"), 4)
, m_peerTurnoverCutoff(BITTORRENT_SESSION_KEY("PeerTurnoverCutOff"), 90) , m_peerTurnoverCutoff(BITTORRENT_SESSION_KEY("PeerTurnoverCutOff"), 90)
, m_peerTurnoverInterval(BITTORRENT_SESSION_KEY("PeerTurnoverInterval"), 300) , m_peerTurnoverInterval(BITTORRENT_SESSION_KEY("PeerTurnoverInterval"), 300)
, m_requestQueueSize(BITTORRENT_SESSION_KEY("RequestQueueSize"), 500)
, m_bannedIPs("State/BannedIPs" , m_bannedIPs("State/BannedIPs"
, QStringList() , QStringList()
, [](const QStringList &value) , [](const QStringList &value)
@ -1330,6 +1332,8 @@ void Session::loadLTSettings(lt::settings_pack &settingsPack)
settingsPack.set_int(lt::settings_pack::peer_turnover_cutoff, peerTurnoverCutoff()); settingsPack.set_int(lt::settings_pack::peer_turnover_cutoff, peerTurnoverCutoff());
settingsPack.set_int(lt::settings_pack::peer_turnover_interval, peerTurnoverInterval()); settingsPack.set_int(lt::settings_pack::peer_turnover_interval, peerTurnoverInterval());
settingsPack.set_int(lt::settings_pack::max_out_request_queue, requestQueueSize());
settingsPack.set_int(lt::settings_pack::aio_threads, asyncIOThreads()); settingsPack.set_int(lt::settings_pack::aio_threads, asyncIOThreads());
#ifdef QBT_USES_LIBTORRENT2 #ifdef QBT_USES_LIBTORRENT2
settingsPack.set_int(lt::settings_pack::hashing_threads, hashingThreads()); settingsPack.set_int(lt::settings_pack::hashing_threads, hashingThreads());
@ -1345,6 +1349,8 @@ void Session::loadLTSettings(lt::settings_pack &settingsPack)
settingsPack.set_int(lt::settings_pack::cache_expiry, diskCacheTTL()); settingsPack.set_int(lt::settings_pack::cache_expiry, diskCacheTTL());
#endif #endif
settingsPack.set_int(lt::settings_pack::max_queued_disk_bytes, diskQueueSize());
lt::settings_pack::io_buffer_mode_t mode = useOSCache() ? lt::settings_pack::enable_os_cache lt::settings_pack::io_buffer_mode_t mode = useOSCache() ? lt::settings_pack::enable_os_cache
: lt::settings_pack::disable_os_cache; : lt::settings_pack::disable_os_cache;
settingsPack.set_int(lt::settings_pack::disk_io_read_mode, mode); settingsPack.set_int(lt::settings_pack::disk_io_read_mode, mode);
@ -3259,6 +3265,20 @@ void Session::setPeerTurnoverInterval(const int val)
configureDeferred(); configureDeferred();
} }
int Session::requestQueueSize() const
{
return m_requestQueueSize;
}
void Session::setRequestQueueSize(const int val)
{
if (val == m_requestQueueSize)
return;
m_requestQueueSize = val;
configureDeferred();
}
int Session::asyncIOThreads() const int Session::asyncIOThreads() const
{ {
return std::clamp(m_asyncIOThreads.get(), 1, 1024); return std::clamp(m_asyncIOThreads.get(), 1, 1024);
@ -3357,6 +3377,20 @@ void Session::setDiskCacheTTL(const int ttl)
} }
} }
qint64 Session::diskQueueSize() const
{
return m_diskQueueSize;
}
void Session::setDiskQueueSize(const qint64 size)
{
if (size == m_diskQueueSize)
return;
m_diskQueueSize = size;
configureDeferred();
}
bool Session::useOSCache() const bool Session::useOSCache() const
{ {
return m_useOSCache; return m_useOSCache;

12
src/base/bittorrent/session.h

@ -343,11 +343,13 @@ namespace BitTorrent
bool announceToAllTiers() const; bool announceToAllTiers() const;
void setAnnounceToAllTiers(bool val); void setAnnounceToAllTiers(bool val);
int peerTurnover() const; int peerTurnover() const;
void setPeerTurnover(int num); void setPeerTurnover(int val);
int peerTurnoverCutoff() const; int peerTurnoverCutoff() const;
void setPeerTurnoverCutoff(int num); void setPeerTurnoverCutoff(int val);
int peerTurnoverInterval() const; int peerTurnoverInterval() const;
void setPeerTurnoverInterval(int num); void setPeerTurnoverInterval(int val);
int requestQueueSize() const;
void setRequestQueueSize(int val);
int asyncIOThreads() const; int asyncIOThreads() const;
void setAsyncIOThreads(int num); void setAsyncIOThreads(int num);
int hashingThreads() const; int hashingThreads() const;
@ -360,6 +362,8 @@ namespace BitTorrent
void setDiskCacheSize(int size); void setDiskCacheSize(int size);
int diskCacheTTL() const; int diskCacheTTL() const;
void setDiskCacheTTL(int ttl); void setDiskCacheTTL(int ttl);
qint64 diskQueueSize() const;
void setDiskQueueSize(qint64 size);
bool useOSCache() const; bool useOSCache() const;
void setUseOSCache(bool use); void setUseOSCache(bool use);
bool isCoalesceReadWriteEnabled() const; bool isCoalesceReadWriteEnabled() const;
@ -679,6 +683,7 @@ namespace BitTorrent
CachedSettingValue<int> m_checkingMemUsage; CachedSettingValue<int> m_checkingMemUsage;
CachedSettingValue<int> m_diskCacheSize; CachedSettingValue<int> m_diskCacheSize;
CachedSettingValue<int> m_diskCacheTTL; CachedSettingValue<int> m_diskCacheTTL;
CachedSettingValue<qint64> m_diskQueueSize;
CachedSettingValue<bool> m_useOSCache; CachedSettingValue<bool> m_useOSCache;
CachedSettingValue<bool> m_coalesceReadWriteEnabled; CachedSettingValue<bool> m_coalesceReadWriteEnabled;
CachedSettingValue<bool> m_usePieceExtentAffinity; CachedSettingValue<bool> m_usePieceExtentAffinity;
@ -760,6 +765,7 @@ namespace BitTorrent
CachedSettingValue<int> m_peerTurnover; CachedSettingValue<int> m_peerTurnover;
CachedSettingValue<int> m_peerTurnoverCutoff; CachedSettingValue<int> m_peerTurnoverCutoff;
CachedSettingValue<int> m_peerTurnoverInterval; CachedSettingValue<int> m_peerTurnoverInterval;
CachedSettingValue<int> m_requestQueueSize;
CachedSettingValue<QStringList> m_bannedIPs; CachedSettingValue<QStringList> m_bannedIPs;
CachedSettingValue<ResumeDataStorageType> m_resumeDataStorageType; CachedSettingValue<ResumeDataStorageType> m_resumeDataStorageType;
#if defined(Q_OS_WIN) #if defined(Q_OS_WIN)

19
src/gui/advancedsettings.cpp

@ -106,6 +106,7 @@ namespace
DISK_CACHE, DISK_CACHE,
DISK_CACHE_TTL, DISK_CACHE_TTL,
#endif #endif
DISK_QUEUE_SIZE,
OS_CACHE, OS_CACHE,
#ifndef QBT_USES_LIBTORRENT2 #ifndef QBT_USES_LIBTORRENT2
COALESCE_RW, COALESCE_RW,
@ -140,6 +141,7 @@ namespace
PEER_TURNOVER, PEER_TURNOVER,
PEER_TURNOVER_CUTOFF, PEER_TURNOVER_CUTOFF,
PEER_TURNOVER_INTERVAL, PEER_TURNOVER_INTERVAL,
REQUEST_QUEUE_SIZE,
ROW_COUNT ROW_COUNT
}; };
@ -212,6 +214,8 @@ void AdvancedSettings::saveAdvancedSettings()
session->setDiskCacheSize(m_spinBoxCache.value()); session->setDiskCacheSize(m_spinBoxCache.value());
session->setDiskCacheTTL(m_spinBoxCacheTTL.value()); session->setDiskCacheTTL(m_spinBoxCacheTTL.value());
#endif #endif
// Disk queue size
session->setDiskQueueSize(m_spinBoxDiskQueueSize.value() * 1024);
// Enable OS cache // Enable OS cache
session->setUseOSCache(m_checkBoxOsCache.isChecked()); session->setUseOSCache(m_checkBoxOsCache.isChecked());
#ifndef QBT_USES_LIBTORRENT2 #ifndef QBT_USES_LIBTORRENT2
@ -319,6 +323,8 @@ void AdvancedSettings::saveAdvancedSettings()
session->setPeerTurnover(m_spinBoxPeerTurnover.value()); session->setPeerTurnover(m_spinBoxPeerTurnover.value());
session->setPeerTurnoverCutoff(m_spinBoxPeerTurnoverCutoff.value()); session->setPeerTurnoverCutoff(m_spinBoxPeerTurnoverCutoff.value());
session->setPeerTurnoverInterval(m_spinBoxPeerTurnoverInterval.value()); session->setPeerTurnoverInterval(m_spinBoxPeerTurnoverInterval.value());
// Maximum outstanding requests to a single peer
session->setRequestQueueSize(m_spinBoxRequestQueueSize.value());
} }
#ifndef QBT_USES_LIBTORRENT2 #ifndef QBT_USES_LIBTORRENT2
@ -498,6 +504,13 @@ void AdvancedSettings::loadAdvancedSettings()
addRow(DISK_CACHE_TTL, (tr("Disk cache expiry interval") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#cache_expiry", "(?)")) addRow(DISK_CACHE_TTL, (tr("Disk cache expiry interval") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#cache_expiry", "(?)"))
, &m_spinBoxCacheTTL); , &m_spinBoxCacheTTL);
#endif #endif
// Disk queue size
m_spinBoxDiskQueueSize.setMinimum(1);
m_spinBoxDiskQueueSize.setMaximum(std::numeric_limits<int>::max());
m_spinBoxDiskQueueSize.setValue(session->diskQueueSize() / 1024);
m_spinBoxDiskQueueSize.setSuffix(tr(" KiB"));
addRow(DISK_QUEUE_SIZE, (tr("Disk queue size") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#max_queued_disk_bytes", "(?)"))
, &m_spinBoxDiskQueueSize);
// Enable OS cache // Enable OS cache
m_checkBoxOsCache.setChecked(session->useOSCache()); m_checkBoxOsCache.setChecked(session->useOSCache());
addRow(OS_CACHE, (tr("Enable OS cache") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#disk_io_write_mode", "(?)")) addRow(OS_CACHE, (tr("Enable OS cache") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#disk_io_write_mode", "(?)"))
@ -759,6 +772,12 @@ void AdvancedSettings::loadAdvancedSettings()
m_spinBoxPeerTurnoverInterval.setValue(session->peerTurnoverInterval()); m_spinBoxPeerTurnoverInterval.setValue(session->peerTurnoverInterval());
addRow(PEER_TURNOVER_INTERVAL, (tr("Peer turnover disconnect interval") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#peer_turnover", "(?)")) addRow(PEER_TURNOVER_INTERVAL, (tr("Peer turnover disconnect interval") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#peer_turnover", "(?)"))
, &m_spinBoxPeerTurnoverInterval); , &m_spinBoxPeerTurnoverInterval);
// Maximum outstanding requests to a single peer
m_spinBoxRequestQueueSize.setMinimum(1);
m_spinBoxRequestQueueSize.setMaximum(std::numeric_limits<int>::max());
m_spinBoxRequestQueueSize.setValue(session->requestQueueSize());
addRow(REQUEST_QUEUE_SIZE, (tr("Maximum outstanding requests to a single peer") + ' ' + makeLink("https://www.libtorrent.org/reference-Settings.html#max_out_request_queue", "(?)"))
, &m_spinBoxRequestQueueSize);
} }
template <typename T> template <typename T>

4
src/gui/advancedsettings.h

@ -58,11 +58,11 @@ private:
void loadAdvancedSettings(); void loadAdvancedSettings();
template <typename T> void addRow(int row, const QString &text, T *widget); template <typename T> void addRow(int row, const QString &text, T *widget);
QSpinBox m_spinBoxAsyncIOThreads, m_spinBoxFilePoolSize, m_spinBoxCheckingMemUsage, QSpinBox m_spinBoxAsyncIOThreads, m_spinBoxFilePoolSize, m_spinBoxCheckingMemUsage, m_spinBoxDiskQueueSize,
m_spinBoxSaveResumeDataInterval, m_spinBoxOutgoingPortsMin, m_spinBoxOutgoingPortsMax, m_spinBoxUPnPLeaseDuration, m_spinBoxPeerToS, m_spinBoxSaveResumeDataInterval, m_spinBoxOutgoingPortsMin, m_spinBoxOutgoingPortsMax, m_spinBoxUPnPLeaseDuration, m_spinBoxPeerToS,
m_spinBoxListRefresh, m_spinBoxTrackerPort, m_spinBoxSendBufferWatermark, m_spinBoxSendBufferLowWatermark, m_spinBoxListRefresh, m_spinBoxTrackerPort, m_spinBoxSendBufferWatermark, m_spinBoxSendBufferLowWatermark,
m_spinBoxSendBufferWatermarkFactor, m_spinBoxConnectionSpeed, m_spinBoxSocketBacklogSize, m_spinBoxMaxConcurrentHTTPAnnounces, m_spinBoxStopTrackerTimeout, m_spinBoxSendBufferWatermarkFactor, m_spinBoxConnectionSpeed, m_spinBoxSocketBacklogSize, m_spinBoxMaxConcurrentHTTPAnnounces, m_spinBoxStopTrackerTimeout,
m_spinBoxSavePathHistoryLength, m_spinBoxPeerTurnover, m_spinBoxPeerTurnoverCutoff, m_spinBoxPeerTurnoverInterval; m_spinBoxSavePathHistoryLength, m_spinBoxPeerTurnover, m_spinBoxPeerTurnoverCutoff, m_spinBoxPeerTurnoverInterval, m_spinBoxRequestQueueSize;
QCheckBox m_checkBoxOsCache, m_checkBoxRecheckCompleted, m_checkBoxResolveCountries, m_checkBoxResolveHosts, QCheckBox m_checkBoxOsCache, m_checkBoxRecheckCompleted, m_checkBoxResolveCountries, m_checkBoxResolveHosts,
m_checkBoxProgramNotifications, m_checkBoxTorrentAddedNotifications, m_checkBoxReannounceWhenAddressChanged, m_checkBoxTrackerFavicon, m_checkBoxTrackerStatus, m_checkBoxProgramNotifications, m_checkBoxTorrentAddedNotifications, m_checkBoxReannounceWhenAddressChanged, m_checkBoxTrackerFavicon, m_checkBoxTrackerStatus,
m_checkBoxConfirmTorrentRecheck, m_checkBoxConfirmRemoveAllTags, m_checkBoxAnnounceAllTrackers, m_checkBoxAnnounceAllTiers, m_checkBoxConfirmTorrentRecheck, m_checkBoxConfirmRemoveAllTags, m_checkBoxAnnounceAllTrackers, m_checkBoxAnnounceAllTiers,

10
src/webui/api/appcontroller.cpp

@ -306,6 +306,8 @@ void AppController::preferencesAction()
// Disk write cache // Disk write cache
data["disk_cache"] = session->diskCacheSize(); data["disk_cache"] = session->diskCacheSize();
data["disk_cache_ttl"] = session->diskCacheTTL(); data["disk_cache_ttl"] = session->diskCacheTTL();
// Disk queue size
data["disk_queue_size"] = session->diskQueueSize();
// Enable OS cache // Enable OS cache
data["enable_os_cache"] = session->useOSCache(); data["enable_os_cache"] = session->useOSCache();
// Coalesce reads & writes // Coalesce reads & writes
@ -358,6 +360,8 @@ void AppController::preferencesAction()
data["peer_turnover"] = session->peerTurnover(); data["peer_turnover"] = session->peerTurnover();
data["peer_turnover_cutoff"] = session->peerTurnoverCutoff(); data["peer_turnover_cutoff"] = session->peerTurnoverCutoff();
data["peer_turnover_interval"] = session->peerTurnoverInterval(); data["peer_turnover_interval"] = session->peerTurnoverInterval();
// Maximum outstanding requests to a single peer
data["request_queue_size"] = session->requestQueueSize();
setResult(data); setResult(data);
} }
@ -777,6 +781,9 @@ void AppController::setPreferencesAction()
session->setDiskCacheSize(it.value().toInt()); session->setDiskCacheSize(it.value().toInt());
if (hasKey("disk_cache_ttl")) if (hasKey("disk_cache_ttl"))
session->setDiskCacheTTL(it.value().toInt()); session->setDiskCacheTTL(it.value().toInt());
// Disk queue size
if (hasKey("disk_queue_size"))
session->setDiskQueueSize(it.value().toLongLong());
// Enable OS cache // Enable OS cache
if (hasKey("enable_os_cache")) if (hasKey("enable_os_cache"))
session->setUseOSCache(it.value().toBool()); session->setUseOSCache(it.value().toBool());
@ -863,6 +870,9 @@ void AppController::setPreferencesAction()
session->setPeerTurnoverCutoff(it.value().toInt()); session->setPeerTurnoverCutoff(it.value().toInt());
if (hasKey("peer_turnover_interval")) if (hasKey("peer_turnover_interval"))
session->setPeerTurnoverInterval(it.value().toInt()); session->setPeerTurnoverInterval(it.value().toInt());
// Maximum outstanding requests to a single peer
if (hasKey("request_queue_size"))
session->setRequestQueueSize(it.value().toInt());
// Save preferences // Save preferences
pref->apply(); pref->apply();

2
src/webui/webapplication.h

@ -44,7 +44,7 @@
#include "base/utils/net.h" #include "base/utils/net.h"
#include "base/utils/version.h" #include "base/utils/version.h"
inline const Utils::Version<int, 3, 2> API_VERSION {2, 8, 6}; inline const Utils::Version<int, 3, 2> API_VERSION {2, 8, 7};
class APIController; class APIController;
class WebApplication; class WebApplication;

20
src/webui/www/private/views/preferences.html

@ -1012,6 +1012,14 @@
<input type="text" id="diskCacheExpiryInterval" style="width: 15em;">&nbsp;&nbsp;QBT_TR(s)QBT_TR[CONTEXT=OptionsDialog] <input type="text" id="diskCacheExpiryInterval" style="width: 15em;">&nbsp;&nbsp;QBT_TR(s)QBT_TR[CONTEXT=OptionsDialog]
</td> </td>
</tr> </tr>
<tr>
<td>
<label for="diskQueueSize">QBT_TR(Disk queue size:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#max_queued_disk_bytes" target="_blank">(?)</a></label>
</td>
<td>
<input type="text" id="diskQueueSize" style="width: 15em;">&nbsp;&nbsp;QBT_TR(KiB)QBT_TR[CONTEXT=OptionsDialog]
</td>
</tr>
<tr> <tr>
<td> <td>
<label for="enableOSCache">QBT_TR(Enable OS cache:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#disk_io_write_mode" target="_blank">(?)</a></label> <label for="enableOSCache">QBT_TR(Enable OS cache:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#disk_io_write_mode" target="_blank">(?)</a></label>
@ -1254,6 +1262,14 @@
<input type="text" id="peerTurnoverInterval" style="width: 15em;" />&nbsp;&nbsp;s <input type="text" id="peerTurnoverInterval" style="width: 15em;" />&nbsp;&nbsp;s
</td> </td>
</tr> </tr>
<tr>
<td>
<label for="requestQueueSize">QBT_TR(Maximum outstanding requests to a single peer:)QBT_TR[CONTEXT=OptionsDialog]&nbsp;<a href="https://www.libtorrent.org/reference-Settings.html#max_out_request_queue" target="_blank">(?)</a></label>
</td>
<td>
<input type="text" id="requestQueueSize" style="width: 15em;" />
</td>
</tr>
</table> </table>
</fieldset> </fieldset>
</div> </div>
@ -1931,6 +1947,7 @@
$('outstandMemoryWhenCheckingTorrents').setProperty('value', pref.checking_memory_use); $('outstandMemoryWhenCheckingTorrents').setProperty('value', pref.checking_memory_use);
$('diskCache').setProperty('value', pref.disk_cache); $('diskCache').setProperty('value', pref.disk_cache);
$('diskCacheExpiryInterval').setProperty('value', pref.disk_cache_ttl); $('diskCacheExpiryInterval').setProperty('value', pref.disk_cache_ttl);
$('diskQueueSize').setProperty('value', (pref.disk_queue_size / 1024));
$('enableOSCache').setProperty('checked', pref.enable_os_cache); $('enableOSCache').setProperty('checked', pref.enable_os_cache);
$('coalesceReadsAndWrites').setProperty('checked', pref.enable_coalesce_read_write); $('coalesceReadsAndWrites').setProperty('checked', pref.enable_coalesce_read_write);
$('pieceExtentAffinity').setProperty('checked', pref.enable_piece_extent_affinity); $('pieceExtentAffinity').setProperty('checked', pref.enable_piece_extent_affinity);
@ -1962,6 +1979,7 @@
$('peerTurnover').setProperty('value', pref.peer_turnover); $('peerTurnover').setProperty('value', pref.peer_turnover);
$('peerTurnoverCutoff').setProperty('value', pref.peer_turnover_cutoff); $('peerTurnoverCutoff').setProperty('value', pref.peer_turnover_cutoff);
$('peerTurnoverInterval').setProperty('value', pref.peer_turnover_interval); $('peerTurnoverInterval').setProperty('value', pref.peer_turnover_interval);
$('requestQueueSize').setProperty('value', pref.request_queue_size);
} }
} }
}).send(); }).send();
@ -2326,6 +2344,7 @@
settings.set('checking_memory_use', $('outstandMemoryWhenCheckingTorrents').getProperty('value')); settings.set('checking_memory_use', $('outstandMemoryWhenCheckingTorrents').getProperty('value'));
settings.set('disk_cache', $('diskCache').getProperty('value')); settings.set('disk_cache', $('diskCache').getProperty('value'));
settings.set('disk_cache_ttl', $('diskCacheExpiryInterval').getProperty('value')); settings.set('disk_cache_ttl', $('diskCacheExpiryInterval').getProperty('value'));
settings.set('disk_queue_size', ($('diskQueueSize').getProperty('value') * 1024));
settings.set('enable_os_cache', $('enableOSCache').getProperty('checked')); settings.set('enable_os_cache', $('enableOSCache').getProperty('checked'));
settings.set('enable_coalesce_read_write', $('coalesceReadsAndWrites').getProperty('checked')); settings.set('enable_coalesce_read_write', $('coalesceReadsAndWrites').getProperty('checked'));
settings.set('enable_piece_extent_affinity', $('pieceExtentAffinity').getProperty('checked')); settings.set('enable_piece_extent_affinity', $('pieceExtentAffinity').getProperty('checked'));
@ -2357,6 +2376,7 @@
settings.set('peer_turnover', $('peerTurnover').getProperty('value')); settings.set('peer_turnover', $('peerTurnover').getProperty('value'));
settings.set('peer_turnover_cutoff', $('peerTurnoverCutoff').getProperty('value')); settings.set('peer_turnover_cutoff', $('peerTurnoverCutoff').getProperty('value'));
settings.set('peer_turnover_interval', $('peerTurnoverInterval').getProperty('value')); settings.set('peer_turnover_interval', $('peerTurnoverInterval').getProperty('value'));
settings.set('request_queue_size', $('requestQueueSize').getProperty('value'));
// Send it to qBT // Send it to qBT
const json_str = JSON.encode(settings); const json_str = JSON.encode(settings);

Loading…
Cancel
Save