Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › defragmenting Kubuntu
New Posts  All Forums:Forum Nav:

defragmenting Kubuntu

post #1 of 8
Thread Starter 
so i've been using Kubuntu for about a month now, and am wondering if I can defragment Kubuntu like i used to in Win Xp or does Kubuntu do it on its own?
justedbin's
(13 items)
 
  
CPUMotherboardGraphicsRAM
Opty 170 CCBWE LANPARTY NF4 SLI-D BFG 8800GT (SLI) 4x CMX512-3200C2PT 
Hard DriveOSMonitorKeyboard
2x 320GB + 80GB Kubuntu 10.04 LTS LG - W2253TQ Saitek Eclipse II 
PowerCaseMouseMouse Pad
Corsair HX520W Antec Nine-Hundred Logitech MX518 1/2 a Pad 
  hide details  
Reply
justedbin's
(13 items)
 
  
CPUMotherboardGraphicsRAM
Opty 170 CCBWE LANPARTY NF4 SLI-D BFG 8800GT (SLI) 4x CMX512-3200C2PT 
Hard DriveOSMonitorKeyboard
2x 320GB + 80GB Kubuntu 10.04 LTS LG - W2253TQ Saitek Eclipse II 
PowerCaseMouseMouse Pad
Corsair HX520W Antec Nine-Hundred Logitech MX518 1/2 a Pad 
  hide details  
Reply
post #2 of 8
I remember reading a while back that the linux ext file systems were much better at managing fragmentation somehow. Either they self defragment or just place files better to start with, I'm not sure. As far as I remember it was never necessary to do on Ubuntu. Kubuntu is pretty much the same with a different user interface.
Tiny Fun
(8 items)
 
4P Folding Rig 1
(16 items)
 
4P Folding Rig 2
(11 items)
 
CPUMotherboardGraphicsRAM
i7-4770K @ 4.0GHz MSI Z87I EVGA GTX 660 Ti Corsair Vengeance 16GB 
Hard DriveCoolingOSCase
Samsung 840 Pro 256GB Swiftech Apogee Drive II Windows 8 Enterprise x64 Cooler Master Elite 120 Advanced 
CPUCPUCPUCPU
AMD Opteron 6274 ES 2.2GHz 16-Core AMD Opteron 6274 ES 2.2GHz 16-Core AMD Opteron 6274 ES 2.2GHz 16-Core AMD Opteron 6274 ES 2.2GHz 16-Core 
MotherboardGraphicsRAMHard Drive
SuperMicro H8QGi+-F Matrox G200eW 16x2 (32GB) Crucial Ballistix DDR3 1600MHz Crucial C300 64GB 
OSPowerCase
Linux Mint 15 Cinnamon 64-bit Enermax Galaxy Evo 1250W Spotswood Tech Tray 
CPUCPUCPUCPU
AMD Opteron 6176 SE 12-Core 2.3GHz AMD Opteron 6176 SE 12-Core 2.3GHz AMD Opteron 6176 SE 12-Core 2.3GHz AMD Opteron 6176 SE 12-Core 2.3GHz 
MotherboardGraphicsRAMHard Drive
Supermicro H8QGL-IF+ Matrox G200eW Kingston Server 16x1GB DDR3 Corsair Nova 32GB 
OSPower
Linux Mint 15 Cinnamon 64-bit Cooler Master Silent Pro 1000W 
  hide details  
Reply
Tiny Fun
(8 items)
 
4P Folding Rig 1
(16 items)
 
4P Folding Rig 2
(11 items)
 
CPUMotherboardGraphicsRAM
i7-4770K @ 4.0GHz MSI Z87I EVGA GTX 660 Ti Corsair Vengeance 16GB 
Hard DriveCoolingOSCase
Samsung 840 Pro 256GB Swiftech Apogee Drive II Windows 8 Enterprise x64 Cooler Master Elite 120 Advanced 
CPUCPUCPUCPU
AMD Opteron 6274 ES 2.2GHz 16-Core AMD Opteron 6274 ES 2.2GHz 16-Core AMD Opteron 6274 ES 2.2GHz 16-Core AMD Opteron 6274 ES 2.2GHz 16-Core 
MotherboardGraphicsRAMHard Drive
SuperMicro H8QGi+-F Matrox G200eW 16x2 (32GB) Crucial Ballistix DDR3 1600MHz Crucial C300 64GB 
OSPowerCase
Linux Mint 15 Cinnamon 64-bit Enermax Galaxy Evo 1250W Spotswood Tech Tray 
CPUCPUCPUCPU
AMD Opteron 6176 SE 12-Core 2.3GHz AMD Opteron 6176 SE 12-Core 2.3GHz AMD Opteron 6176 SE 12-Core 2.3GHz AMD Opteron 6176 SE 12-Core 2.3GHz 
MotherboardGraphicsRAMHard Drive
Supermicro H8QGL-IF+ Matrox G200eW Kingston Server 16x1GB DDR3 Corsair Nova 32GB 
OSPower
Linux Mint 15 Cinnamon 64-bit Cooler Master Silent Pro 1000W 
  hide details  
Reply
post #3 of 8
There is no need due to the file systems in Linux. A very simple explanation can be found here.
 
HTPC
(8 items)
 
 
CPUMotherboardGraphicsRAM
i7-3930k MSI X79MA-GD45 Powercolor 7950 G Skill 
Hard DriveCoolingCoolingCooling
Samsung 830 Swiftech Apogee XT Rev. 1 EK-FC HWLabs Black Ice GTX 240 and a Koolance HX-CU72... 
CoolingCoolingOSOS
MCP 35X and a MCP 350 Koolance 401x2 Opensuse 12.1 Windows 7 
KeyboardPowerCase
Ducky OCN with cherry blues Antec True Power New 650W Cooler Master CM690 II 
CPUMotherboardGraphicsRAM
i5-750 Gigabyte p55-ud2 GTX 430 G Skill 
Hard DriveOSPowerCase
Samsung HD204UI Fedora 15 Corsair CX-430 Silverstone GC04 
  hide details  
Reply
 
HTPC
(8 items)
 
 
CPUMotherboardGraphicsRAM
i7-3930k MSI X79MA-GD45 Powercolor 7950 G Skill 
Hard DriveCoolingCoolingCooling
Samsung 830 Swiftech Apogee XT Rev. 1 EK-FC HWLabs Black Ice GTX 240 and a Koolance HX-CU72... 
CoolingCoolingOSOS
MCP 35X and a MCP 350 Koolance 401x2 Opensuse 12.1 Windows 7 
KeyboardPowerCase
Ducky OCN with cherry blues Antec True Power New 650W Cooler Master CM690 II 
CPUMotherboardGraphicsRAM
i5-750 Gigabyte p55-ud2 GTX 430 G Skill 
Hard DriveOSPowerCase
Samsung HD204UI Fedora 15 Corsair CX-430 Silverstone GC04 
  hide details  
Reply
post #4 of 8
you really don't need to "defrag" a linux partition.

i guess you could if you really wanted to, don't know how much that will help tbh...as long as you have free space, then you shouldn't notice any performance hits.

if you really wanted to get technical, fragmentation of files/folders, is really a windows created phenomenon, in windows the files are written sequentially, side by side, with no room for growth, so when they get larger, it tacks on the additional information at the end of the last file written, which cause the fragmentation, even if you delete the files in between, it will just place the next written file there, and if the "block" isn't large enough, it moves to the end of the last file again to continue to write the information.

in most linux Filesystems, the files aren't written sequentially, they are literally "thrown" around the FS, into the largest open blocks, with "free space" around them so they can grow, if this is not possible due to nearing capacity, the FS will in a "sense" defrag itself. most of the tools for FS in linux, when you create the partition, will give about 5% of the drives capacity to the "super user" or the "system", to always keep free space. since it is a percentage, its not always a good idea to keep it at 5%, i would say 10 to 15 gigabytes dedicated to the system is more than adequate on a 500+ gigabyte harddrive.

i've never tried defragging a linux harddrive, never saw a need, but understanding what is considered defragging, i would say it could potentially cause more of a system impact in the long run, sense most of the FS's are designed not to fragment...so in essence if you did defrag it, you might end up fragmenting it more later on.
Bazinga Punk
(12 items)
 
ooh shiny!
(6 items)
 
 
CPUMotherboardGraphicsRAM
Intel Xeon 3440 AsRock P55 extreme Evga 8800 GT 512 MB Gskill Ripjaws 
Hard DriveCoolingOSMonitor
Western Digital Blue Antec Khuler 620 Ubuntu 11.10 Asus vw264H 
KeyboardPowerCaseMouse
GIGABYTE KM7600 CORSAIR TX 650 Cooler Master 590 GIGABYTE GM-M6800 
CPUMotherboardGraphicsRAM
Intel Core I5 6500 Gigabyte z170xp-SLI Nvidia 970gtx Corsair 16gb ddr4 2666mhz  
Hard DriveOS
250gb Samsung Evo 850 Windows 10 & Ubuntu 15.10 
  hide details  
Reply
Bazinga Punk
(12 items)
 
ooh shiny!
(6 items)
 
 
CPUMotherboardGraphicsRAM
Intel Xeon 3440 AsRock P55 extreme Evga 8800 GT 512 MB Gskill Ripjaws 
Hard DriveCoolingOSMonitor
Western Digital Blue Antec Khuler 620 Ubuntu 11.10 Asus vw264H 
KeyboardPowerCaseMouse
GIGABYTE KM7600 CORSAIR TX 650 Cooler Master 590 GIGABYTE GM-M6800 
CPUMotherboardGraphicsRAM
Intel Core I5 6500 Gigabyte z170xp-SLI Nvidia 970gtx Corsair 16gb ddr4 2666mhz  
Hard DriveOS
250gb Samsung Evo 850 Windows 10 & Ubuntu 15.10 
  hide details  
Reply
post #5 of 8
Three things. First, you can't, second, you wouldn't want to, and third, you don't need to.
Lappy
(9 items)
 
  
CPUMotherboardGraphicsRAM
P8700 Toshiba GM45 ICH9-M Intel 4 Series Samsung M4 
Hard DriveOptical DriveOSCase
Hitachi HTS723232L9A360 Matshita UJ880AS Windows 7 Pro 64 Toshiba A500-6621 
Mouse
Mionix Naos 5000 
  hide details  
Reply
Lappy
(9 items)
 
  
CPUMotherboardGraphicsRAM
P8700 Toshiba GM45 ICH9-M Intel 4 Series Samsung M4 
Hard DriveOptical DriveOSCase
Hitachi HTS723232L9A360 Matshita UJ880AS Windows 7 Pro 64 Toshiba A500-6621 
Mouse
Mionix Naos 5000 
  hide details  
Reply
post #6 of 8
Thread Starter 
Quote:
Originally Posted by mdatmo View Post
There is no need due to the file systems in Linux. A very simple explanation can be found here.
id give double +rep, but nah, thnx though, really helped
thnx for the quick replies btw
justedbin's
(13 items)
 
  
CPUMotherboardGraphicsRAM
Opty 170 CCBWE LANPARTY NF4 SLI-D BFG 8800GT (SLI) 4x CMX512-3200C2PT 
Hard DriveOSMonitorKeyboard
2x 320GB + 80GB Kubuntu 10.04 LTS LG - W2253TQ Saitek Eclipse II 
PowerCaseMouseMouse Pad
Corsair HX520W Antec Nine-Hundred Logitech MX518 1/2 a Pad 
  hide details  
Reply
justedbin's
(13 items)
 
  
CPUMotherboardGraphicsRAM
Opty 170 CCBWE LANPARTY NF4 SLI-D BFG 8800GT (SLI) 4x CMX512-3200C2PT 
Hard DriveOSMonitorKeyboard
2x 320GB + 80GB Kubuntu 10.04 LTS LG - W2253TQ Saitek Eclipse II 
PowerCaseMouseMouse Pad
Corsair HX520W Antec Nine-Hundred Logitech MX518 1/2 a Pad 
  hide details  
Reply
post #7 of 8
Yeah, just to clarify it's not the FS that fragments the files but the Operating System. Most people don't understand that the FS has nothing to do with fragmentation or de-fragmentation. You can run Fat32 in Linux or in Windows, the same filesystem with the same structure and layout. If windows operates the partition it will fragment while Linux will not (or drastically lower).

This is an OS managed problem and is more or less a myth now. Windows handles defragmentation on a frequent enough basis that the problem is fixed (sort of). They had the same thing set up before, or at least you could do it but they didn't have it as the default option. Now they defrag at least once a week (unless other wise specified) automatically. If they cannot defrag due to whatever reasons it schedules it to defrag in the background. Honestly their new approach isn't bad, in theory it should work faster. The problem is that we try not to stress drives enough to notice, the only thing that we would see is faster encoding times, games load faster, ect...

Anything that writes heavily, and I'm talking about more than streaming BR. Anything that can be done over CAT5 between two computers without noticeable lag to the user is light read/write to a drive. So it's probably speeds around 50MB/s+, maybe even more. Testing this would be very annoying and I don't really care to find out either. lol

[edit] And that's wrong, high speeds OR a large amount of small files. But since small files tend not to be fragmented it's going to be on the higher end of read speeds. You might see noticeable differences start around 35-45MB/s but I would say nothing huge until you get to the high end of 40MB/s.

If you have a drive with low transfer speeds, around 35MB/s, you might see a noticeable difference earlier. Most decent drives should hold a steady 40MB/s, so that might be where you notice it the most. Unfortunately there are so many variables to test this, and the fact that I don't care, you might have to do your own research.
Edited by mushroomboy - 4/29/11 at 12:49pm
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
Current Rig
(14 items)
 
  
CPUMotherboardGraphicsRAM
FX-8350 4.6GHz@1.44v GA-990FXA-UD3 R4.0 HD 7950 (1100/1450) 8G Muskin DDR3 1866@8CLS 
Hard DriveOptical DriveOSMonitor
1TB WD LiteOn DVD-RW DL Linux/Windows 19" Phillips TV 1080p 
PowerCaseMouseMouse Pad
OCZ 600W Generic Junk Logitech MX400 Generic Junk 
Audio
SBL 5.1 
  hide details  
Reply
post #8 of 8
To my knowledge there is only one possible situation in which the modern GNU/Linux machine fragments data:

Quote:
While delayed allocation, extents and multiblock allocation help to reduce the fragmentation, with usage filesystems can still fragment. For example: You write three files in a directory and continually on the disk. Some day you need to update the file of the middle, but the updated file has grown a bit, so there's not enough room for it. You have no option but fragment the excess of data to another place of the disk, which will cause a seek, or allocate the updated file continually in another place, far from the other two files, resulting in seeks if an application needs to read all the files on a directory (say, a file manager doing thumbnails on a directory full of images). Besides, the filesystem can only care about certain types of fragmentation, it can't know, for example, that it must keep all the boot-related files contiguous, because it doesn't know which files are boot-related. To solve this issue, Ext4 will support online fragmentation, and there's a e4defrag tool which can defragment individual files or the whole filesystem.
You'll rarely have any issues and probably won't have any need to defrag. If you really want to, I wouldn't bother doing it any more than once every year or so.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › Linux, Unix › defragmenting Kubuntu