Android scandisk/defragmenter for sdcard - Huawei Ideos X6

Was wondering if there is a tool available to perform scan on our sdcard and also defragement it. Or maybe a command from the console to also perform this task just like on a window OS.
Sent from my FIH-FB0 using xda premium

wesleyel said:
Was wondering if there is a tool available to perform scan on our sdcard and also defragement it. Or maybe a command from the console to also perform this task just like on a window OS.
Sent from my FIH-FB0 using xda premium
Click to expand...
Click to collapse
From my knowledge of Linux this is taken care of by the system on boot. Defrag, scandisc would preferred at system or swap partion if used for a longer time. Depends on file system more than windows applieable in this case. Please correct me on this..
My dog sent this while a I took a leak...

Not sure about scandisk utilities, but defrag is only necessary for conventional hard drives that contain an actual spinning disk. The reason for this is that on a spinning drive, fragmented files are scattered across multiple physical locations on the disk. This is not a concern for solid state drives, including both built-in storage and SD cards. With solid-state memory, the physical location of data is irrelevant.
In fact, defragmenting solid-state memory is actually detrimental to the hardware. Each "cell" of the chip can only survive a few hundred of thousand delete/write cycles before it fails. This is typically not a concern as A) this is usually far more than would happen during the expected life of the device itself and B) low-level software performs "wear-leveling" ensuring that some cells don't get written to excessively while others remain unused and C) this low-level software is also able to detect bad cells and flag so they do not get used, in a way that is completely transparent to the end user. The reason defragmenting is bad for solid-state chips is that it involves many delete/write operations which slowly degrade the chip, but which ultimately serve no greater purpose.

Thanks for clearifying this.
My dog sent this while a I took a leak...

Zfwaeld said:
Not sure about scandisk utilities, but defrag is only necessary for conventional hard drives that contain an actual spinning disk. The reason for this is that on a spinning drive, fragmented files are scattered across multiple physical locations on the disk. This is not a concern for solid state drives, including both built-in storage and SD cards. With solid-state memory, the physical location of data is irrelevant.
In fact, defragmenting solid-state memory is actually detrimental to the hardware. Each "cell" of the chip can only survive a few hundred of thousand delete/write cycles before it fails. This is typically not a concern as A) this is usually far more than would happen during the expected life of the device itself and B) low-level software performs "wear-leveling" ensuring that some cells don't get written to excessively while others remain unused and C) this low-level software is also able to detect bad cells and flag so they do not get used, in a way that is completely transparent to the end user. The reason defragmenting is bad for solid-state chips is that it involves many delete/write operations which slowly degrade the chip, but which ultimately serve no greater purpose.
Click to expand...
Click to collapse
Wow I just got educated. Thanks a ton bro...
Sent from my FIH-FB0 using xda premium

wesleyel said:
Was wondering if there is a tool available to perform scan on our sdcard and also defragement it. Or maybe a command from the console to also perform this task just like on a window OS.
Sent from my FIH-FB0 using xda premium
Click to expand...
Click to collapse
There is no need to defragment as told already above. But you can Consolidate free space to make a large pool of free space and yes Consolidating free space increases "write" speed if memory is low because to writing to several small location takes more time than writing to a continuous memory block... use MyDefrag free software to Consolidate space.

But, when it is damage SD, dont knwo why... becasue i didnt touch the ****ing cell phone.. it is not a "scandisk" command from system or any app could make it? I cant find nothing.. must I take it out and do it under windows???
thanks.

Related

Reformatting Internal Storage improved performance 25%

I reformatted the Internal Memory (4GB) with the trialversion of CnetX Flash Format, using FAT32 with 16k clustersize (as opposed to 4k clustersize).
Starting large applications from the Internal Storage is now 25% faster. TT7 took 17 seconds from start to 100% route calculation, after formatting it takes 13 seconds.
Remember to backup internal storage first.
Format the internal storage is a good thing to do from time to time, i defrag it with Perfect Disk
omaga said:
Format the internal storage is a good thing to do from time to time, i defrag it with Perfect Disk
Click to expand...
Click to collapse
Perfectdisk - sounds interesting...where did you get that from?
neilsupermac999 said:
Perfectdisk - sounds interesting...where did you get that from?
Click to expand...
Click to collapse
http://tinyurl.com/awwxn3
JonInAtl said:
http://tinyurl.com/awwxn3
Click to expand...
Click to collapse
The reason for asking the question is that googling 'perfect disk windows mobile' doesnt bring up anything particularly obvious in relation to defragging handset storage.
I'll refrain from passing any more comments on your post..but thank you...no...really.
omaga said:
Format the internal storage is a good thing to do from time to time, i defrag it with Perfect Disk
Click to expand...
Click to collapse
Defrag a Flash based memory? This is absolute unnecessary:
Flash memory isn't accessed by a single read/write head. So it doesn't need its contained files to be made contiguous and moved closer together to speed access. This means that there is an unexpected - by me at any rate - benefit to flash memory compared to hard drives. You don't need to do so much house-keeping.
You may have applications that assume or require files in flash memory to be contiguous. In that case defragging would be a good idea. But wait, there is a problem. Flash memory only supports a finite number of writes and defraging involves a lot of writing. So by defragging flash you are shortening its working life.
neilsupermac999 said:
The reason for asking the question is that googling 'perfect disk windows mobile' doesnt bring up anything particularly obvious in relation to defragging handset storage.
I'll refrain from passing any more comments on your post..but thank you...no...really.
Click to expand...
Click to collapse
I had the same results but after going ahead and looking at the demo version it's still not clear how Perfect Disk works with the Diamond internal storage.
--Never mind--
Figured it out, forgot I could use Settings/USB to PC to set device as a "removable disk". Works fine.
I have done that before and yes it does seem to speed up the phone
MarcLandis said:
Defrag a Flash based memory? This is absolute unnecessary:
Flash memory only supports a finite number of writes and defraging involves a lot of writing. So by defragging flash you are shortening its working life.
Click to expand...
Click to collapse
So you would recommend not using the built in capability to use the Diamond memory as a removable disk or is there something in the defrag process that is substantially different than user read/writes related to working life?
Interesting that your post is a direct quote from a Nov 05 Techworld posting (for which you may have been the author). Here is a more contemporary and empirical exercise on the subject of fragmented flash memories:
http://www.lagom.nl/misc/flash_fragmentation.html
Having said all that, I didn't expect much just thought there might be some overhead cleanup, and I didn't worry over shortening the life of the memory, but could be convinced otherwise.
d-e-l-e-t-e
Reformatting with bigger cluster size will give a bit better performance at the cost of space. You wont notice much unless there's loads of small files though. A 1 byte file will still take up the same amount of size on the disk as the cluster size. If a file is 1 byte larger then the cluster size it will take up the same amount of space as 2x the cluster size. In other words it will always round up.
Defrag a flash unit however I don't think is wise. I red that you should not defrag SSD drives for pc as it may affect the life span on them, and it makes no sense defraging them anyway since they are not accessed like a harddrive.

Diamond2 is sluggish

This is just a general question, but I'm sure the responsiveness of my Diamond 2 is getting worse. It sometimes takes ages to response to any kind of screen press.
Powering off and back on does make it more responsive.
Wearing my PC support hat, I'd say is seems to be suffering from lack of memory and therefore is thrashing the hard disk.
Does this analogy apply to Windows Mobile devices?
I've checked I've not got any programs running and usually there is nothing. However, the touch-flo applications aren't listed. I assume this is because they are all part of the main desktop shell?
Another observation is that the battery sometimes gets very hot. This is usually an indicator that the battery is being drained very fast. Another guess, but if there is a "bad" task in there, I assume it could drain the battery in this way and use up CPU?
I've got encryption turned on for the SD card. Does this impose a big overhead as I've tried to configure most programs to use the card when possible.
I'm about to back it up and try a cold reset as a test.
Cheers, Rob.
"therefore is thrashing the hard disk"
no wm don't use virtual mem as flash is slow and have limited writes before it dies
"I've got encryption turned on for the SD card."
people should be very very very careful using encryption on sd cards only
if the data being remained hidden is much more important then the data itself
should one use it
have the device die on you and replaced with a new
or even changing the rom will result in the data on your sdcard
being lost forever
Encryption
Rudegar said:
"therefore is thrashing the hard disk"
people should be very very very careful using encryption on sd cards only
if the data being remained hidden is much more important then the data itself
should one use it
Click to expand...
Click to collapse
I pick up my company email through it so there are some slightly sensitive documents on there.
I don't (and never would) ever keep the only copy of data on a phone!
Cheers, Rob.

The Effects of CompCaching?

I was just wondering, since using a Linux Swap over time wears down your SD card, doesn't using a CompCache wear down your internal memory.. which is just as bad if not worse?
SolemnWishing said:
I was just wondering, since using a Linux Swap over time wears down your SD card, doesn't using a CompCache wear down your internal memory.. which is just as bad if not worse?
Click to expand...
Click to collapse
Compcache doesn't use internal memory but the phone's RAM, two different things, don't get them confused. Like the RAM in your computer, it doesn't have a limit two how many times it can be written to or read from. So its "healthier" for your phone. But its results are mixed, some see a huge improvement, some see none, some see their phones slow down. Its worth a try as its only one userinit.sh from being used. Not a huge ordeal, if it doesn't work, delete the script and just reboot your phone and you're back to just linux-swap.

[HOW TO][SCRIPT] Swap

I've made a simple script that activates swap on boot
What is swap?
Swap puts the 'less important RAM' on the sdcard, making the device faster. It is best when used with v6 Supercharger. (See my other thread)
Requirements:
An SD card to BE IN THE DEVICE AT BOOT, POSSIBLY EVERY BOOT, with at least 150mb of space free on it
A 8/16gb Archos G9 (NOT THE 250GB MODEL)
Root
Script Manager from the market
Busybox (See my other thread)
What to do:
1. Download this: (long press > save link)
http://db.tt/LP7tliLZ
2. Using Script Manager, locate the downloaded file and rename (long press > rename) to 90swapon.sh
3. Copy (long press > copy) it to /data and then tap it to bring up a pop up window
4. Tap the little "pirate flag" (superuser logo) and the "gear" (run on boot)
5. Tap run and wait for it to say swap is on
6. Reboot
7. Hit thanks, you are done
Note: to check if it works, type "free" into a terminal, and it will give you values for swap. It takes a bit to kick in, so it won't be on straight away on boot
Sent from my ARCHOS 80G9 using xda premium
thank you for this and all the stuff you did/contribute for our G9
jipee296 said:
thank you for this and all the stuff you did/contribute for our G9
Click to expand...
Click to collapse
I actually do most of this stuff for myself and then upload it for the community, but thanks
Sent from my ARCHOS 80G9 using xda premium
Quinny,after using this script for two days, i always get a random reboot or the devices freezes... any help?
jipee296 said:
Quinny,after using this script for two days, i always get a random reboot or the devices freezes... any help?
Click to expand...
Click to collapse
Don't have that issue. It's not to do with swap
Sent from my ARCHOS 80G9 using Tapatalk HD
gorymp mine
Hi, thanks for that job, I'm going to try it!
But I have one question:
Why, if the G9 recongnizes de main memory as SD, is not posible to do that with the main memory instead of an external card??
I prefer to lose even 1Gb on my memory for increasing my perfomance...
Denkel said:
Why, if the G9 recongnizes de main memory as SD, is not posible to do that with the main memory instead of an external card??
Click to expand...
Click to collapse
First of all, because the swap is continuously rewritten as the system tries to distribute itself between physical RAM and swap in the optimal way. Any type of flash memory allows only a limited number of read-write cycles - and not really big. So, if you put swap onto it, you will kill it in a relatively short time . If it is a card, you just replace it; if it is the main ROM, you ruin the entire device.
Аnd once the swap volume is corrupt, results are unpredictable - that is what might happen to jipee296. jipee296, did you use an old card that had been rewritten many times before? Try a brand new one just to see if the problem goes away.
HDDs do not have this limitation, so if it were the HDD model, there would be the perfect place for swap. But this is not the case.
Quinny899, will the system start at all if swap is activated but the card is missing or corrupt? Actually there are two more inctructions missing for a complete solution: how to replace the SD card (will the swap be re-built automatically on a new card?) and how to remove swap completely. Any new step should be repeatable and reversible.
BTW, does someone know the exact brand of SD card reader used in G9 (hopefully it is the same in all models), or at least its performance characteristics (class, read spped, write speed)? This would be helpful to choose the optimal SD - as fast as the controller can support, but not an even more fast and more expensive one.
iourine said:
First of all, because the swap is continuously rewritten as the system tries to distribute itself between physical RAM and swap in the optimal way. Any type of flash memory allows only a limited number of read-write cycles - and not really big. So, if you put swap onto it, you will kill it in a relatively short time . If it is a card, you just replace it; if it is the main ROM, you ruin the entire device.
Аnd once the swap volume is corrupt, results are unpredictable - that is what might happen to jipee296. jipee296, did you use an old card that had been rewritten many times before? Try a brand new one just to see if the problem goes away.
HDDs do not have this limitation, so if it were the HDD model, there would be the perfect place for swap. But this is not the case.
Quinny899, will the system start at all if swap is activated but the card is missing or corrupt? Actually there are two more inctructions missing for a complete solution: how to replace the SD card (will the swap be re-built automatically on a new card?) and how to remove swap completely. Any new step should be repeatable and reversible.
BTW, does someone know the exact brand of SD card reader used in G9 (hopefully it is the same in all models), or at least its performance characteristics (class, read spped, write speed)? This would be helpful to choose the optimal SD - as fast as the controller can support, but not an even more fast and more expensive one.
Click to expand...
Click to collapse
To remove just delete the file you pushed. And I ran swap on my old phone for 2 years and nothing happened to the sd
Sent from my HTC Desire HD using XDA Premium HD app
jipee296 said:
Quinny,after using this script for two days, i always get a random reboot or the devices freezes... any help?
Click to expand...
Click to collapse
I didn't try the script yet but used "swapper 2". I assume this does the same thing and I get random reboots and freezes too. I tried different values for swappiness, internal memory or sdcard, swap file and swap partition, the problem remains
SE-X1 said:
I didn't try the script yet but used "swapper 2". I assume this does the same thing and I get random reboots and freezes too. I tried different values for swappiness, internal memory or sdcard, swap file and swap partition, the problem remains
Click to expand...
Click to collapse
Swapper 2 has freezing issues, the script doesn't
Sent from my Desire HD using XDA Premium HD app
Hi,
I looked at your script and it seems to recreate the swap file at every boot. That might slow the boot process. You could add an "if file exists...don't rm and create" kind of instruction...
Quinny899 said:
To remove just delete the file you pushed.
Click to expand...
Click to collapse
And what happens next? Does the system start at all? Does it re-create the swap, or operates without swap from that point on? (Sorry, I'm on the go now and cannot investogate your script.)
And I ran swap on my old phone for 2 years and nothing happened to the sd
Click to expand...
Click to collapse
Well, to say not so categorically - this may depend upon many things: memory type, manufacturer, actual load, etc. E.g. if the amount of physical RAM is sufficient for everyday use, then swap is used very rarely, or not used at all - surely, the card will live much longer in this case. Yet finally any flash memory is mortal, sooner or later (like us, too). I personally had a few dead cards and sticks over the past few years (without swap, just due to intensive usage), and I won't risk the entire device for the price of a flash card.
x3ss said:
Hi,
I looked at your script and it seems to recreate the swap file at every boot. That might slow the boot process. You could add an "if file exists...don't rm and create" kind of instruction...
Click to expand...
Click to collapse
I'll look into it
Sent from my Desire HD using XDA Premium HD app
iourine said:
And what happens next? Does the system start at all? Does it re-create the swap, or operates without swap from that point on? (Sorry, I'm on the go now and cannot investogate your script.)
Well, to say not so categorically - this may depend upon many things: memory type, manufacturer, actual load, etc. E.g. if the amount of physical RAM is sufficient for everyday use, then swap is used very rarely, or not used at all - surely, the card will live much longer in this case. Yet finally any flash memory is mortal, sooner or later (like us, too). I personally had a few dead cards and sticks over the past few years (without swap, just due to intensive usage), and I won't risk the entire device for the price of a flash card.
Click to expand...
Click to collapse
If you delete it it just doesn't use the swap file. End of.
And why, if swap was unsafe, do almost all Linux builds recommend it and HTC incorporate it on some phones?
Sent from my Desire HD using XDA Premium HD app
iourine said:
Yet finally any flash memory is mortal, sooner or later (like us, too). I personally had a few dead cards and sticks over the past few years (without swap, just due to intensive usage), and I won't risk the entire device for the price of a flash card.
Click to expand...
Click to collapse
I still use Kingston 8GB micro sd card- it had 128MB swap partition used from the very beginning I bought it (samsuck Spica had 256MB ram, it was quite hard to use it without swap)- card still works fine, no r/w problems on swap area.
On the other hand- if you don't like swap on flash memory you are free to make zram driver
Quinny899 said:
If you delete it it just doesn't use the swap file. End of.
Click to expand...
Click to collapse
Ok, now it is more clear.
And why, if swap was unsafe, do almost all Linux builds recommend it and HTC incorporate it on some phones?
Click to expand...
Click to collapse
Because all end-user Linux distributions arу traditionally targeted at conventional PCs equipped with a HDD. Things are different, say, for embedded Linux projects - swap is a very rare thing there.
In fact, swap concept is a thing of the past. Physical ROM is rather cheap now, and there are very few reasons to have it less than needed for your everyday use. Provided that, you can eliminate swap at all, both for Windows, Linux, or whatever else. I did this a few years ago (with RAM ranging from 1,25GB at my very old travel notebook to 8GB at graphic station used to stitch multi-megapixel panoramas), and never was short of RAM.
Unfortunately, this is not the case for current G9 8-(( A few bucks saved on a RAM chip by Archos designers cause problems now and will definitely cause much more problems in the future. I would never buy it if I only knew that there is only 512MB. I just missed the fact that RAM is not listed in technical specifications because I could not imagine that the very top model, the newest one, with high-end other hardware, may be below the de-facto standard of 1GB. That is why swap is really important for us here and now.
As for HTC, they might have various reasons to do so... not only the technical ones...
Hello, you can not increase the size of the swap file more than 150mb?
brbi said:
Hello, you can not increase the size of the swap file more than 150mb?
Click to expand...
Click to collapse
Modify the file. 150 should be all you need though. It will also take longer to boot the higher you make it
Sent from my Desire HD using XDA Premium HD app

[Q] Can you replace the internal memory on the Galaxy Note NT-7000?

With people trying different ROM all the time would it affect the lifespan of the internal storage? If so, can you replace it then whenever it gives out? Cheers!
No, it is soldered down. Desoldering it would be more-or-less akin to performing the miracle of walking on water.
andruyd said:
With people trying different ROM all the time would it affect the lifespan of the internal storage? If so, can you replace it then whenever it gives out? Cheers!
Click to expand...
Click to collapse
While I'm sure that there is a finite limit to the amount of read/write cycles that can be done on the memory of the phone, if you are really worried, you can just load all of your apps onto a microSD (and just tear up that memory instead).
While I am not sure if it is possible to run the whole OS from the microSD slot, it has been done on other devices but would be slow and buggy.
However, if you want to only limit the total number of read/write cycles on the physical memory, a great way is by moving apps to external storage, but bear in mind they will run slower.
Also, you will probably upgrade your phone far earlier than you might have a problem with the internal storage corrupting.
In terms of flashing ROMs, this is somewhat of a valid point, but once there is a stable ICS rom of your liking, chances are at least some of us will be flashing much less

Categories

Resources