Puppy defrag app?

Booting, installing, newbie
Message
Author
User avatar
puppyluvr
Posts: 3470
Joined: Sun 06 Jan 2008, 23:14
Location: Chickasha Oklahoma
Contact:

#16 Post by puppyluvr »

:D Hello,

Yes. and simple to do... :D
Close the Windows, and open your eyes, to a whole new world
I am Lead Dog of the
Puppy Linux Users Group on Facebook
Join us!

Puppy since 2.15CE...

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#17 Post by nooby »

Puppyluvr that does not help us with frugal install on NTFS that needs to retain everything as is so your suggestion

Also, make your Linux partition an ext3......


would just destroy the MsWindows one payed so much money for and that should be there intact.

So I vote for Hiren or some other such. As I remember it was a big rar or otherwise compressed file with tools and one or two of them where for defrag. Calimed to be the fastest and best such tool on the net.

Being the total noob that I am I totally failed to find it and to use it.
I am not on that level obviosly. I did put much time and effort in to it and failed.

Now I don't want to use Ms Windows anymore due to it want to install a lot of changes each time one boot it up.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
puppyluvr
Posts: 3470
Joined: Sun 06 Jan 2008, 23:14
Location: Chickasha Oklahoma
Contact:

#18 Post by puppyluvr »

:D Hello,
I believe the OP, bill41, said that he had already defrag`d the Windoze partition, and was inquiring as to how to do the same with his "Distro playground"...ie a Linux FS partition that his M$ cant see or defrag....
Close the Windows, and open your eyes, to a whole new world
I am Lead Dog of the
Puppy Linux Users Group on Facebook
Join us!

Puppy since 2.15CE...

nooby
Posts: 10369
Joined: Sun 29 Jun 2008, 19:05
Location: SwedenEurope

#19 Post by nooby »

Puppy luvr I owe you a heart felt apology. You are so right and I am incredibly wrong. Vry typical of me.
At the moment I have 25 GB for the XP partition and the rest for Puppy.

I can't find a defrag app in Puppy. Is there one or is Puppy's file system sufficiently well organised not to need defrag before I set up a number of other small partitions on this HDD?

I make some but little use of XP, so I can shrink its partition after using XP to defrag the Windows partition. I am assuming Windows XP defrag will not defrag the Puppy partition. Is this right?
You can read and I fail to read.

So does Puppy have a way to defrag a puppy formatted partition?

I have no idea due to me only do frugal install and don't do ext2 other than inside loop mounted squashfiles :?
My bad indeed
I will now stop following this thread so I don't derail it further.
I use Google Search on Puppy Forum
not an ideal solution though

User avatar
rjbrewer
Posts: 4405
Joined: Tue 22 Jan 2008, 21:41
Location: merriam, kansas

Re: Check Filesystem

#20 Post by rjbrewer »

dawnsboy wrote:I do not have a simple solution for defragmenting a hard drive in Puppy but I can at least check and see if there is a need. I booted fluppy 013 into ram and typed the following command at the prompt in a console window.

fsck -nvf /dev/sda1 (where sda1 represents the hard drive on this system)

Here are the results:

# fsck -nvf /dev/sda1
fsck 1.41.12 (17-May-2010)
e2fsck 1.41.12 (17-May-2010)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

129857 inodes used (1.35%)
539 non-contiguous files (0.4%)
128 non-contiguous directories (0.1%)
# of inodes with ind/dind/tind blocks: 5410/70/0
1436698 blocks used (3.75%)
0 bad blocks
1 large file

96178 regular files
12817 directories
59 character device files
26 block device files
0 fifos
389 links
20760 symbolic links (19147 fast symbolic links)
8 sockets
--------
130237 files
It appears that this filesystem need not be defragmented.

I have heard of a program no longer in development called defragfs that will defrag an ext2 and ext3 filesystem. It is a command line utility. Source code is still available at http://sourceforge.net/projects/defragfs/
Very good:

http://ttcshelbyville.wordpress.com/2010/11/10/

Inspiron 700m, Pent.M 1.6Ghz, 1Gb ram.
Msi Wind U100, N270 1.6>2.0Ghz, 1.5Gb ram.
Eeepc 8g 701, 900Mhz, 1Gb ram.
Full installs

Bruce B

#21 Post by Bruce B »

A few days ago I dragged my XP installation. I'll share how I did it.

Note: XP is on FAT32 by deliberate choice. Because of this there won't be
anything weird like streams getting screwed up.

I don't want directory fragmentation. Not that a single directory name can
fragment. If I copy files to an empty partition, the files will be
defragmented. The directories are written all over the disk.

Example:

Somewhere = Documents and Settings
Somewhere = Root
Somewhere = Local Settings
Somewhere = Application Data
Somewhere = Microsoft
Somewhere = Internet Explorer


Only a bit more complex than shown above because it is more like a tree
with the branches disconnected from their parts and scattered.

I would rather all these parts are adjacent like the example below.

Documents and Settings
Documents and Settings/Root
Documents and Settings/Root/Local Settings
Documents and Settings/Root/Local Settings/Application Data
Documents and Settings/Root/Local Settings/Application Data/Microsoft
Documents and Settings/Root/Local Settings/Application Data/Microsoft/Internet Explorer

A quick and dirty shell script enables me to write all directories in order.
And at the beginning of the partition, if it is empty and it is.

Then, having no big files, I simply copy all the files.

Then I fill the partition with four megabyte filler files in a temporary
directory. Which also write zeros to the free space.

This leaves me with no space left.

The filler files are contiguously written and numbered. I determine how
much free space by the number of filler files I delete.

The ones I delete determine where new data will be written. If I don't
want data to be written at the end of the partition, then I leave the
appropriate files in place.

~

User avatar
Bernie_by_the_Sea
Posts: 328
Joined: Wed 09 Feb 2011, 18:14

#22 Post by Bernie_by_the_Sea »

This is a Linux partition over five years old with Mepis that was used at least a couple of times per week. It's never been defragged.

Code: Select all

# e2fsck -vnf /dev/sdb4
e2fsck 1.41.9 (22-Aug-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

   85498 inodes used (12.14%)
     318 non-contiguous files (0.4%)
      61 non-contiguous directories (0.1%)
         # of inodes with ind/dind/tind blocks: 5530/43/0
  623281 blocks used (44.27%)
       0 bad blocks
       1 large file

   74132 regular files
    7388 directories
     469 character device files
      57 block device files
       4 fifos
     412 links
    3436 symbolic links (3214 fast symbolic links)
       3 sockets
--------
   85901 files
# 


User avatar
Luluc
Posts: 200
Joined: Wed 16 Mar 2011, 07:10

#23 Post by Luluc »

Bernie_by_the_Sea wrote:This is a Linux partition over five years old with Mepis that was used at least a couple of times per week. It's never been defragged.

Code: Select all

# e2fsck -vnf /dev/sdb4
e2fsck 1.41.9 (22-Aug-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

   85498 inodes used (12.14%)
     318 non-contiguous files (0.4%)
      61 non-contiguous directories (0.1%)
         # of inodes with ind/dind/tind blocks: 5530/43/0
  623281 blocks used (44.27%)
       0 bad blocks
       1 large file

   74132 regular files
    7388 directories
     469 character device files
      57 block device files
       4 fifos
     412 links
    3436 symbolic links (3214 fast symbolic links)
       3 sockets
--------
   85901 files
# 

That doesn't mean much. HOW exactly was it ever used? Did you actually store a lot of files in it, including large files like music and movies and virtual machines? I do that a lot and my partitions get fragmented. The only way I have found to defragment them is to copy them to an external drive, format, copy everything back over. The difference then is clear, everything does get faster.

Fragmentation is a reality, and defragmentation may be a necessity in some cases. For example, I have a nice tool that lets me put several ISO images on a USB stick, then I can boot off that USB stick and get a menu to select which ISO image I wish to run: Puppy, Sys Rescue CD etc. I even have NetBSD on it. BUT every ISO image must be contiguous. They must not be fragmented. Just copying them on to the USB stick causes them to be fragmented. Bottom line: I am STILL, apparently FOREVER comdemned to keep a Windows partition or virtual machine installed on my computers, because there is always something that I cannot do without Windows. :(

Linux, in its typical arrogance, goes around saying "NO, you don't need to defrag, you don't WANT to defrag, just take our word, we know what is best for you..."

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#24 Post by 666philb »

i was under the impression that fragmentation doesn't really affect flash devices, as every point of data on the device can be read at exactly the same speed. So it offers no performance improvements at all. All it does do is wear your flash drive out quicker.
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

User avatar
Bernie_by_the_Sea
Posts: 328
Joined: Wed 09 Feb 2011, 18:14

#25 Post by Bernie_by_the_Sea »

Bernie_by_the_Sea wrote:This is a Linux partition over five years old with Mepis that was used at least a couple of times per week. It's never been defragged.

85498 inodes used (12.14%)
318 non-contiguous files (0.4%)
61 non-contiguous directories (0.1%)
# of inodes with ind/dind/tind blocks: 5530/43/0
623281 blocks used (44.27%)
Luluc wrote: That doesn't mean much. HOW exactly was it ever used? Did you actually store a lot of files in it, including large files like music and movies and virtual machines? I do that a lot and my partitions get fragmented.
Good point. I don't think I ever stored any files. I don't use a computer for music or movies. I use a virtual machine rarely only in XP. Users vary greatly in how they use their computers which makes a huge difference in how often, if ever, defragging is needed.

Bruce B

#26 Post by Bruce B »

666philb wrote:i was under the impression that fragmentation doesn't
really affect flash devices, as every point of data on the device can be
read at exactly the same speed. So it offers no performance
improvements at all. All it does do is wear your flash drive out quicker.
There are no moving parts. From that perspective the theory makes
sense to me.

On the other hand, I read where RAM can become fragmented. There are
even RAM defragmenters.

I was told that the life span on the flash media was limited by writes not
reads. I try and read and learn, and don't find the technical details I want
on this one.

I'm left in a vacuum of understanding, due to not finding information.

How about them giving something like average read/write cycles before
failure. Too much technical information to let loose?

I use these devices for data storage and that's about it. I don't want
device failures. But depending on the data, I might dislike data loss more.

~

Bruce B

#27 Post by Bruce B »

I don't know about the e2fsck fragments reports.

I use my relatively small partitions a lot. Big files in and out, rearranging
things. Yet nothing hardly fragments?

So, not fully trusting the e2fsck reports, I do manual defragmenting on
occasion. But the occasions are not something I schedule. Rather on a basis
of - this would be a good circumstance for defragmenting the partition.

When I do it, I massage the magnetic material a few times by writing
random data to the deleted area. Reformat and all.

~

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#28 Post by 666philb »

666philb wrote:i was under the impression that fragmentation doesn't really affect flash devices, as every point of data on the device can be read at exactly the same speed. So it offers no performance improvements at all. All it does do is wear your flash drive out quicker.
ooops

That should read 'defragmenting' (flash drives) offers no performance improvements at all.
All it does do is wear your flash drive out quicker.

666philb
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#29 Post by Flash »

Bruce B wrote:...I was told that the life span on the flash media was limited by writes not
reads. I try and read and learn, and don't find the technical details I want
on this one.

I'm left in a vacuum of understanding, due to not finding information.

How about them giving something like average read/write cycles before
failure. Too much technical information to let loose?
Here's a pdf with lots of info about flash memory lifetime. :)

User avatar
Burn_IT
Posts: 3650
Joined: Sat 12 Aug 2006, 19:25
Location: Tamworth UK

#30 Post by Burn_IT »

That should read 'defragmenting' (flash drives) offers no performance improvements at all.
All it does do is wear your flash drive out quicker.
That is true that it wears it out quicker, BUT, the the method of moving to another clean drive and back again doesn't wear it out as fast as a defrag does providing you supply a large enough write buffer - and that is a different topic.
There is theoretically no speed advantage, but in practice there is a difference as each fragment may well lie in a different read block and the reads and writes have to be done a full block at a time even if only one byte is needed.
You also missed the point that some file types HAVE to be contiguous otherwise they won't work - the one mentioned was booting from an ISO - again that might be possible and quicker if worked around (as I have done in a lot of cases like Puppy, Hiren, UBCD)
"Just think of it as leaving early to avoid the rush" - T Pratchett

Bruce B

#31 Post by Bruce B »

Flash,

Thanks, what a great find. Much appreciated.

Vendors these days often give a five point bulleted list of features. Then a FAQ. But the FAQ don't represent questions any ever asked. They just give more words to read for the people not satisfied with the five point bulleted list.

Makes me feel like getting my boat and take a trip to Taiwan. Finding these guys. March in and shout at the top of my voice:

An inquiring and curious mind wants to know. Any one here speak English and is willing to give some details?

Bruce

PS - It seems to me vendors used to want to inform customers of practical technical details. Or at least have information easily accessible.

Have things changed?

~

Post Reply