deleting default activities

Discuss Sugar, upgrades and developer perspectives.

deleting default activities

Postby pauljbell » Sat Mar 15, 2008 5:29 pm

in the interest of conserving flash, i would like to delete some of the default activities that i'll never use.

anyone know how to do this?

-paul
pauljbell
 
Posts: 13
Joined: Sat Mar 15, 2008 2:28 pm

Re: deleting default activities

Postby koolkat » Mon Mar 17, 2008 6:21 am

I have not tried it, but I am guessing that it would be accomplished by finding the activities on the flash, using terminal and then deleting these entries. Your user installed activities are in /home/olpc/activities I am not sure where the others are, as I don't have my olpc here right now, but someone should be able to help or failing that I can find them once I get home.

-Koolkat
koolkat
Support Team
 
Posts: 74
Joined: Tue Feb 12, 2008 7:44 am

Re: deleting default activities

Postby pauljbell » Mon Mar 17, 2008 10:01 am

thanks for the input.

i found them in /usr/share/activities - removed them and rebooted - no issues. i suppose i'll need to go through the routine again whenever i upgrade the OS - suppose i'll just write a script to do it.
odd how things seem to move around a lot with each new version of the OS - i'm running 691.1 (RC-1).

-paul
pauljbell
 
Posts: 13
Joined: Sat Mar 15, 2008 2:28 pm

Re: deleting default activities

Postby ektoric » Mon Mar 17, 2008 11:31 am

pauljbell wrote:in the interest of conserving flash, i would like to delete some of the default activities that i'll never use.

Interesting tidbit about flash technology: Unlike the magnetic platters of hard drives, you cannot erase from flash "indefinitely". With a hard drive, you can virtually erase, write, erase, write all you want and you will only be affected by the hard drive's MTBF (mean time between failure).

With flash technology, each flash sector can only be erased a certain number of times. After that, that sector can't be erased anymore. With heavy usage (such as a log file), you can kill a flash in a matter of months. Every time you "update" a file, you have to erase the old file and write a new one.

So how does USB flash, SD, and your XO prevent itself from dying in a few months? Google "wear leveling". Wear leveling doesn't remove the problem though. It only prolongs the life of the flash before the erase limit gets hit. It makes the flash erase limit comparable to a hard drives MTBF. (Even though it's an order of magnitude or so off, it's at least within the ballpark.)

So, back on topic: "conserving flash". The best way to "conserve" the flash is to never erase something until you actually need to. Keep everything possible until the last moment that you actually need the space, and don't delete until then.

If you want to go a step further, use a USB disk or SD card whenever possible. This has the advantage of preserving your Activities after you upgrade too! The reason for using an USB/SD is that they can be removed, whereas the internal XO flash can not.

Normal usage should allow the XO's flash to operate for yearS (beyond the life expectancy of the product). But for many people in the G1G1 program, we will be using it for more than its intended use: constant upgrades, hacking, playing around alot, reflashing, etc. So, how extreme of measures you want to take to preserve your flash depends on how far away from "norm" you expect your usage patterns to be.
ektoric
Support Team
 
Posts: 470
Joined: Wed Jan 02, 2008 3:46 pm
Location: Austin, TX

Re: deleting default activities

Postby pauljbell » Mon Mar 17, 2008 11:46 am

very interesting indeed!

are you suggesting a link between say, /usr/share/activies and a directory on the SD card, or is there a better way to move system files/directories to SD?

-paul
pauljbell
 
Posts: 13
Joined: Sat Mar 15, 2008 2:28 pm

Re: deleting default activities

Postby ektoric » Mon Mar 17, 2008 2:30 pm

You don't need to move any system files onto the SD. When you install new activities, you can install them on the SD as opposed to say, your home directory. Again, if it's already on the XO's flash, then per above, don't worry about "moving" them (as moving involves a delete as well). Just consider it for new things.

I don't have my XO in front of me, but I think if there's an Activities directory (/media/<vol>/Activities) then those will be pulled into Sugar as well.
ektoric
Support Team
 
Posts: 470
Joined: Wed Jan 02, 2008 3:46 pm
Location: Austin, TX

Re: deleting default activities

Postby pauljbell » Mon Mar 17, 2008 3:49 pm

cool, thanks!

-paul
pauljbell
 
Posts: 13
Joined: Sat Mar 15, 2008 2:28 pm

Re: deleting default activities

Postby lgarcia » Mon Mar 17, 2008 10:11 pm

ektoric wrote:
So, back on topic: "conserving flash". The best way to "conserve" the flash is to never erase something until you actually need to. Keep everything possible until the last moment that you actually need the space, and don't delete until then.

If you want to go a step further, use a USB disk or SD card whenever possible. This has the advantage of preserving your Activities after you upgrade too! The reason for using an USB/SD is that they can be removed, whereas the internal XO flash can not.

Normal usage should allow the XO's flash to operate for yearS (beyond the life expectancy of the product). But for many people in the G1G1 program, we will be using it for more than its intended use: constant upgrades, hacking, playing around alot, reflashing, etc. So, how extreme of measures you want to take to preserve your flash depends on how far away from "norm" you expect your usage patterns to be.
[/quote]

Hmmm... good to know and I don't think it has been addressed elsewhere. I have been deleting everything but the downloaded Activities Page files (like where I downloaded to install Speak or SimCity) every few days. Looks like I better stop doing that.

I have been running my pdf ebooks off my USB stick, so I guess that was a good thing.
lgarcia
 
Posts: 7
Joined: Sun Feb 17, 2008 9:44 pm

Re: deleting default activities

Postby pauljbell » Tue Mar 18, 2008 6:45 am

it appears that some flash memory vendors are more diligent than others (so what's new) about wear leveling; it would be interesting to hear from an authoritative source within the hardware development community what the flash vendor selected for the olpc has done in this area.

i wonder if there is a publicly available list of flash/SD vendors ranked by how well they address this issue - some vendors offer guarantees of long life, but i've never read the fine print so i don't know if this is just marketing hype, i.e., how long it will last if you just use it occasionally. this could turn out to be something like the DVD vendors - at one time we all (well, most of us) thought any DVD would last forever but found out some were better for landfill than for serious storage of important images, etc. least we forget, caveat emptor rules!

-paul
pauljbell
 
Posts: 13
Joined: Sat Mar 15, 2008 2:28 pm

Re: deleting default activities

Postby ektoric » Tue Mar 18, 2008 11:09 am

pauljbell wrote:it appears that some flash memory vendors are more diligent than others (so what's new) about wear leveling; it would be interesting to hear from an authoritative source within the hardware development community what the flash vendor selected for the olpc has done in this area.


(Disclaimer: The following information is what I have interpreted and gleaned from the websites. It is not authoritative, and...frankly, I have been known to be wrong on occasion.. okok many times.)

Hardware flash devices (SD, USB, compactflash, etc.) have controllers on them that present flash sectors (the unit of erasable blocks) as continuous memory and perform the wear leveling. The flash controller on the XO (the CAFE ASIC) presents the flash in its raw sector addressable form.

The XO then uses the JFFS2 filesystem to perform wear leveling.
ektoric
Support Team
 
Posts: 470
Joined: Wed Jan 02, 2008 3:46 pm
Location: Austin, TX

Re: deleting default activities

Postby shae » Thu Aug 28, 2008 2:49 pm

Why this from the Simplified User Guide?

Conserving disk space

Your XO laptop can store a limited number of files on its 1 GB flash disk drive. You should maintain your XO so that it does not run out of storage space for new files. You can delete some items by using the Journal Activity.

To clear out space for more files:

1. Go to the Home view and click the Journal icon.
2. Look for files that you can delete, such as old files or large files that you have copied to another location.
1. In general, video and audio media files and some PDF files or e-books are larger than individual Write activity files or still photographs.
2. The Browse activity may download more than one copy of a PDF or media file if you do not realize you have already downloaded it. Delete duplicates to save space
3. Select a file by clicking on its wide bar. This will give you a preview of the activity or file. If you want to delete it, click the Erase button (minus sign). If you want to resume using it, click on the large box on the right.
shae
 
Posts: 2
Joined: Thu Aug 28, 2008 2:46 pm

Re: deleting default activities

Postby ektoric » Thu Aug 28, 2008 6:37 pm

shae wrote:Why this from the Simplified User Guide?

I'm sorry, what is your question?

The quote you presented is correct in that you don't want to fill your onboard flash. So if you have started to use your onboard flash and it is becoming full, then you will want to delete files. The steps used to delete files are your Activity generated files, and Journal entries.

This is slightly different than the first post. The journal will indeed fill up with natural use, and will indeed need to be cleaned up eventually. It is not in conflict with other suggestions of using external USB and / or SD card for conserving longevity of onboard flash.
ektoric
Support Team
 
Posts: 470
Joined: Wed Jan 02, 2008 3:46 pm
Location: Austin, TX

Re: deleting default activities

Postby shae » Fri Aug 29, 2008 5:27 am

I'm sorry, can you just clear this up for me. Am I to wait until the flash becomes full, not clean it off daily or weekly? How do I know when the flash is full. I am instructing children in Sierra Leone who have no funds to buy external drives or cards and we are not clear about how much video and photo space they have and each file doesn't appear to state it's size. Also, is the only way to clear the flash to delete individual files? Can you not clear it completely at one go?

Thank you!!
shae
 
Posts: 2
Joined: Thu Aug 28, 2008 2:46 pm

Re: deleting default activities

Postby ektoric » Fri Aug 29, 2008 11:19 am

From the standard Sugar interface, there is no way around it. In this case, you are absolutely right and should follow the suggested instructions of deleting things from the journal. I do not believe the journal has a "batch delete" mechanism, so you are also stuck clearing things singly. Since there is no way around the journal, cleaning it regularly is perfectly fine.

This kind of operation was planned for, and is part of the life expectancy of the product. The kind of extra measures I was referring to for flash longevity was for G1G1 tinkerers who were liable to overuse the flash in non-Sugar ways =)
ektoric
Support Team
 
Posts: 470
Joined: Wed Jan 02, 2008 3:46 pm
Location: Austin, TX


Return to Sugar, Linux and System Software

Who is online

Users browsing this forum: No registered users and 1 guest

cron