SSD Trim and maintenance

Comments

90 comments

  • JCloud

    I'm no techy I'm just posting random stuff I found, here goes:

    https://neverware.zendesk.com/hc/en-us/community/posts/115007821387-SSD-Trim-

    https://bugs.chromium.org/p/chromium/issues/detail?id=210388

    https://chromium.googlesource.com/chromiumos/platform2/+/refs/heads/master/trim/scripts/chromeos-trim

    chrome://system/

    ctrl - f - trim

    Also not sure if helpful or not

    Enabling Swap Memory on ChromeOS. If you own a Chromebook with a low… | by Nithil Krishnaraj | TechTalkers | Medium
    https://medium.com/techtalkers/enabling-swap-memory-on-chromeos-41dcfc4cf93

    Running out of memory on a Chromebook? Here’s a 30-second solution – Gigaom
    https://gigaom.com/2013/04/05/running-out-of-memory-on-a-chromebook-heres-a-30-second-solution/

    [How To] Add Swap Memory to your Chromebook - OMG! Chrome!
    https://www.omgchrome.com/how-to-add-swap-memory-to-your-chromebook/
     
    1
    Comment actions Permalink
  • JCloud

    I never find anything USB fast myself, I don't believe the speeds it's supposed to do.

    0
    Comment actions Permalink
  • Bidwell Ely

    Why not install CloudReady on the device? then you will be able to follow Google instructions for cleaning up your system.

    https://support.google.com/chromebook/thread/2179929/lagging-to-slow-rubbish-need-better-performance?hl=en

    0
    Comment actions Permalink
  • Alexander David Frick

    JCloud Ted Larson chromeos-trim cannot be manually called, and is *supposed* to trim automatically when three conditions are met (not gonna list them here, if curious go look at chromiumos source) but on cloudready (havent tested in vanilla chromiumos or chrome os) issuing sudo fstrim -a -v works, the same as any mainstream linux distro. However this only trims the stateful partition and oem partition. To trim the kernel partitions (which although normally read only, they can benefit from trim because cloudready sys upgrades delete and update files) one would mount /dev/sda18 to /mnt, run the fstrim -a -v command, unmount it, then mount /dev/sda20 to /mnt and do the same thing. ALSO on HDD's using e4defrag -v on / will speed things up significantly. One cannot defrag the root partitions because strangely they are still ext2, although it kinda makes sense since they are rarely modified and otherwise read only, with the lack of journaling and simpler b+tree structures making ext2 slightly faster in read only operations (I.E. we want to make the rootfs and kernel partitions as fast to read as possible) Keep in mind that as per https://neverware.zendesk.com/hc/en-us/community/posts/1500000973861-Notice-Partition-migration-in-v90-and-v91 these partition numbers would change to the way chromeos and chromium os is, and so for the relevant partition numbers one could use sudo fdisk --list and lookup partition functions at https://www.chromium.org/chromium-os/chromiumos-design-docs/disk-format keep in mind that most of the small partitions are not mountable without complex cmdline args and are not of any use to anyone but a chromium os developer compiling their own builds with custom changes to the chromeos-install script.(I compile my own builds but even I have not touched most partitions besides partitions 1 and 2) Lastly, to do ANY of this you MUST disable verity (sudo disable_verity followed by a reboot), which lowers security a bit, but still more secure than even many linux distros. Happy chromiuming.

    1
    Comment actions Permalink
  • Alexander David Frick

    Update, one *could* adjust the parameters for which chromeos-trim gets called by , which I discovered after fiddling with source code before compiling ChromiumOS 93 but that is out of the scope of this forum, was irritating, and requires compiling which takes many hours even on a 8 core 4.6 Ghz, and you still dont have the drivers, support, codecs, widevine, and general niceness of cloudready, so manual triming and possible defragging isn't that hard to do maybe once a month. chromeos-trim seems to do a decent job, but if you've just done shuffling of alot of files or say cleared alot of browsing data or maybe deleted/recreated a crostini VM, this might help.

    0
    Comment actions Permalink
  • JCloud

    That's largely over my head, wish I understood more. I wouldn't really go near most of that myself because risk of doing something wrong.

    I did used to do a lot of data movement / HD thrashing when I ran CR on a dell with 1TB drive, but yeah that was 5200rpm, amazed that machine never exploded on me. On a Chromebook these days and still thrash hell out if it.

    Thanks for the info good to know CR has something in place at least.

    Ted Larson if you really want to trim, Alexander is the person to ask about it whilst he's around. Doubt any else has 1/10th knowledge he does.

    0
    Comment actions Permalink
  • Ted Larson

    Thank you for all your help, Is there a tool or application that would make this easier, so I can just disconnect usb ssd and run the application on Windows or Linux. I really don't like doing command line. Is there an extension that could do this but I could see a mounting problem, what I am really looking for is a K.I.S.S. method.

    To Alexander David Frick I had done a lot of data cleanup dumping the old large video files and a large browser clean up, and I had gotten rid of a lot of old of extensions it had pretty good for the first little bit and then tank.

    0
    Comment actions Permalink
  • JCloud

    Have you tried running in guest browsing mode for a while just to see if it's anything account / settings related ?

    0
    Comment actions Permalink
  • Alexander David Frick

    Ted Larson There is no extension that would be allowed on the chrome webstore, as this would require root access to hardware (needed for trim). There are plenty apps and scripts for linux but none for chromiumos. I do it all the time on my SSD, and you know what since someone else wants a KISS way, I think I'm gonna write a script to do it. It will just be an automater for everything I listed along with some code to check for sudo and tell you what its doing. Also JCloud Ted Larson yeah thats always a good way to go, some badly written apps/extensions can have memory leaks. On chromebooks that often only have 2-4Gb ram, paging and using of ZRAM (a compressed "pagefile" in memory) not only cause thrashing but use CPU for compressing. ChromiumOS just isn't what it was (a good thing) but it really chugs even on 4GB devices, given its size now. I'm seeing much more new chromebooks with 8. I usually have literally hundreds of tabs spread across multiple windows, and I have seen all of my 24 GB used up.  A GOOD way to monitor this (that I think EVERY chrome user should know about) is at chrome://sys-internals Unfortunately it is *still* not listed at chrome://chrome-urls, so the only way I even found out about it was browsing source code for new flags back in version 83.1 - but it is a very useful "task manager", and the only one I know of that will show ZRAM usage on CrOS. Note: you cant just click that you have to actually type chrome://sys-internals but you can make a bookmark (my first bookmark on any chromium browser I use). EDIT: If you dislike chrome://sys-internals, and would like a polished app, there's really only one graphical one, and very good but you can NOT show ZRAM usage although it does show total mem usage. Anyway it's at > https://chrome.google.com/webstore/detail/cog-system-info-viewer/difcjdggkffcfgcfconafogflmmaadco?hl=en 

    ^Francis is also a github friend, and only so because I found Cog to be the best/definitive sys monitor on the web store.

    Lastly, I will begin work on this script and will post progress here or somewhere else if you wish, I'm fine giving out my social stuff. But I will also make a new entry in my "Snippets" repository or maybe new repo on github, which you can get/view here >> https://github.com/Alex313031 

    0
    Comment actions Permalink
  • JCloud

    Yeah cog is what we recommended to people on this forum a lot, I also use it on Windows.

    Yeah I wouldn't recommended less than 8gb for even low users these days.

    There's also a task manager in crosh just type top.

    Alexander sounds like you need this 

    https://9to5google.com/2021/06/09/ctl-chromebook-cbx27-price-specs/

    0
    Comment actions Permalink
  • Alexander David Frick

    JCloud I also use it on windows, also I made a fork with only change being libsensors support, which allows better temp monitoring on some newer ryzen mobos, and manifest update for mobile (I didn't even know cog works on chrome mobile!). You can get that here > https://github.com/Alex313031/cog-chromium  Just get the .zip (loaded as unpacked in chrome://extensions, after enabling developer mode), you can get that here > which although the version no. on the app (0.14) is the same, there are some commits that fixed some things like temps not showing on some motherboards. EDIT: Posting this reminded me to do some changes, so now the readme has chromium words and logos, and the ver is 0.14.1 now.

    And yeah but top is sucky, its like the vim of cmdline sys monitors. Htop is better but once again chromebrew or crouton (idk why they dont integrate this in chromiumos at only ~2mb size). Plus top wont show zram. Even htop, which has a zram monitor, doesn't play nicely with chromiumos custom implementation of zram, so if your'e on a 4GB or less device where it is likely using ZRam with more than a couple tabs open, chrome://sys-internals still seems the only way, plus they actually added graphs in chromiumos 87, accessible on the upper left menu. Yet another option that is only working correctly as of CrOS 87 is the "diagnostics app", intended as a compliment to feedback for sending reports. It features a handy cpu/mem monitor bar, and a stress tester for each, a way to send reports in .json format, AND (nothing else except htop does this) it even shows frequency, useful for when your cpu isn't set to one freq like intel speedstep (like my overclocked FX-8370 is @4.6Ghz.) Enable it at chrome://flags/#diagnostics-app 

    Also, JCloud how long you been using CrOS, how'd you hear about it, and how long you been in the forums. And that chromebox is beast, im like PLZ manufacturers stop making sub 2.0ghz celerons and 2-4gb the norm for cheaper chromebooks like fuck. Unfortunately it is over 1,000$, so I'd be better off making my own machine and loading CrOS or use brunch to make it an actual chromeos machine.

    0
    Comment actions Permalink
  • Ted Larson

    Thank you for the suggestion of COG I installed it, I'm also trying right now  chrome://sys-internals

    I am also going to try incognito mode to see if it's an app or extension that's slowing this machine down

    On the topic of making a custom chrome box can you suggest a good forum I would like to make a beast of a Chromebox, currently I'm using a really old 27" iMac from 2012 and it has a  i7 and 32 gigs of memory so most of the time it Powers through any thing, but it is getting really old and I don't know how much time it has left. There's a forum post that made with no response for custom build

    https://neverware.zendesk.com/hc/en-us/community/posts/360051301654-Hardware-recommendations-for-a-new-custom-build

    0
    Comment actions Permalink
  • JCloud

    There's really not many high skilled around here , anyone with level of Alexander I only see once a month at most. That why your other post not got response. No one with that experience really hit forum often. Defo look elsewhere reddit maybe, don't really know myself.

    Also CR is mostly about Certified list, it works on tons of other machines too, but Neverware just can't cert them all.

    I understand about used hardware that's never fun. Though Chrome boxes probably in short supply because for a while non released. Quite a few new ones been released recently and upcoming. On Googles AUE list each of these suppliers -  Acer, Asus, CTL & HP has one with AUE 2028.

    Google also promised 50 new Chromebooks for 2021, would have thought few on them be boxes.

    https://www.androidpolice.com/2021/05/19/google-promises-50-new-chromebooks-in-2021/

    https://guide.neverware.com/supported-devices/#AppleiMac112

    https://guide.neverware.com/supported-devices/

    There are 15 thin Clients on the list, though yeah they not high spec probably.

    If I could have a Chromebox I would just buy the ctl one below or get one of those thin clients or other cert device and just get another every few years. Probably can get thin client new. The joy of Chrome OS, easy software setup.

    https://9to5google.com/2021/06/09/ctl-chromebook-cbx27-price-specs/

    Buying a lot of hardware and building is just risky especially if you only happy using one OS on it. I can just feel that going wrong.

    There are other Chrome OS build for PC etc buy I never tried any. Neverware is a lot more picky but that's because they are the only one I've come across at least who are doing it in a professional manner trying to do it commercially. That why I use because it's like Linux the only consumer desktop distro you can guarantee will be here in 5 years is Ubuntu (Debian etc too but no average user uses that for desktop). The rest easily come and go between devs moving on, retiring, arguments etc etc.

    0
    Comment actions Permalink
  • Alexander David Frick

    @JCloud Yes thats good reccomendations on the build list. And did u read my questions about how you got here, etc. If you don't wanna answer or too long it's totally fine I'm just curious cuz you're one of the more active forumers. And Ted Larson you may hate this but honestly Intel NUC's are one of the best. As JCloud said chromiumos is very finicky and Neverware has done a good job of enabling libsensors, broadcom and other wifi and lan drivers, and nouveau (FOSS nvidia driver: vanilla chromiumos refuses to boot on nvidia hardware and I tried and tried to integrate nouveau myself and IDFK how the hell Neverware managed to do it, tis elf magic lol.) I would stay away from ryzen mobos (example i had to do libsensors mods to make temps work in cog), weird/nonstandard LAN or wifi chips. Intel + Intel chipsets work well. VIA chips are flaky, my VIA usb 3.0 controller is OK but ive had issues with VIA chipsets and PCH. ASUS tends to use more "standard" chips for peripherals, so building a machine with say a haswell or skylake CPU and average ASUS board is good. Note that the nouveau driver version thats used in CR will NOT work (yet) with RTX 3000 series GPUs.

    0
    Comment actions Permalink
  • JCloud

    I got a few early Chromebooks but never really used them as not fast enough for me, tried to get people to use them because I could see the advantages but they like hmm "not Windows what that", "just a "browser" you say", "is that a good or bad thing" they say, hard sell, Microsoft really got people bad like Coca Cola.

    Bought cheap Win10 laptop, that failed two years in, as emergency OS put CR on not a cert model but luckily everything worked. I follow tech so I'd heard of CR years earlier but didn't have spare machines to install on. Used CR for three years on that, but in Jan got Lenovo Flex 5 i5 Chromebook, which just handles almost anything I chuck at it. i7, 16gb would be better though.

    If you click on a my username you can see my forum stats. I mainly started on forum to try and learn things from posters. People mostly just come on with install issues, Chrome usage issues or really high tech things beyond me, or with bugs or to just moan etc.

    I am looking at starting a new career, I have basic Tech and Finance skills at moment. So I'm trying to get deeper into tech but hard finding time or knowing where to start. Probably try to learn Python or Cyber Security.

    I've not learned a great deal new on Forum or by using CR / Chrome OS but it has made me passionate about Tech again compared to those bad Windows experience we all have. Windows can be a good OS, Microsoft just don't have a clue when it is, they get lucky sometimes.

    My brother has young kids so I think that is way to get my family using CR or Chromebooks, they open to new things.

    What about you lot?

     

    0
    Comment actions Permalink
  • Ted Larson

    I'm going to take a look at the Intel NUC's I will also take a look at the certified list try to find the newest of the IMac in 27", but it's all subject to availability. Myself I'm OS agnostic it is whatever works at the time I do have my preferences. And if Mac comes out with a 27" in their new cpu I'll be all over it. What I would love but I know I'm in Fantasyland is a device that would run chromium OS or Chrome OS on a 4K ultra-wide 144 Hertz monitor for daily web browsing and media consumption, "And maybe in the future cloud-based gaming"

    Alexander David Frick I will keep a lookout on your Github.

    Thank you again for all your help

     

    0
    Comment actions Permalink
  • JCloud

    More high end Chromebooks are needed between power user and the all app choices these days.

    I was trying Nvidia Geforce now the other day on My Chromebook bit of a nightmare because of keyboard, wasn't bad though for saying it fairly new.

    Looking to try Stadia sometime.

    0
    Comment actions Permalink
  • Alexander David Frick

    JCloud Stadia (from what I've heard, don't use) is not very expansive, but what it does have is robust, and of course material design which is in anything Google is noice. Do you know what material design is? (lol it seems you are a 9to5google fan as am I, and they're always talking about it there, especially android 12's new "personify yo shit" additions lol) Ted Larson I'm writing some of it today. Note, you will need fs_verity turned off, and will need to put my script (which I've decided to name "trimly.sh", into /usr/local/bin, run sudo chmod +x to make it executable, and then you should be able to do sudo bash trimly.sh and it will trim / and the rootfs partitions I talked about. It wont be on my github yet until I think it's finished and I try it on cloudready and vanilla chromium os proper. The only reason this is necessary is because most areas of the filesystem are mounted "nonexec", with the exception of /usr/local/bin which google implemented to speed development but is still "hidden" from unassuming regular chromebook users. To help, I might include a short three line readme explaining what to do for any future possible users of this script. (assuming it works as intended)

    0
    Comment actions Permalink
  • JCloud

    Yeah I get the Google 9-5 newsletter but sometime too much to read. I'm not  phone user so much, so skip a lot of the Android stuff, other than to help my parents out. I'll be interested in Phones when they can also be used as desktop OS as well. Motorola and Samsung have tried that, don't know what holding Google back.

    Git hub another thing that anoys me just can never figure out what file to use. I'll have to figure it out sometime, but when I hit something that sends me to github I'm usually in a mad rush and just want it to be easy.

    0
    Comment actions Permalink
  • Alexander David Frick

    JCloud Ted Larson It's finished! And I put a lil thank you to you both at the bottom of the scipt. The readme.md explains how to use, as well as the script itself when it runs. I added color too to make it look nice. I ALSO (idea came to me as I was writing) put in an option (choose 1 or 2 for yes/no) to run a defrag (unix command 'e4defrag -v') on an HDD, although one could also do it on an SSD which might actually make trim slightly more effective. Anyway it works on cloudready and chromium os, though you will need sudo permissions (I assume of no problemo unless your running non dev chrome os),

    If you need any help Ted Larson just holla. Hope it helps and lemme know if it speeds shit up.

    Repo is here >> https://github.com/Alex313031/TrImLy 

    Script is here >> https://github.com/Alex313031/TrImLy/blob/main/trimly.sh 

    Tis 44 lines (54 with spaced lines), not bad IMHO as far as length.

    0
    Comment actions Permalink
  • JCloud

    Good work, tell us how you get on Ted.

    0
    Comment actions Permalink
  • Alexander David Frick

    Lot to read but bear with me, it's worth it.▼

    JCloud Ted Larson In case you didn't see elsewhere where I tagged you, major update to reflect partition changes in TrImLy. The original script is in a new folder called 'cros_pre_90' for 32-bit users, or people who don't wanna upgrade. I have also updated documentation, comments, version, manifest AND (this is good for HDD's as alot of ya'll have) instead of just asking if you want to defrag and then trimming either way, it now asks for both, so one could defrag and not trim, or trim and not defrag. Lastly, updated colours, refactored constants, added more explanation before each question, and added more comments inside code, and last comment says ya'll are here on the forums : LEMME KNOW if you don't want that info out there, and try the new script if you've updated to v90 >>  https://github.com/Alex313031/TrImLy 

    And thanks to Ted Larson I've been gettin my ass up on some other stuff. And I've got good progress on reviving a favourite chrome app called Chrome Dev Editor : It was promoted as THE editor for devs right on chromium.org >> https://www.chromium.org/chromium-os/developing-apps-on-your-chromium-os-device  It was an EXCELLANT editor, rivaling TEXT https://chrome.google.com/webstore/detail/text/mmfbcljfglbokpmkimbfghdkjmjhdgbg?hl=en and Quantum https://chrome.google.com/webstore/detail/quantum/hmnlklahndgbhdoclhdnoafhafbhmnkm?hl=en It was discontinued, the github was archived, but with development still continuing privately till' 2019, where it was taken down from the chrome web store. The github archive ver. 0.17 won't even run on modern chromium due to permission issues, but I was able to get the last version as a .crx from CRX4Chrome.com https://www.crx4chrome.com/crx/1339/  I then extracted it, and got to work. This latest version 0.23.3550 at least runs, but had permission bugs, and I of course wanted to change the name and update the manifest to allow it to be repacked into a .crx for distribution (otherwise one would have to load it as unpacked in chrome://extensions, with it throwing some errors), so I made my own developer key for possible future upload to the chrome web store, and incremented ver. > 0.23.3550 to 0.23.3551. For fun, and promotion of open source shit, I have changed the logo, and updated every line that I could find that said chrome and changed it to chromium (excluding .dart modules that have to be named that for compatibility) - The end result is a fully functioning, "Chromium branded and named" app; a .crx file that throws no errors! It has git sync compatibility, code coloring and syntax correction, and a directory tree on the left. It could also be used as an everyday text editor. I updated the file handling .json so that now you could set it as the default for regular text files and the like in the CrOS file manager. Anyway, if you've made it this far into the paragraph, I will be uploading my modified source code as well as the .crx to a new repo. I would really like some beta testers so if you want, download the cros-editor.crx and go to chrome://extensions, enable the 'developer mode' toggle in upper right hand corner, and simply drag and drop the .crx file into the window, it should prompt for installation just like any chrome app. Give me feedback if you wish here or on Github, and tag others if you wish. >> https://github.com/Alex313031/Chromium-Dev-Editor/blob/main/README.md

    One more thing, if yall watch Hulu, I have the crx of (the only one that still works) hulu ad blocking app that was taken down from the web store. >> https://github.com/Alex313031/Hulu-Block-CRX 

    0
    Comment actions Permalink
  • Ted Larson

    Sorry for being AFK I've been doing stuff for the last few days.

    I'm currently at build 89.4.44 (Home Build) stable-channel 64-bit. I'm a real novice I can't even figure out how to get the terminal open, I believe I have to activate Linux and then install an the terminal app ??? I think I told you earlier I do not know command line. 

    0
    Comment actions Permalink
  • Bidwell Ely

    Let's try this:

    Settings just below Apps is Developers

    "Developers

    Linux development environment (Beta)
    Run Linux tools, editors, and IDEs on your Chrome device"
     
    You turn the feature on. Then see what happens.
    0
    Comment actions Permalink
  • Ted Larson

    I think I got it turned on

    0
    Comment actions Permalink
  • JCloud

    I don't think this is run through Linux beta, might be wrong though. Chrome OS has a terminal of it's own besides the Linux one. Wait for Alexander as the rest of us will just be shooting in the dark.

    Also Ted you are giving away your email with that screenshot, please edit or remove it.

    Yeah it's done through Chromes own terminal with you get to using ctr-alt-t.

    He's done nice readme file here

    https://github.com/Alex313031/TrImLy/blob/main/README.md

    0
    Comment actions Permalink
  • Alexander David Frick

    NONONO Bidwell Ely that is crostini (the developer linux shell, runs in a virtual machine), I am talking about using the regular built in terminal, called crosh. Since cloudready is essential already in "developer mode", all you have to do is type 'CTRL + ALT + T', and then 'shell' plus enter. Do not attempt to run my script in crostini. It will not mess up cloudready, but likely will fuck up your debian within there. Also aww thanks JCloud you called my readme nice *cries cuz noone ever's done that before* Ted Larson use above to open the terminal. Then follow instructions in readme which are only three commands, and they're highlighted.

    0
    Comment actions Permalink
  • Bidwell Ely

    Alexander David Frick thanks for pointing out the difference. I had "ass"umed that it was the same.

    0
    Comment actions Permalink
  • Ted Larson

    I'm still having difficulty all that happens when I hit Ctrl alt T is a new tab opens, and then I type shell and all it does is a web search :( I made sure I was in developer mode

    0
    Comment actions Permalink


ChromeOS Flex is replacing CloudReady, so this community is no longer accepting new comments.

Please visit the ChromeOS Flex Help Community to post any new questions or thoughts! You can still link back to this or other pages in this community in order to reference past conversations.

Please sign in to leave a comment.