Questions tagged [fragmentation]

An unefficient usage of disk storage in memory or hard drive.

185 questions
229
votes
12 answers

What is memory fragmentation?

I've heard the term "memory fragmentation" used a few times in the context of C++ dynamic memory allocation. I've found some questions about how to deal with memory fragmentation, but can't find a direct question that deals with it itself. …
AshleysBrain
  • 20,705
  • 15
  • 81
  • 119
81
votes
4 answers

Internal and external fragmentation

Can anyone please tell me the difference between internal and external fragmentation while allocation of disk space for files?
wantobegeek
  • 1,567
  • 3
  • 17
  • 19
50
votes
3 answers

What causes memory fragmentation in .NET

I am using Red Gates ANTS memory profiler to debug a memory leak. It keeps warning me that: Memory Fragmentation may be causing .NET to reserver too much free memory. or Memory Fragmentation is affecting the size of the largest object that can…
Matt
  • 24,106
  • 61
  • 180
  • 291
39
votes
3 answers

Does multithreading emphasize memory fragmentation?

Description When allocating and deallocating randomly sized memory chunks with 4 or more threads using openmp's parallel for construct, the program seems to start leaking considerable amounts of memory in the second half of the test-program's…
Byron
  • 3,203
  • 1
  • 21
  • 32
30
votes
6 answers

Script for rebuilding and reindexing the fragmented index?

Can anyone provide the script for rebuilding and re-indexing the fragmented index when 'avg_fragmentation_in_percent' exceeds certain limits (better if cursor is not used)?
savitha
  • 9,871
  • 4
  • 16
  • 13
27
votes
2 answers

Why and when is necessary to rebuild indexes in MongoDB?

Been working with MongoDB for a while and today I had a doubt while discussing with a colleague. The thing is that when you create an index in MongoDB, the collection is processed and the index is built. The index is updated within insertion and…
javierfdezg
  • 1,969
  • 1
  • 19
  • 31
23
votes
4 answers

IP Fragmentation and Reassembly

I am currently going through my networking slides and was wondering if someone could help me with the concept of fragmentation and reassembly. I understand how it works, namely how datagrams are split into smaller chunks because network links have…
JimmyK
  • 4,315
  • 7
  • 29
  • 42
22
votes
3 answers

Benefits of "Don't Fragment" on TCP Packets?

One of our customers is having trouble submitting data from our application (on their PC) to a server (different geographical location). When sending packets under 1100 bytes everything works fine, but above this we see TCP retransmitting the packet…
ta.speot.is
  • 25,998
  • 8
  • 62
  • 93
19
votes
9 answers

Horizontal vs Vertical Fragmentation in Distributed Database Management Systems (DDBMS)

In the context in DDBMS, what is the difference between Vertical Fragmentation and Horizontal Fragmentation? Is it such that the relation's extension is fragmented for vertical fragmentation and intension fragmentation is horizontal fragmentation?
DreX
  • 313
  • 1
  • 4
  • 16
17
votes
3 answers

Mysql OPTIMIZE TABLE for all fragmented tables

I'd like to OPTIMIZE all currently fragmented tables. These tables should 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?
Wienczny
  • 3,348
  • 4
  • 27
  • 35
16
votes
4 answers

What is lazy space allocation in Google File system

I was going through google file system (GFS) paper, It mentions that GFS uses Lazy space allocation to reduce internal fragmentation. Can someone explain, how lazy space reduces internal fragmetation? Source:…
user2328404
  • 383
  • 1
  • 3
  • 9
13
votes
5 answers

Dealing with fragmentation in a memory pool?

Suppose I have a memory pool object with a constructor that takes a pointer to a large chunk of memory ptr and size N. If I do many random allocations and deallocations of various sizes I can get the memory in such a state that I cannot allocate an…
user805547
  • 1,185
  • 11
  • 22
13
votes
9 answers

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…
Thomas Koschel
  • 3,283
  • 8
  • 31
  • 38
12
votes
5 answers

Reduce SQL Server table fragmentation without adding/dropping a clustered index?

I have a large database (90GB data, 70GB indexes) that's been slowly growing for the past year, and the growth/changes has caused a large amount of internal fragmentation not only of the indexes, but of the tables themselves. It's easy to resolve…
SqlRyan
  • 30,939
  • 32
  • 109
  • 190
12
votes
1 answer

Avoiding OutOfMemoryException during large, fast and frequent memory allocations in C#

Our application continuously allocates arrays for large quantities of data (say tens to hundreds of megabytes) which live for a shortish amount of time before being discarded. Done naively this can cause large object heap fragmentation, eventually…
1
2 3
12 13