From 465d1095dd0dd5c4c5231a81bb69e46a21f290fb Mon Sep 17 00:00:00 2001 From: dahlia Date: Tue, 18 Aug 2009 17:06:14 -0700 Subject: Added new OpenSim.ini setting: "client_throttle_max_bps" which overrides user's viewer network throttle settings --- .../Region/ClientStack/LindenUDP/LLPacketQueue.cs | 36 +++++++++++++--------- .../Region/ClientStack/LindenUDP/LLUDPServer.cs | 11 +++++-- 2 files changed, 31 insertions(+), 16 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs index bf0b06d..798c1e7 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLPacketQueue.cs @@ -128,28 +128,36 @@ namespace OpenSim.Region.ClientStack.LindenUDP // Store the throttle multiplier for posterity. throttleMultiplier = userSettings.ClientThrottleMultipler; + + int throttleMaxBPS = 1500000; + if (userSettings.TotalThrottleSettings != null) + throttleMaxBPS = userSettings.TotalThrottleSettings.Max; + // Set up the throttle classes (min, max, current) in bits per second - ResendThrottle = new LLPacketThrottle(5000, 100000, 16000, userSettings.ClientThrottleMultipler); - LandThrottle = new LLPacketThrottle(1000, 100000, 2000, userSettings.ClientThrottleMultipler); - WindThrottle = new LLPacketThrottle(0, 100000, 0, userSettings.ClientThrottleMultipler); - CloudThrottle = new LLPacketThrottle(0, 100000, 0, userSettings.ClientThrottleMultipler); - TaskThrottle = new LLPacketThrottle(1000, 800000, 3000, userSettings.ClientThrottleMultipler); - AssetThrottle = new LLPacketThrottle(1000, 800000, 1000, userSettings.ClientThrottleMultipler); - TextureThrottle = new LLPacketThrottle(1000, 800000, 4000, userSettings.ClientThrottleMultipler); - - // Total Throttle trumps all - it is the number of bits in total that are allowed to go out per second. + ResendThrottle = new LLPacketThrottle(5000, throttleMaxBPS / 15, 16000, userSettings.ClientThrottleMultipler); + LandThrottle = new LLPacketThrottle(1000, throttleMaxBPS / 15, 2000, userSettings.ClientThrottleMultipler); + WindThrottle = new LLPacketThrottle(0, throttleMaxBPS / 15, 0, userSettings.ClientThrottleMultipler); + CloudThrottle = new LLPacketThrottle(0, throttleMaxBPS / 15, 0, userSettings.ClientThrottleMultipler); + TaskThrottle = new LLPacketThrottle(1000, throttleMaxBPS / 2, 3000, userSettings.ClientThrottleMultipler); + AssetThrottle = new LLPacketThrottle(1000, throttleMaxBPS / 2, 1000, userSettings.ClientThrottleMultipler); + TextureThrottle = new LLPacketThrottle(1000, throttleMaxBPS / 2, 4000, userSettings.ClientThrottleMultipler); + + + // Total Throttle trumps all - it is the number of bits in total that are allowed to go out per second. + + ThrottleSettings totalThrottleSettings = userSettings.TotalThrottleSettings; if (null == totalThrottleSettings) - { - totalThrottleSettings = new ThrottleSettings(0, 1500000, 28000); + { + totalThrottleSettings = new ThrottleSettings(0, throttleMaxBPS, 28000); } - - TotalThrottle + + TotalThrottle = new LLPacketThrottle( totalThrottleSettings.Min, totalThrottleSettings.Max, totalThrottleSettings.Current, userSettings.ClientThrottleMultipler); - throttleTimer = new Timer((int) (throttletimems/throttleTimeDivisor)); + throttleTimer = new Timer((int)(throttletimems / throttleTimeDivisor)); throttleTimer.Elapsed += ThrottleTimerElapsed; throttleTimer.Start(); diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs index 5184e35..9ee8df5 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs @@ -152,11 +152,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP ClientStackUserSettings userSettings = new ClientStackUserSettings(); IConfig config = configSource.Configs["ClientStack.LindenUDP"]; - + if (config != null) { + if (config.Contains("client_throttle_max_bps")) + { + int maxBPS = config.GetInt("client_throttle_max_bps", 1500000); + userSettings.TotalThrottleSettings = new ThrottleSettings(0, maxBPS, + maxBPS > 28000 ? maxBPS : 28000); + } + if (config.Contains("client_throttle_multiplier")) - userSettings.ClientThrottleMultipler = config.GetFloat("client_throttle_multiplier"); + userSettings.ClientThrottleMultipler = config.GetFloat("client_throttle_multiplier"); if (config.Contains("client_socket_rcvbuf_size")) m_clientSocketReceiveBuffer = config.GetInt("client_socket_rcvbuf_size"); } -- cgit v1.1 From 124f66bfc25984a01491b8447fa97bea2633281c Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 18 Aug 2009 22:17:47 -0700 Subject: jhurliman's patch in http://opensimulator.org/mantis/view.php?id=4024 --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 06bea3d..16ce9e0 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -6633,9 +6633,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP } else // Agent { - //InventoryItemBase assetRequestItem = userInfo.RootFolder.FindItem(itemID); IInventoryService invService = m_scene.RequestModuleInterface(); - InventoryItemBase assetRequestItem = invService.GetItem(new InventoryItemBase(itemID)); + InventoryItemBase assetRequestItem = new InventoryItemBase(itemID, AgentId); + assetRequestItem = invService.GetItem(assetRequestItem); if (assetRequestItem == null) { assetRequestItem = ((Scene)m_scene).CommsManager.UserProfileCacheService.LibraryRoot.FindItem(itemID); -- cgit v1.1 From c5af39239f7f2a1725d9c08bea80522de8835e0f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 19 Aug 2009 00:13:51 -0700 Subject: A better purge of trash folder. --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 25 +++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 16ce9e0..e2fb659 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -7053,14 +7053,17 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (OnRemoveInventoryItem != null) { handlerRemoveInventoryItem = null; + List uuids = new List(); foreach (RemoveInventoryItemPacket.InventoryDataBlock datablock in removeItem.InventoryData) { - handlerRemoveInventoryItem = OnRemoveInventoryItem; - if (handlerRemoveInventoryItem != null) - { - handlerRemoveInventoryItem(this, datablock.ItemID); - } + uuids.Add(datablock.ItemID); } + handlerRemoveInventoryItem = OnRemoveInventoryItem; + if (handlerRemoveInventoryItem != null) + { + handlerRemoveInventoryItem(this, uuids); + } + } break; case PacketType.RemoveInventoryFolder: @@ -7116,13 +7119,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (OnRemoveInventoryItem != null) { handlerRemoveInventoryItem = null; + List uuids = new List(); foreach (RemoveInventoryObjectsPacket.ItemDataBlock datablock in removeObject.ItemData) { - handlerRemoveInventoryItem = OnRemoveInventoryItem; - if (handlerRemoveInventoryItem != null) - { - handlerRemoveInventoryItem(this, datablock.ItemID); - } + uuids.Add(datablock.ItemID); + } + handlerRemoveInventoryItem = OnRemoveInventoryItem; + if (handlerRemoveInventoryItem != null) + { + handlerRemoveInventoryItem(this, uuids); } } break; -- cgit v1.1 From d519f1885f587409592cf92bc0f4ba8533a1866f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 19 Aug 2009 10:56:08 -0700 Subject: Added MoveItems, which is most useful upon viewer-delete inventory operation. Moving a batch of items is a 1-time operation. Made it async anyway, so that the viewer doesn't wait in case the DB layer is dumb (which is the case currently). --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index e2fb659..6969a3d 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -7027,14 +7027,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (OnMoveInventoryItem != null) { handlerMoveInventoryItem = null; + InventoryItemBase itm = null; + List items = new List(); foreach (MoveInventoryItemPacket.InventoryDataBlock datablock in moveitem.InventoryData) { - handlerMoveInventoryItem = OnMoveInventoryItem; - if (handlerMoveInventoryItem != null) - { - handlerMoveInventoryItem(this, datablock.FolderID, datablock.ItemID, datablock.Length, - Util.FieldToString(datablock.NewName)); - } + itm = new InventoryItemBase(datablock.ItemID, AgentId); + itm.Folder = datablock.FolderID; + itm.Name = Util.FieldToString(datablock.NewName); + // weird, comes out as empty string + //m_log.DebugFormat("[XXX] new name: {0}", itm.Name); + items.Add(itm); + } + handlerMoveInventoryItem = OnMoveInventoryItem; + if (handlerMoveInventoryItem != null) + { + handlerMoveInventoryItem(this, items); } } break; -- cgit v1.1 From 118f710a79c68da04861941a3304b1dba2c847bb Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 20 Aug 2009 16:18:32 -0700 Subject: Fixed a missing field in SendBulkInventoryFolderUpdate. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 6969a3d..a7a5aa3 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -2177,7 +2177,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP bulkUpdate.AgentData.AgentID = AgentId; bulkUpdate.AgentData.TransactionID = transactionId; bulkUpdate.FolderData = folderDataBlocks.ToArray(); - + List foo = new List(); + bulkUpdate.ItemData = foo.ToArray(); + //m_log.Debug("SendBulkUpdateInventory :" + bulkUpdate); OutPacket(bulkUpdate, ThrottleOutPacketType.Asset); } -- cgit v1.1 From 922007443e7344f6696fbfc66ceec8f18bec65b9 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 20 Aug 2009 21:36:57 -0700 Subject: Changed most of inventory packets to LowPriority, to see if that helps with freezing on searching large inventories. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index a7a5aa3..ce4b03b 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -1961,7 +1961,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { descend.Header.Zerocoded = true; AddNullFolderBlockToDecendentsPacket(ref descend); - OutPacket(descend, ThrottleOutPacketType.Asset); + OutPacket(descend, ThrottleOutPacketType.LowPriority); if ((items.Count - count) > 0) { @@ -1983,7 +1983,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (0 < i && i < MAX_ITEMS_PER_PACKET) { AddNullFolderBlockToDecendentsPacket(ref descend); - OutPacket(descend, ThrottleOutPacketType.Asset); + OutPacket(descend, ThrottleOutPacketType.LowPriority); } } @@ -2021,7 +2021,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (i == MAX_ITEMS_PER_PACKET) { AddNullItemBlockToDescendentsPacket(ref descend); - OutPacket(descend, ThrottleOutPacketType.Asset); + OutPacket(descend, ThrottleOutPacketType.LowPriority); if ((folders.Count - count) > 0) { @@ -2045,7 +2045,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (0 < i && i < MAX_ITEMS_PER_PACKET) { AddNullItemBlockToDescendentsPacket(ref descend); - OutPacket(descend, ThrottleOutPacketType.Asset); + OutPacket(descend, ThrottleOutPacketType.LowPriority); } } @@ -2056,7 +2056,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP descend.AgentData.Descendents = 0; AddNullItemBlockToDescendentsPacket(ref descend); AddNullFolderBlockToDecendentsPacket(ref descend); - OutPacket(descend, ThrottleOutPacketType.Asset); + OutPacket(descend, ThrottleOutPacketType.LowPriority); } } @@ -2153,7 +2153,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); inventoryReply.Header.Zerocoded = true; - OutPacket(inventoryReply, ThrottleOutPacketType.Asset); + OutPacket(inventoryReply, ThrottleOutPacketType.LowPriority); } protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase) -- cgit v1.1 From 9e64427262e05ac03032f686ceaff8828d02e5df Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 20 Aug 2009 21:56:06 -0700 Subject: Putting the inventory packets back to ThrottleOutPacketType.Asset, because that didn't work. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index ce4b03b..a7a5aa3 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -1961,7 +1961,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { descend.Header.Zerocoded = true; AddNullFolderBlockToDecendentsPacket(ref descend); - OutPacket(descend, ThrottleOutPacketType.LowPriority); + OutPacket(descend, ThrottleOutPacketType.Asset); if ((items.Count - count) > 0) { @@ -1983,7 +1983,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (0 < i && i < MAX_ITEMS_PER_PACKET) { AddNullFolderBlockToDecendentsPacket(ref descend); - OutPacket(descend, ThrottleOutPacketType.LowPriority); + OutPacket(descend, ThrottleOutPacketType.Asset); } } @@ -2021,7 +2021,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (i == MAX_ITEMS_PER_PACKET) { AddNullItemBlockToDescendentsPacket(ref descend); - OutPacket(descend, ThrottleOutPacketType.LowPriority); + OutPacket(descend, ThrottleOutPacketType.Asset); if ((folders.Count - count) > 0) { @@ -2045,7 +2045,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (0 < i && i < MAX_ITEMS_PER_PACKET) { AddNullItemBlockToDescendentsPacket(ref descend); - OutPacket(descend, ThrottleOutPacketType.LowPriority); + OutPacket(descend, ThrottleOutPacketType.Asset); } } @@ -2056,7 +2056,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP descend.AgentData.Descendents = 0; AddNullItemBlockToDescendentsPacket(ref descend); AddNullFolderBlockToDecendentsPacket(ref descend); - OutPacket(descend, ThrottleOutPacketType.LowPriority); + OutPacket(descend, ThrottleOutPacketType.Asset); } } @@ -2153,7 +2153,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP FULL_MASK_PERMISSIONS, 1, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS, FULL_MASK_PERMISSIONS); inventoryReply.Header.Zerocoded = true; - OutPacket(inventoryReply, ThrottleOutPacketType.LowPriority); + OutPacket(inventoryReply, ThrottleOutPacketType.Asset); } protected void SendBulkUpdateInventoryFolder(InventoryFolderBase folderBase) -- cgit v1.1 From b03eeeb9f6331ed36c61f55aef847ce3b2db7ba4 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 22 Aug 2009 10:24:26 -0700 Subject: * Fixes mantis http://opensimulator.org/mantis/view.php?id=4044. Turns out folders were never being removed from trash when they were singled out for purging in trash. They were being removed when Trash was purged as a whole. That behavior is now fixed for the new InventoryService set. * Removed left-overs from AssetInventoryServer. --- .../Region/ClientStack/LindenUDP/LLClientView.cs | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/ClientStack/LindenUDP') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index a7a5aa3..dd01780 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -7090,14 +7090,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (OnRemoveInventoryFolder != null) { handlerRemoveInventoryFolder = null; + List uuids = new List(); foreach (RemoveInventoryFolderPacket.FolderDataBlock datablock in removeFolder.FolderData) { - handlerRemoveInventoryFolder = OnRemoveInventoryFolder; - - if (handlerRemoveInventoryFolder != null) - { - handlerRemoveInventoryFolder(this, datablock.FolderID); - } + uuids.Add(datablock.FolderID); + } + handlerRemoveInventoryFolder = OnRemoveInventoryFolder; + if (handlerRemoveInventoryFolder != null) + { + handlerRemoveInventoryFolder(this, uuids); } } break; @@ -7114,14 +7115,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (OnRemoveInventoryFolder != null) { handlerRemoveInventoryFolder = null; + List uuids = new List(); foreach (RemoveInventoryObjectsPacket.FolderDataBlock datablock in removeObject.FolderData) { - handlerRemoveInventoryFolder = OnRemoveInventoryFolder; - - if (handlerRemoveInventoryFolder != null) - { - handlerRemoveInventoryFolder(this, datablock.FolderID); - } + uuids.Add(datablock.FolderID); + } + handlerRemoveInventoryFolder = OnRemoveInventoryFolder; + if (handlerRemoveInventoryFolder != null) + { + handlerRemoveInventoryFolder(this, uuids); } } -- cgit v1.1