diff --git a/indra/llfilesystem/lldiskcache.cpp b/indra/llfilesystem/lldiskcache.cpp
index c0b3a8561895d8063ae8776614169b713b8a75f4..75e268309af832422a88b64552a8eaffc5afdbd7 100644
--- a/indra/llfilesystem/lldiskcache.cpp
+++ b/indra/llfilesystem/lldiskcache.cpp
@@ -43,7 +43,7 @@ std::string LLDiskCache::sCacheDir = "";
 std::string LLDiskCache::sCacheFilenameExt = ".sl_cache";
 
 LLDiskCache::LLDiskCache(const std::string cache_dir,
-                         const int max_size_bytes,
+                         const uintmax_t max_size_bytes,
                          const bool enable_cache_debug_info) :
     mMaxSizeBytes(max_size_bytes),
     mEnableCacheDebugInfo(enable_cache_debug_info)
diff --git a/indra/llfilesystem/lldiskcache.h b/indra/llfilesystem/lldiskcache.h
index 494f78ebcd3096db54063595f8a3b43ee757117e..2e244bf5b1ed1d690bbd86140e83647a9c8103ba 100644
--- a/indra/llfilesystem/lldiskcache.h
+++ b/indra/llfilesystem/lldiskcache.h
@@ -86,7 +86,7 @@ class LLDiskCache :
                      * The maximum size of the cache in bytes - Based on the
                      * setting at 'CacheSize' and 'DiskCachePercentOfTotal'
                      */
-                    const int max_size_bytes,
+                    const uintmax_t max_size_bytes,
                     /**
                      * A flag that enables extra cache debugging so that
                      * if there are bugs, we can ask uses to enable this
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index b105e490aa51c031e5852cc28d2b5edc5661a5bd..50d6775d9a82c9bb25e442a43e9740f130293e11 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1751,6 +1751,28 @@
       <key>Value</key>
       <integer>128</integer>
     </map>
+    <key>DiskCacheSize</key>
+    <map>
+      <key>Comment</key>
+      <string>Controls amount of hard drive space reserved for local file caching in MB</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>U32</string>
+      <key>Value</key>
+      <integer>1024</integer>
+    </map>
+    <key>TextureCacheSize</key>
+    <map>
+      <key>Comment</key>
+      <string>Controls amount of hard drive space reserved for texture file caching in MB</string>
+      <key>Persist</key>
+      <integer>1</integer>
+      <key>Type</key>
+      <string>U32</string>
+      <key>Value</key>
+      <integer>1024</integer>
+    </map>
     <key>CacheSize</key>
     <map>
       <key>Comment</key>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index a064b2d6cb1031040025c04a4d46a7173dc78949..045c0c8848930817c58d34588c01839afe747118 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -4162,10 +4162,9 @@ bool LLAppViewer::initCache()
 
     // note that the maximum size of this cache is defined as a percentage of the 
     // total cache size - the 'CacheSize' pref - for all caches. 
-    const unsigned int cache_total_size_mb = gSavedSettings.getU32("CacheSize");
-    const double disk_cache_percent = gSavedSettings.getF32("DiskCachePercentOfTotal");
-    const unsigned int disk_cache_mb = cache_total_size_mb * disk_cache_percent / 100;
-    const unsigned int disk_cache_bytes = disk_cache_mb * 1024 * 1024;
+    const unsigned int cache_total_size_mb = gSavedSettings.getU32("DiskCacheSize");
+    const uintmax_t disk_cache_mb = cache_total_size_mb;
+    const uintmax_t disk_cache_bytes = disk_cache_mb * 1024 * 1024;
 
 	bool texture_cache_mismatch = false;
 	if (gSavedSettings.getS32("LocalCacheVersion") != LLAppViewer::getTextureCacheVersion())
@@ -4239,16 +4238,13 @@ bool LLAppViewer::initCache()
 	// Init the texture cache
 	// Allocate 80% of the cache size for textures
 	const S32 MB = 1024 * 1024;
-	const S64 MIN_CACHE_SIZE = 256 * MB;
+	const S64 MIN_CACHE_SIZE = 512 * MB;
 	const S64 MAX_CACHE_SIZE = 9984ll * MB;
 
-	S64 cache_size = (S64)(gSavedSettings.getU32("CacheSize")) * MB;
-	cache_size = llclamp(cache_size, MIN_CACHE_SIZE, MAX_CACHE_SIZE);
+	S64 texture_cache_size = (S64)(gSavedSettings.getU32("TextureCacheSize")) * MB;
+	texture_cache_size = llclamp(texture_cache_size, MIN_CACHE_SIZE, MAX_CACHE_SIZE);
 
-	S64 texture_cache_size = cache_size;
-
-	S64 extra = LLAppViewer::getTextureCache()->initCache(LL_PATH_CACHE, texture_cache_size, texture_cache_mismatch);
-	texture_cache_size -= extra;
+	LLAppViewer::getTextureCache()->initCache(LL_PATH_CACHE, texture_cache_size, texture_cache_mismatch);
 
 	LLVOCache::getInstance()->initCache(LL_PATH_CACHE, gSavedSettings.getU32("CacheNumberOfRegionsForObjects"), getObjectCacheVersion());
 
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
index d0518aa2450ebf9ae95267ca7193a090cf0897f6..5aa5ff4f8e271bb4c8c8da9301b98f632324bc05 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_advanced.xml
@@ -9,73 +9,90 @@
  name="advanced"
  top="1"
  width="517">
-	<panel.string
+  <panel.string
      name="aspect_ratio_text">
-        [NUM]:[DEN]
-    </panel.string>
+    [NUM]:[DEN]
+  </panel.string>
   <text
    type="string"
    length="1"
    follows="left|top"
    height="12"
    layout="topleft"
-   left="33"
+   left="10"
    name="Cache:"
    top_pad="10"
    width="100">
     Cache:
   </text>
-  <spinner
-   control_name="CacheSize"
+  <slider
+   can_edit_text="true"
+   control_name="DiskCacheSize"
    decimal_digits="0"
    follows="left|top"
-   height="23"
-   increment="64"
+   height="15"
+   increment="512"
    initial_value="1024"
-   label="Cache size (256 - 9984MB)"
-   label_width="150"
+   label="Disk Cache size (1024 - 16384MB)"
    layout="topleft"
-   left="80"
-   max_val="9984"
-   min_val="256"
+   left="20"
+   max_val="16384"
+   min_val="1024"
    top_pad="10"
-   name="cachesizespinner"
-   width="200" />
+   name="disk_cache_size"
+   width="460" />
   <text
    type="string"
    length="1"
    follows="left|top"
-   height="23"
+   height="10"
    layout="topleft"
-   left_pad="5"
+   left_pad="6"
+   top_delta="1"
    mouse_opaque="false"
-   name="text_box5"
+   name="disk_cache_mb_text"
    width="20">
     MB
   </text>
-  <button
+  <slider
+   can_edit_text="true"
+   control_name="TextureCacheSize"
+   decimal_digits="0"
    follows="left|top"
-   height="23"
-   label="Clear Cache"
-   label_selected="Clear Cache"
+   height="15"
+   increment="64"
+   initial_value="1024"
+   label="Texture Cache size (1024 - 9984MB)"
    layout="topleft"
-   left_pad="30"
-   name="clear_cache"
-   top_delta="0"
-   width="100">
-  <button.commit_callback
-   function="Pref.ClearCache" />
-  </button>
+   left="20"
+   max_val="9984"
+   min_val="1024"
+   top_pad="10"
+   name="texture_cache_size"
+   width="460" />
   <text
    type="string"
    length="1"
    follows="left|top"
    height="10"
    layout="topleft"
-   left="80"
+   left_pad="6"
+   top_delta="1"
+   mouse_opaque="false"
+   name="tex_cache_mb_text"
+   width="20">
+    MB
+  </text>
+  <text
+   type="string"
+   length="1"
+   follows="left|top"
+   height="10"
+   layout="topleft"
+   left="20"
    name="Cache location"
-   top_pad="5"
-   width="300">
+   top_pad="10"
+   width="100">
     Cache location:
   </text>
   <line_editor
@@ -86,11 +103,11 @@
    font="SansSerif"
    height="23"
    layout="topleft"
-   left="80"
+   left="20"
    max_length_bytes="4096"
    name="cache_location"
    top_pad="5"
-   width="205" />
+   width="250" />
   <button
    follows="left|top"
    height="23"
@@ -100,9 +117,9 @@
    left_pad="5"
    name="set_cache"
    top_delta="0"
-   width="100">
-  <button.commit_callback
-   function="Pref.SetCache" />
+   width="50">
+    <button.commit_callback
+     function="Pref.SetCache" />
   </button>
   <button
     follows="left|top"
@@ -117,16 +134,29 @@
     <button.commit_callback
      function="Pref.ResetCache" />
   </button>
-   <text
-   type="string"
-   length="1"
+  <button
    follows="left|top"
-   height="12"
+   height="23"
+   label="Clear Cache"
+   label_selected="Clear Cache"
    layout="topleft"
-   left="33"
-   name="UI Size:"
-   top_pad="20"
-   width="100">
+   left_pad="5"
+   name="clear_cache"
+   top_delta="0"
+   width="80">
+    <button.commit_callback
+     function="Pref.ClearCache" />
+  </button>
+  <text
+  type="string"
+  length="1"
+  follows="left|top"
+  height="12"
+  layout="topleft"
+  left="10"
+  name="UI Size:"
+  top_pad="10"
+  width="100">
     UI size:
   </text>
   <slider
@@ -149,9 +179,9 @@
   follows="left|top"
   height="12"
   layout="topleft"
-  left="33"
+  left="10"
   name="HUD Size:"
-  top_pad="20"
+  top_pad="10"
   width="100">
     HUD Scale:
   </text>
@@ -169,93 +199,93 @@
    name="ui_scale_slider"
    top_pad="-14"
    width="250" />
-    <check_box
-     control_name="ShowScriptErrors"
-     follows="left|top"
-     height="20"
-     label="Show script errors in:"
+  <check_box
+   control_name="ShowScriptErrors"
+   follows="left|top"
+   height="20"
+   label="Show script errors in:"
+   layout="topleft"
+   left="10"
+   top_pad="10"
+   name="show_script_errors"
+   width="256" />
+  <radio_group
+   enabled_control="ShowScriptErrors"
+   control_name="ShowScriptErrorsLocation"
+   follows="top|left"
+   height="16"
+   layout="topleft"
+   left_delta="50"
+   name="show_location"
+   top_pad="5"
+   width="364">
+    <radio_item
+     height="16"
+     label="Nearby chat"
      layout="topleft"
-     left="30"
-     top_pad="10" 
-     name="show_script_errors"
-     width="256" />
-    <radio_group
-     enabled_control="ShowScriptErrors"
-     control_name="ShowScriptErrorsLocation"
-     follows="top|left"
+     left="3"
+     name="0"
+     top="0"
+     width="315" />
+    <radio_item
      height="16"
+     label="Separate window"
      layout="topleft"
-     left_delta="50"
-     name="show_location"
-     top_pad="5"
-     width="364">
-        <radio_item
-         height="16"
-         label="Nearby chat"
-         layout="topleft"
-         left="3"
-         name="0"
-         top="0"
-         width="315" />
-        <radio_item
-         height="16"
-         label="Separate window"
-         layout="topleft"
-         left_delta="175"
-         name="1"
-         top_delta="0"
-         width="315" />
-    </radio_group>
+     left_delta="175"
+     name="1"
+     top_delta="0"
+     width="315" />
+  </radio_group>
 
-    <check_box
-     control_name="AllowMultipleViewers"
-     follows="top|left"
-     height="15"
-     label="Allow Multiple Viewers"
-     layout="topleft"
-     left="30"
-     name="allow_multiple_viewer_check"
-     top_pad="20"
-     width="237"/>
-    <check_box
-     control_name="ForceShowGrid"
-     follows="top|left"
-     height="15"
-     label="Show Grid Selection at login"
-     layout="topleft"
-     left="30"
-     name="show_grid_selection_check"
-     top_pad="5"
-     width="237"/>
-    <check_box
-     control_name="UseDebugMenus"
-     follows="top|left"
-     height="15"
-     label="Show Advanced Menu"
-     layout="topleft"
-     left="30"
-     name="show_advanced_menu_check"
-     top_pad="5"
-     width="237"/>
-    <check_box
-     control_name="QAMode"
-     follows="top|left"
-     height="15"
-     label="Show Develop Menu"
-     layout="topleft"
-     left="30"
-     name="show_develop_menu_check"
-     top_pad="5"
-     width="237"/>
-    <button
-     follows="top|left"
-     layout="topleft"
-     label="Remembered Usernames"
-     name="remembered_usernames"
-     height="20"
-     left="30"
-     top_pad="16"
-     width="200">
+  <check_box
+   control_name="AllowMultipleViewers"
+   follows="top|left"
+   height="15"
+   label="Allow Multiple Viewers"
+   layout="topleft"
+   left="10"
+   name="allow_multiple_viewer_check"
+   top_pad="10"
+   width="237"/>
+  <check_box
+   control_name="ForceShowGrid"
+   follows="top|left"
+   height="15"
+   label="Show Grid Selection at login"
+   layout="topleft"
+   left="10"
+   name="show_grid_selection_check"
+   top_pad="5"
+   width="237"/>
+  <check_box
+   control_name="UseDebugMenus"
+   follows="top|left"
+   height="15"
+   label="Show Advanced Menu"
+   layout="topleft"
+   left="10"
+   name="show_advanced_menu_check"
+   top_pad="5"
+   width="237"/>
+  <check_box
+   control_name="QAMode"
+   follows="top|left"
+   height="15"
+   label="Show Develop Menu"
+   layout="topleft"
+   left="10"
+   name="show_develop_menu_check"
+   top_pad="5"
+   width="237"/>
+  <button
+   follows="top|left"
+   layout="topleft"
+   label="Remembered Usernames"
+   name="remembered_usernames"
+   height="20"
+   left="10"
+   top_pad="5"
+   width="200">
     <button.commit_callback
      function="Pref.RememberedUsernames" />
   </button>
@@ -265,8 +295,8 @@
      label="Default Creation Permissions"
      name="default_creation_permissions"
      height="20"
-     left="30"
-     top_pad="16"
+     left="10"
+     top_pad="5"
      width="200">
     <button.commit_callback
      function="Pref.PermsDefault" />