Results 1 to 7 of 7

Thread: question about Knoppix flash disk write cycles

  1. #1
    Junior Member
    Join Date
    Dec 2012
    Posts
    7

    question about Knoppix flash disk write cycles

    Hello All,

    I have a question about Knoppix flash disk write cycles.

    Considering the limited write cycles a usb stick can survive, I started with Puppy.
    I installed Puppy on my USB stick and worked with it for a while.
    Puppy gives the user complete control over the write cycle to the usb stick.
    The user can manually trigger an update to the usb stick by clicking on a dedicated
    icon on the desktop. Updates/changes are also written to the usb stick during shutdown.

    User initiated write cycles are small in numbers and practically will bever reach
    the usb flashdisk limit, but a mechanized (program initiated) write cycle can reach that
    limit in few minutes.

    I was not able to activate the encryption on Puppy, so I switched to Knoppix.
    I installed Knoppix on my usb stick using "unetbootin", I then created an encrypted
    persistent file, and I am working with it happily ever after.

    However, Knoppix does not give a direct control over the usb write cycles as Puppy.
    I don't know when/if Knoppix writes to the usb stick.
    I know the "toram" cheat code will cause Knoppix to load itself to the RAM
    and work from there, but what about programs that are running from the persistent file ?
    Can such programs write to the persistent file back and forth ?
    Is there a tool to show the user (me) when exactly does Knoppix writes to the usb stick ?
    Could it be that I am actually killing my usb by runing Knoppix from it ?

    Thanks for any help,

    nopics.

  2. #2
    Senior Member registered user
    Join Date
    Sep 2006
    Posts
    802
    If you search this forum for the "noimage" cheatcode, you may find some reflections on this theme. It is a principally important problem, but one reason why it doesn't seem to have attracted so much attention/action on Knoppix, is that disk writes to persistent store in practice don't happen all that often when there is an ample supply of RAM to use as cache.

    There is really no principal difference between programs in the cloop and programs installed later when it comes to disk writes when a persistent store is in use, and whenever you update a program in the cloop, the new version is stored in the persistent store.

    If you keep on issuing sync commands all the time, you force writing, but in general, disk writes may be fewer than you think, and because this is largely kernel stuff, nobody may have the exact answer about when Knoppix writes to disk.

    I would also like to point out that the effective number of writes to a flash location is a random variable with a variance larger than we like (and the vendors tend to admit) So you are actually killing your usb by using it for anything that repeatedly writes to it. It just goes on so slowly that most won't notice, but every now and then the problem surfaces.

  3. #3

  4. #4
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631
    @ nopics
    FWIW, my experience:
    I use a small Knoppix LiveUSB exclusively and have for several years.
    I don't know of any instance where I've run into a 'wear problem'.
    On the other hand, I don't know what to look-for.

    You might start to worry in earnest about the 'experimental' reiserfs
    partition for KNOPPIX-DATA in Knoppix 7.0.5 LiveUSB. This is a journalled fs.
    This alone 'ups the ante' on read-write-persistence.

    @ anyone
    For my own purposes, I cloop compress persistence files occasionally
    and overlay these _read-only_ files alongside KNOPPIX in
    /mnt-system/KNOPPIX/. This minimizes the need for additional persistence.
    You can think of this as using ro-persistence and rw-persistence.

    If I worried about write-wear, which I don't, I might also consider running
    the noimage cheatcode most of the time.

    I don't know how, or why, to worry about write-wear unless there is some
    practical, quantitative measure to guage what's going on.

    @ blacksimon
    I really appreciate the reference list.

  5. #5
    Senior Member registered user
    Join Date
    Sep 2006
    Posts
    802
    I also appreciate the reference list, blacksimon!
    But reading through much of it, I only got my impression about the noimage approach confirmed. That will use the adaptations already built into Knoppix in an optimal way, I think. And people shy of remastering, can use utu's overlay approach to minimize persistent store space. (Actually, overlays+occasional remasterings might be a very good scheme.)
    My own motive for working with this now isn't so much media wear as system robustness and efficiency. Media writes is the most costly, in terms of time and resources, and least predictable kind of operation I perform running Knoppix, so having a way to control them would greatly facilitate flexibility. Like running Knoppix off the micro sd card in my mobile phone (which worked well last time I tried, but a bit too slow writes then..)

  6. #6
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631
    Quote Originally Posted by nopics View Post
    Is there a tool to show the user (me) when exactly does Knoppix writes to the usb stick ?
    nopics.
    You might do an audit of your own situation as a start.
    For example, here's mine & my estimate of what it might mean
    .
    Code:
    Here's an audit of my current 'cd-size' Knoppix 7.0.5 LiveUSB:
    
    knoppix@Microknoppix:~$ df -h -T
    Filesystem     Type      Size  Used Avail Use% Mounted on
    /dev/sdb1      vfat     1015M  834M  181M  83% /mnt-system
    tmpfs          tmpfs     2.8G     0  2.8G   0% /ramdisk
    /dev/cloop     iso9660   1.9G  1.9G     0 100% /KNOPPIX      (Klaus K's r/o part )
    /dev/cloop1    iso9660   333M  333M     0 100% /KNOPPIX1     ( my  own  r/o stuff)
    /dev/sdb2      reiserfs  6.5G  208M  6.3G   4% /KNOPPIX-DATA ( my  own  r/w stuff)
    unionfs        aufs      6.5G  208M  6.3G   4% /UNIONFS
    unionfs        aufs      6.5G  208M  6.3G   4% /usr
    unionfs        aufs      6.5G  208M  6.3G   4% /home
    tmpfs          tmpfs      10M   60K   10M   1% /UNIONFS/var/run
    tmpfs          tmpfs      20M  2.8M   18M  14% /run
    tmpfs          tmpfs      10M     0   10M   0% /UNIONFS/var/lock
    tmpfs          tmpfs     100M  228K  100M   1% /UNIONFS/var/log
    tmpfs          tmpfs     2.0G  8.0K  2.0G   1% /tmp
    udev           tmpfs      20M  4.0K   20M   1% /dev
    tmpfs          tmpfs     2.0G     0  2.0G   0% /dev/shm
    
    I think this can be interpreted as follows:
    
    1. ramdisk       is rarely used, if ever.
    2. tmpfs         I assume is all on ram.
    3. /KNOPPIX      1.9G on ram comes from read-only /mnt-system/KNOPPIX/KNOPPIX  which is only 690M.
    4. /KNOPPIX1     333M on ram comes from read-only /mnt-system/KNOPPIX/KNOPPIX1 which is only 118M.
    5. /KNOPPIX-DATA reiserfs file is read-write & journalled, but photos account for 122M.
    
    If photos were off-loaded, net reiserfs read-write would be restricted to about 90M,
    but this is journalled, and that may be crucial to the write-wear situation.

  7. #7
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631
    Quote Originally Posted by Capricorny View Post
    running Knoppix off the micro sd card in my mobile phone
    .
    I'm sharing my old Knoppix SD-cards now with my Panasonic point-and-shoot camera.
    Hadn't thought about booting it up.;D

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


SanDisk 128GB Extreme PRO USB 3.2 Solid State Flash Drive - SDCZ880-128G-A46 picture

SanDisk 128GB Extreme PRO USB 3.2 Solid State Flash Drive - SDCZ880-128G-A46

$36.99



SanDisk 128GB Ultra Flair USB 3.0 Flash Drive - SDCZ73-128G-G46 picture

SanDisk 128GB Ultra Flair USB 3.0 Flash Drive - SDCZ73-128G-G46

$12.99



SanDisk 32GB Ultra Dual Drive USB Type-C, USB 3.1 Flash Drive - SDDDC2-032G-G46 picture

SanDisk 32GB Ultra Dual Drive USB Type-C, USB 3.1 Flash Drive - SDDDC2-032G-G46

$10.99



SanDisk 512GB Ultra Drive Dual Go USB Type-C Flash Drive Green SDDDC3-512G-G46G picture

SanDisk 512GB Ultra Drive Dual Go USB Type-C Flash Drive Green SDDDC3-512G-G46G

$49.99



Sandisk 16GB 32GB 64GB 128GB Cruzer Blade Flash Drive Memory Stick USB Lot Pack picture

Sandisk 16GB 32GB 64GB 128GB Cruzer Blade Flash Drive Memory Stick USB Lot Pack

$4.99



New TESLA OEM Model S,3,X,Y USB Flash Drive for Dashcam & Sentry Mode 128GB picture

New TESLA OEM Model S,3,X,Y USB Flash Drive for Dashcam & Sentry Mode 128GB

$18.99



Lenovo USB 16TB 3.0 USB Flash Drive Thumb Disk Silver Transfer Metal Memory picture

Lenovo USB 16TB 3.0 USB Flash Drive Thumb Disk Silver Transfer Metal Memory

$24.99



2TB USB 3.0 Flash Drive Memory Photo Stick for iPhone Android iPad Type C 3 IN1 picture

2TB USB 3.0 Flash Drive Memory Photo Stick for iPhone Android iPad Type C 3 IN1

$13.00



USB Flash Drive Memory Stick Pendrive Thumb Drive 4GB, 8GB, 32GB, 64GB 128GB LOT picture

USB Flash Drive Memory Stick Pendrive Thumb Drive 4GB, 8GB, 32GB, 64GB 128GB LOT

$249.37



Lot USB Flash Drive Memory Stick Pendrive Thumb Drive 2GB,4GB, 8G, 32G, 64G 128G picture

Lot USB Flash Drive Memory Stick Pendrive Thumb Drive 2GB,4GB, 8G, 32G, 64G 128G

$414.85