fragmentation

How to avoid heap fragmentation?

I'm currently working on a project for medical image processing, that needs a huge amount of memory. Is there anything I can do to avoid heap fragmentation and to speed up access of image data that has already been loaded into memory? The application has been written in C++ and runs on Windows XP. EDIT: The application does some prepro...

.NET Large Object Heap and JSON interaction

I have an asp.net application that serializes data to the client using JSON. Once load reaches a certain level, the app is spending an in-ordinate time in GC and after spending some time with WinDbg/SOS and related tools it appears that there is a substantial amount of LOH fragmentation taking place because the size of the generated JSO...

How frequently IP packets are fragmented at the source host?

I know that if IP payload > MTU then routers usually fragment the IP packet. Finally all the fragmented packets are assembled at the destination using the fields IP-ID, IP fragment offsets and fragmentation flags. Max length of IP payload is 64K. Thus its very plausible for L4 to hand over payload which is 64K. If the L2 protocol is Ethe...

How might one go about implementing a disk fragmenter?

I have a few ideas I would like to try out in the Disk Defragmentation Arena. I came to the conclusion that as a precursor to the implementation, it would be useful, to be able to put a disk into a state where it was fragmented. This seems to me to be a state that is more difficult to achieve than a defragmented one. I would assume t...

WPF memory fragmentation

Hi all, I've got what I assume is a memory fragmentation issue. We've recently ported our WinForms application to a WPF application. There's some image processing that this application does, and this processing always worked in the WinForms version of the app. We go to WPF, and the processing dies. Debugging into the library has th...

How can I limit file fragmentation while working with .NET?

In my application I am gathering small data bits into a bigger file over time. As a result, the target file becomes excessively fragmented. What can be done to limit fragmentation of the output file with .NET? ...

Mysql OPTIMIZE TABLE for all fragmented tables

Id like to run optimize on all currently framgmented tables. These tables should be those that have information_schema.DATA_FREE > 0. Is it possible to optimize all tables with this property in one command in sql or will I have to write external code to do this? ...

What does a working example of dealing with packet fragmentation in C# look like when using the Begin* End* method?

After enough playing with asynchronous socket programming I noticed that the server was receiving chunked payloads (ie: more than one complete payload sitting in the same buffer). So I came up with the following: if (bytes_to_read > 0) { while (bytes_to_read > 0) // Get payload size as int. // Get payload in byte f...

Internal and external fragmentation

Can anyone please tell me the difference between internal and external fragmentation while allocation of disk space for files? ...

Why is my index getting fragmented?

I have a simple little table (just 8 fields) an hour ago I rebuilt one of the indexes on the table, which reset it to 0% fragmentation, but now it’s up to 38%. The table itself has 400k records in it, but only 158 new ones have been inserted since I rebuilt the index, there have been no updates to records but perhaps a couple of deletes...

Entity "Defragmentation" constraint solver/algorithm

Update: A entity is an object created with attributes/methods of a given entity template. A entity may have a parent and/or a number of children. Every entity template has a thread fragmentation cost and a computer fragmentation cost. They define how costly it will be to have children of that entity on different computers/thread from t...

Portable way to detect heap fragmentation in c++ at runtime?

I'm writing a qt-based c++ application and i need to be able to detect memory fragmentation in order to check if the current system can actually sustain the memory load: the program load a big image (15/21 megapixels are the norm) in memory and then perform some filtering on it (w/ sparse matrices). For instance, i'm having memory fragme...

C#: Is there an Advantage to Disposing Resources in Reverse Order of their Allocation?

Many years ago, I was admonished to, whenever possible, release resources in reverse order to how they were allocated. That is: block1 = malloc( ... ); block2 = malloc( ... ); ... do stuff ... free( block2 ); free( block1 ); I imagine on a 640K MS-DOS machine, this could minimize heap fragmentation. Is there any practical advantage ...

Sql server 2005 needs daily index defrag

Our production database needs daily index defragmentation on one of its tables. The table has several indexes and one of them will get to 90% fragmentation each day. The index is on two date fields ( a start time and an end time). We do not get this problem on our development database although this obviously has a much lower throughput...

SQL Server 2005 Index Fragmentation

Several keys in a SQL Server 2005 database I inherited have very high fragmentation percentages. When using the following SQL: select OBJECT_NAME(object_id), avg_fragmentation_in_percent, record_count, * from sys.dm_db_index_physical_stats (DB_ID(N'FragmentedDB'), NULL, NULL, NULL, 'Detailed') s I see that several tables with fra...

Logical address confusion

Hi, I am trying to do some analysis with the logical address. The following program explains my motive ... #include<stdio.h> int main() { int x=10; printf("The address of main is %p\n",&main); printf("The address of x is %p\n",&x); return 0; } When I run this program in my 32bit system it shows The address of main is 0x80483b4 T...

Should I call GC.Collect immediately after using the large object heap to prevent fragmentation

My application does a good deal of binary serialization and compression of large objects. Uncompressed the serialized dataset is about 14 MB. Compressed it is arround 1.5 MB. I find that whenever I call the serialize method on my dataset my large object heap performance counter jumps up from under 1 MB to about 90 MB. I also know that un...

How to record every allocations and deallocations of memory on a program?

I want to see is fragmentation the reason of increasing memory usage of my twisted server. I have posted a question here: How to find the source of increasing memory usage of a twisted server? Now, what I am going to do is to visualize the heap. I found an article: Memory fragmentation. The figure of heap in that article is something ju...

Easy way to create fragmented IPv4 packets

I'm working on a network stack at the moment, and I'm trying to implement IPv4 fragmentation. Whilst I have an implementation which works in theory, I would like to actually test that it works by throwing actual fragmented packets at it. Is there any software or perhaps an easy way to write code to do this? I'd rather not go and modify ...

How to prevent packet fragmentation for a HttpWebRequest

I am having a problem using HttpWebRequest against a HTTP daemon on an embedded device. The problem appears to be that there is enough of a delay between the http headers being written to the socket stream, and the http payload (a POST), that the socket releases what's in the socket buffer to the server. This results in the HTTP request ...