From 549e20cf7766dc7fba2f42883659a6bcac863d91 Mon Sep 17 00:00:00 2001 From: Monty Brandenberg Date: Mon, 5 Aug 2013 13:54:14 -0400 Subject: Change the setting for GetMesh2 meshes to Mesh2MaxConcurrentRequests. While linking GetMesh2 to the old setting was simpler from a user point-of-view, they really shouldn't be linked and the old one will go away. This one may be renamed to AssetMaxConcurrentRequests or something similar if we get to the mesh/texture unification step. --- indra/newview/app_settings/settings.xml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'indra/newview/app_settings/settings.xml') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 344079b640..770a8529f1 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9708,11 +9708,21 @@ Value 16 - + Mesh2MaxConcurrentRequests + + Comment + Number of connections to use for loading meshes. + Persist + 1 + Type + U32 + Value + 8 + MeshMaxConcurrentRequests Comment - Number of threads to use for loading meshes. + Number of connections to use for loading meshes (legacy system). Persist 1 Type -- cgit v1.3 From 2e8e40cf7974a4ab6ca13d264104dbb8b80419b7 Mon Sep 17 00:00:00 2001 From: Monty Brandenberg Date: Wed, 11 Sep 2013 18:00:55 -0400 Subject: SH-4489 New debug/dev settings for control over new mesh behavior Added 'MeshUseGetMesh1' and 'MeshUseHttpRetryAfter' debug settings to control mesh transport behavior. First forces the use of the legacy mesh fetch style with high concurrency and connection churn. The second, on by default, honors Retry-After values if they are reasonable. If off or unreasonable, internal delay times are used. --- indra/llcorehttp/httpoptions.h | 2 +- indra/newview/app_settings/settings.xml | 22 ++++++++++++++++++++++ indra/newview/llmeshrepository.cpp | 8 +++++++- 3 files changed, 30 insertions(+), 2 deletions(-) (limited to 'indra/newview/app_settings/settings.xml') diff --git a/indra/llcorehttp/httpoptions.h b/indra/llcorehttp/httpoptions.h index f49a3555aa..4ab5ff18c4 100755 --- a/indra/llcorehttp/httpoptions.h +++ b/indra/llcorehttp/httpoptions.h @@ -103,7 +103,7 @@ public: return mRetries; } - // Default: false + // Default: true void setUseRetryAfter(bool use_retry); bool getUseRetryAfter() const { diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 47a2f402af..9948f9974a 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9979,6 +9979,28 @@ U32 Value 32 + + MeshUseHttpRetryAfter + + Comment + If TRUE, use Retry-After response headers when rescheduling a mesh request that fails with an HTTP 503 status. + Persist + 1 + Type + Boolean + Value + 1 + + MeshUseGetMesh1 + + Comment + If TRUE, use the legacy GetMesh capability for mesh download requests. + Persist + 1 + Type + Boolean + Value + 0 RunMultipleThreads diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index f6a85ac94f..507797a85d 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -743,8 +743,10 @@ LLMeshRepoThread::LLMeshRepoThread() mHttpRequest = new LLCore::HttpRequest; mHttpOptions = new LLCore::HttpOptions; mHttpOptions->setTransferTimeout(SMALL_MESH_XFER_TIMEOUT); + mHttpOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter")); mHttpLargeOptions = new LLCore::HttpOptions; mHttpLargeOptions->setTransferTimeout(LARGE_MESH_XFER_TIMEOUT); + mHttpLargeOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter")); mHttpHeaders = new LLCore::HttpHeaders; mHttpHeaders->append("Accept", "application/vnd.ll.mesh"); mHttpPolicyClass = LLAppViewer::instance()->getAppCoreHttp().getPolicy(LLAppCoreHttp::AP_MESH2); @@ -1828,6 +1830,7 @@ LLMeshUploadThread::LLMeshUploadThread(LLMeshUploadThread::instance_list& data, mHttpRequest = new LLCore::HttpRequest; mHttpOptions = new LLCore::HttpOptions; mHttpOptions->setTransferTimeout(mMeshUploadTimeOut); + mHttpOptions->setUseRetryAfter(gSavedSettings.getBOOL("MeshUseHttpRetryAfter")); mHttpHeaders = new LLCore::HttpHeaders; mHttpHeaders->append("Content-Type", "application/llsd+xml"); mHttpPolicyClass = LLAppViewer::instance()->getAppCoreHttp().getPolicy(LLAppCoreHttp::AP_UPLOADS); @@ -3211,13 +3214,16 @@ void LLMeshRepository::notifyLoadedMeshes() if (gAgent.getRegion()->getName() != region_name && gAgent.getRegion()->capabilitiesReceived()) { + const bool use_v1(gSavedSettings.getBOOL("MeshUseGetMesh1")); + region_name = gAgent.getRegion()->getName(); mGetMeshCapability = gAgent.getRegion()->getCapability("GetMesh"); mGetMesh2Capability = gAgent.getRegion()->getCapability("GetMesh2"); - mGetMeshVersion = mGetMesh2Capability.empty() ? 1 : 2; + mGetMeshVersion = (mGetMesh2Capability.empty() || use_v1) ? 1 : 2; LL_DEBUGS(LOG_MESH) << "Retrieving caps for region '" << region_name << "', GetMesh2: " << mGetMesh2Capability << ", GetMesh: " << mGetMeshCapability + << ", using version: " << mGetMeshVersion << LL_ENDL; } } -- cgit v1.3 From 99c60b83f15a3c40ecf0e5f144cfc060b37c4cf8 Mon Sep 17 00:00:00 2001 From: Monty Brandenberg Date: Thu, 12 Sep 2013 20:15:20 -0400 Subject: SH-4489 New debug/dev settings for control over new mesh behavior While giving myself a full project code review, found a bug in the MeshUseGetMesh1 setting. Mostly defaulted to old configuration but used the GetMesh2 caps which would have been a huge DoS resource sink. Did some documentation maintenance as well while I was in there. More for the to-do list, etc. --- indra/newview/app_settings/settings.xml | 4 ++-- indra/newview/llmeshrepository.cpp | 17 +++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) (limited to 'indra/newview/app_settings/settings.xml') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 9948f9974a..60fc2d349d 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9983,7 +9983,7 @@ MeshUseHttpRetryAfter Comment - If TRUE, use Retry-After response headers when rescheduling a mesh request that fails with an HTTP 503 status. + If TRUE, use Retry-After response headers when rescheduling a mesh request that fails with an HTTP 503 status. Static. Persist 1 Type @@ -9994,7 +9994,7 @@ MeshUseGetMesh1 Comment - If TRUE, use the legacy GetMesh capability for mesh download requests. + If TRUE, use the legacy GetMesh capability for mesh download requests. Semi-dynamic (read at region crossings). Persist 1 Type diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 353e7e9a7f..c3d149db9a 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -282,10 +282,15 @@ // dialog. Get the structured information going into the log into a // tree there. // * Header parse failures come without much explanation. Elaborate. -// * Need a final failure state for requests that are retried and just won't -// complete. We can fail a LOD request, others we don't. - - +// * Work queue for uploads? Any need for this or is the current scheme good +// enough? +// * Various temp buffers used in VFS I/O might be allocated once or even +// statically. Look for some wins here. +// * Move data structures holding mesh data used by main thread into main- +// thread-only access so that no locking is needed. May require duplication +// of some data so that worker thread has a minimal data set to guide +// operations. +// // -------------------------------------------------------------------------- // Development/Debug/QA Tools // @@ -1052,7 +1057,7 @@ std::string LLMeshRepoThread::constructUrl(LLUUID mesh_id) if (gAgent.getRegion()) { - if (! gMeshRepo.mGetMesh2Capability.empty()) + if (! gMeshRepo.mGetMesh2Capability.empty() && gMeshRepo.mGetMeshVersion > 1) { http_url = gMeshRepo.mGetMesh2Capability; } @@ -2181,7 +2186,7 @@ void LLMeshUploadThread::doWholeModelUpload() LLCore::BufferArray * ba = new LLCore::BufferArray; LLCore::BufferArrayStream bas(ba); LLSDSerialize::toXML(body, bas); - // LLSDSerialize::toXML(mModelData, bas); // <- This will generate a convenient upload error + // LLSDSerialize::toXML(mModelData, bas); // <- Enabling this will generate a convenient upload error LLCore::HttpHandle handle = mHttpRequest->requestPost(mHttpPolicyClass, mHttpPriority, mWholeModelUploadURL, -- cgit v1.3