are these functions (disk defragment and disk cleanup) available in Linux or specially in openSUSE?
are they necessary or useful for a Linux system?
Nope. Don’t worry, be happy.
Please behave as if you never was indoctrinated by using an MS Windows system and thus as if you have never heard of the words “disk defragment and disk cleanup”.
you mean Linux does not need “disk defragment and disk cleanup” at all.
OK, but why? what is the reason?
Sorry, but again you talk from an MS Windows viewpoint. What is the reason for disk defragment and disk cleanup on such a system?
I do not know the answer. I never managed an MS Windows system, thus I do not know exactly what defragment and disk cleanup is, nor what they are for.
It is about the same as: “Why do you not have a steering wheel in a train?”
The reason Linux doesn’t need to be defraged has to do with the way the data is written to disk, in the MS world data is written to the first free sectors it finds which leads to data being fragmented. Linux on the other and writes the data so the data is in sector groups that are close together. Short story, Linux/Unix doesn’t fragment the data in the first place.
Disk clean up happens in the background, log files, tmp files are removed when needed or for logs logrotate is used where only a set number are kept. Users normally can’t write in system areas so junk doesn’t accumalate. Win on the otherhand keeps junk until the user delete it. Also win throws files in many different areas.
I do not know if that answer is ment for me, but I did not ask for an explanation how bad it works in other file system types in other operating systems. I am allready fully convinced not to use those systems. rotfl!
Unfortunately it is just plain wrong, if you state that ext3 does not get fragmented. It is less of an issue for most systems, but it can hit you quite hard on systems where a lot of IO is going on (e.g. Mailservers with thousands of users). You can rest assured, that developers did not spend a lot of time to implement online defrag in ext4 and BTRFS just for fun.
On 2011-11-28 15:06, robertkoeppl wrote:
>
> Unfortunately it is just plain wrong, if you state that ext3 does not
> get fragmented. It is less of an issue for most systems, but it can hit
> you quite hard on systems where a lot of IO is going on (e.g.
> Mailservers with thousands of users). You can rest assured, that
> developers did not spend a lot of time to implement online defrag in
> ext4 and BTRFS just for fun.
You are right. Look:
nimrodel:~ # fsck /dev/sdb1
fsck 1.40.8 (13-Mar-2008)
e2fsck 1.40.8 (13-Mar-2008)
Moria_250 has been mounted 1574 times without being checked, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 3A: Optimizing directories
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Moria_250: ***** FILE SYSTEM WAS MODIFIED *****
Moria_250: 5872/30408704 files (62.6% non-contiguous), 34630399/60791960 blocks
nimrodel:~ #
See? “62.6% non-contiguous” means a high fragmentation. That ext2 disk is
used on a digital tv recorder set. Relatively high I/O on (I guess) real time.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
On 11/28/2011 03:06 PM, robertkoeppl wrote:
> (e.g. Mailservers with thousands of users)
when IlAlI (the person asking and being answered) gets into that
situation with his laptop, you should come back and remind him to
begin worrying about fragmentation!!
–
DD
openSUSE®, the “German Engineered Automobiles” of operating systems!
On 2011-11-28 16:22, DenverD wrote:
> On 11/28/2011 03:06 PM, robertkoeppl wrote:
>> (e.g. Mailservers with thousands of users)
>
> when IlAlI (the person asking and being answered) gets into that
> situation with his laptop, you should come back and remind him to begin
> worrying about fragmentation!!
I have that situation. You can see the output of fsck in my other post.
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
Carlos,
I think you missed the underlying assumption most of the posters here have, that the OP has a rather fresh 12.1 installation in his nnotebook using ext4 file systems. I know he did not explain all of this in his first post here, but we had some discussion with him earlier. Thus we thought that the general answer good for his situation might be enough.
On 2011-11-29 10:46, hcvv wrote:
>
> Carlos,
>
> I think you missed the underlying assumption most of the posters here
> have, that the OP has a rather fresh 12.1 installation in his nnotebook
> using ext4 file systems. I know he did not explain all of this in his
> first post here, but we had some discussion with him earlier. Thus we
> thought that the general answer good for his situation might be enough.
ah, looking at it that way, yes
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
On Tue, 29 Nov 2011 18:43:06 +0530, Carlos E. R.
<robin_listas@no-mx.forums.opensuse.org> wrote:
> On 2011-11-29 10:46, hcvv wrote:
>>
>> Carlos,
>>
>> I think you missed the underlying assumption most of the posters here
>> have, that the OP has a rather fresh 12.1 installation in his nnotebook
>> using ext4 file systems. I know he did not explain all of this in his
>> first post here, but we had some discussion with him earlier. Thus we
>> thought that the general answer good for his situation might be enough.
>
> ah, looking at it that way, yes
>
but don’t forget the effect these posts may have on others who arrive here
via google or forum search. i think it’s good that it has been mentioned
that fragmentation does exist on *nix, depending on the file system used.
–
phani.
I admit it is a trade off between anwsering somebody without to many "if"s and covering all possibilities for “you never know who may read this”.
Yes, life is not allways easy. :\
Howdy,
I hate to be a “copy/paster” but,
I have always thought that Linux file systems do not fragment files, and thus do not require file “defrag”. My very limited knowledge always requires me to “look it up”
Maybe for people*** like me*** (who don’t do this stuff for a living) , the explanation from the Linux System Administrators Guide Sec.5.10.11. helps…
When a file is written to disk, it can’t always be written in consecutive blocks. A file that is not stored in consecutive blocks is fragmented. It takes longer to read a fragmented file, since the disk’s read-write head will have to move more. It is desirable to avoid fragmentation, although it is less of a problem in a system with a good buffer cache with read-ahead.
Modern Linux filesystem keep fragmentation at a minimum by keeping all blocks in a file close together, even if they can’t be stored in consecutive sectors. Some filesystems, like ext3, effectively allocate the free block that is nearest to other blocks in a file. Therefore it is not necessary to worry about fragmentation in a Linux system.
[Emphasis mine]
I haven’t researched it any further than the above… Maybe EXT4 and Btrfs do a better job. (according to the wiki’s I found Btrfs actually DOES some sort of “online” de-fragmentation automatically)
I’m still learning!
Regards,
Rick
On 2011-11-29 20:16, af67pmr7160 wrote:
>
> Howdy,
>
> I hate to be a “copy/paster” but,
>
>
> I have always thought that Linux file systems do not fragment files,
But that is not entirely true.
>> -Modern Linux filesystem keep fragmentation at a minimum by keeping
>> all blocks in a file close together, even if they can’t be stored in
>> consecutive sectors. Some filesystems, like ext3, effectively
>> allocate the free block that is nearest to other blocks in a file.
That is the key word. New sectors are allocated near the existing sectors
of the file, which minimizes the impact of fragmentation. But it doesn’t
completely avoid fragmentation
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)
On 2011-11-29 16:49, phanisvara das wrote:
>>
>
> but don’t forget the effect these posts may have on others who arrive here
> via google or forum search. i think it’s good that it has been mentioned
> that fragmentation does exist on *nix, depending on the file system used.
Actually, IMO, it doesn’t depend on the filesystem at all, but on how that
filesystem is implemented, ie, on the operating system that handles file
operations. You can keep a FAT system with little fragmentation if you use
an allocation technique that minimizes it, like linux does. MsDos never
cared for that.
Or, looking at it in another way, there are other people making money out
of the /wish/ to defragment >:-)
–
Cheers / Saludos,
Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)