04-25-2013, 02:49 AM | #1 |
Connoisseur
Posts: 56
Karma: 31830
Join Date: Oct 2012
Location: Australia
Device: Aura HD, after a train ate my Glo
|
HOWTO: make your kobo faster by modifying filesystem options
It is documented elsewhere on the internet that by using non-standard ext4 filesystem options, a linux machine -- such as our kobo -- can potentially run its filesystem faster.
So, what options does it run by default? Code:
[root@(none) /]# mount rootfs on / type rootfs (rw) /dev/root on / type ext4 (rw,noatime,nodiratime,barrier=1,data=ordered) So, I decided to try to change it and share how to. What you'll need is: - ftp and telnet/ssh access to the device. The guides on the internet aren't perfect, if you want I can make a better todo (where better means it was easier for me...). - a cross-compiled tune2fs with dependencies. I'm attaching those files which I scavenged from pre-compiled rmps openmamba repository. You can cross-compile them yourself, find them pre-compiled yourself (7zip opens rpms), or just get them from the zip I'll attach. Instructions: 1. FTP to your kobo and put the contents of my zip somewhere. Since those files won't be needed after you've finished all steps, I just dumped them to the root of kobo's filesystem. 2. telnet/ssh into your kobo (I used putty) and run the following commands: Code:
chmod +x ./tune2fs # make the file executable ./tune2fs -o journal_data_writeback /dev/mmcblk0p1 # change the journaling mode to what that blog post suggests Original is: Code:
mount -o remount,noatime,nodiratime /dev/mmcblk0p1 / Code:
mount -o remount,noatime,nodiratime,barrier=0,nobh /dev/mmcblk0p1 / So, what's the result? Code:
[root@(none) /]# mount rootfs on / type rootfs (rw) /dev/root on / type ext4 (rw,noatime,nodiratime,barrier=0,nobh,data=writeback) Is it any faster, I bet you'll ask? Well I can't tell... the book I'm reading definitely feels snappy flipping pages, but is it because of the book, because of the options, or just a placebo? I really don't have any serious tools to make a proper comparison. Hopefully that helps! Last edited by sysKin; 04-25-2013 at 07:21 AM. |
04-25-2013, 12:26 PM | #2 |
Addict
Posts: 200
Karma: 42238
Join Date: Oct 2012
Device: Kobo: Glo, Aura , Aura H2O, Aura ONE, Forma, Elipsa
|
an alternative way to activate telnet would be nice, for some weird reason i can't get the old one to work after updating to 2.5.1, although it worked fine yesterday.
Probably some mistake on my end and not firmware related. :P |
Advert | |
|
09-05-2016, 01:09 PM | #3 |
Guru
Posts: 894
Karma: 144987
Join Date: Jul 2013
Location: Netherlands
Device: Cracked HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
|
Only one response! It _is_ a shame. Sorry for necro-bumping, but more should be done about something so fundamental!!
I am looking into the file structure because of the 64GB microSD card I put in the internal SD-slot. After finding that 64GB of FAT32 kind of makes the device buggy, I deleted the mmcblk0p3, recreated it as a 3.4GB block and created a 60GB mmcblk0p4 partition. So what to do with the partition? Just make it ext2 or do the extra work and make it ext4? And how to mount it? Well at least thanks for the work done on that! |
09-05-2016, 01:42 PM | #4 |
Evangelist
Posts: 496
Karma: 356531
Join Date: Jul 2016
Location: 'burta, Canada
Device: Kobo Glo HD
|
I actually thought about doing this myself, but less for improving performance and more to prevent my books from being wiped out after every factory reset (I have a GloHD and thus, no external sd reader; reloading from scratch takes like 20 hours to sync up my entire sideloaded library), as I assume that the factory reset script is hard-coded to wipe out the third partition only.
I haven't had time to play around it myself, though, but I would assume that you'd need to change the mounting scripts to see the fourth partition. But I don't know if the OS is smart enough to automatically probe that partition for new books. If not, for devices without external SD, one thing I would try is figuring out what the mount point is for external SD cards and mount that fourth partition to that, assuming the OS is hard-coded to search that mount point. That wouldn't work for devices that have both internal and external SD readers, though. One day I will try this for myself... |
09-05-2016, 01:47 PM | #5 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
It's probably because „Is it any faster, I bet you'll ask? Well I can't tell..."
If you're interested in filesystem experiments I've posted a hack in another thread that allows you to use ext234 for mmcblk0p3. https://www.mobileread.com/forums/sho...10#post3003110 There should be nothing wrong with FAT32 though. Well, other than if you actually fill that much with books, the Kobo database will grow gigantic and that'll probably cause slowdowns that are not filesystem related in any way... |
Advert | |
|
09-06-2016, 03:19 AM | #6 | |||
Guru
Posts: 894
Karma: 144987
Join Date: Jul 2013
Location: Netherlands
Device: Cracked HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
|
Quote:
Quote:
Quote:
As for probing...I always thought that Kobo went ridiculously slow or even end in a loop when indexing 23GB of books?! That's one of the big reasons for using Koreader for me. Searching such a database was said to take forever. Is that not true anymore? |
|||
09-06-2016, 03:20 AM | #7 | |
Guru
Posts: 894
Karma: 144987
Join Date: Jul 2013
Location: Netherlands
Device: Cracked HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
|
Quote:
Thanks for the link! I was searching for your thread, but couldn't find it last evening. Ended up in this one Couldn't find a mkfs.ext4 binary without having to compile the package e2fsprogs on the kobo. How did you solve that? Last edited by Markismus; 09-06-2016 at 03:30 AM. |
|
09-06-2016, 03:37 AM | #8 |
Linux User
Posts: 2,279
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
|
There's an mkfs.ext4 on the recovery partition, it's used on factory resets... but the hack above expects you to format it yourself (while connected to PC).
|
09-06-2016, 05:33 AM | #9 |
Guru
Posts: 894
Karma: 144987
Join Date: Jul 2013
Location: Netherlands
Device: Cracked HiSenseA5ProCC, Cracked OnyxNotePro, Note5, Kobo Glo, Aura
|
Ah, I can grab that off the original 4GB microSD!
Last edited by Markismus; 09-06-2016 at 02:00 PM. |
09-06-2016, 09:49 AM | #10 | |
Evangelist
Posts: 496
Karma: 356531
Join Date: Jul 2016
Location: 'burta, Canada
Device: Kobo Glo HD
|
Quote:
Really, the bottleneck in that case is Calibre, especially when using Kepubs; the driver is single threaded so it takes about 10-15 hours to process each epub one-at-a-time and then a few hours to transfer it all (I've noticed the write speed is about 2-2.5 MB/second). If the Kobo Extended Driver were multi-threaded and could process epubs in parallel like Calibre does if you manually do a batch Kepub conversion using one of the other plug-ins, then that would speed things up considerably for those with multi-core machines. One thing I haven't tried yet is to see if pre-converting epubs to kepubs in advance speeds things up in the event of recovering from a factory reset; I don't know if the Kobo plugins are smart enough to use a pre-existing kepub instead of converting a new one from scratch each time when sending to a device. As for ext4 use, I tried it for a while last month using frostschultz's script and while it did speed certain file operations up, as my collection grew, there was some lag introduced compared to when everything was using fat32. Disabling journaling on the KOBOeReader partition using tune2fs helped a lot and the responsiveness returned to what it used to be (although rootfs and the recovery partion both use journaling by default and have always done so). However, you lose out on one of the major benefits of using ext4, so at that point, it becomes a comparison of the merits of a relatively new file system vs those of a relatively older file system. Suffice to say, when I had to factory reset my device again, I just stuck with fat32 since I use both Linux and Windows; my entire experiment was to see if journaling would help prevent the occasional database corruptions through normal usage I sometimes encountered with my very large device database (now 1GB and counting, although at the time it was around 600-700MB), but no, it really had no effect on that part of things and thus, I just make sure to run a disk check every time I connect my device to my computer. In theory though, ext4 should perform better on larger partitions overall compared to fat32. Does anyone know what script is called when the device probes for new books? It'd be nice to know what to change to make the OS aware of a fourth partition. Else, what is the mount point for the external SD? I only have a Glo HD so I don't know what it would be. Last edited by rtiangha; 09-06-2016 at 09:56 AM. |
|
09-06-2016, 09:57 AM | #11 | |
Grand Sorcerer
Posts: 24,908
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
And, the drivers will send kepubs to the device if the driver is configured properly. The driver has a list of supported formats. The list order is the preferred order for sending formats. Having kepub first will send that if one exists. |
|
09-06-2016, 10:06 AM | #12 |
Evangelist
Posts: 496
Karma: 356531
Join Date: Jul 2016
Location: 'burta, Canada
Device: Kobo Glo HD
|
*That* just made my day! Thanks. I guess I'll set my Calibre to batch-process all of my epubs in advance overnight tonight then; the extra used hard disk space will be worth it if it'll cut down on the processing time later on when transferring.
|
09-06-2016, 11:54 PM | #13 | |
Grand Sorcerer
Posts: 24,908
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Also, there is a difference between the converted kepubs and the kepubs generated by the extended driver. The conversion uses the full conversion pipeline. That means that other change can happen. The driver directly changes the code to add the spans without touching things like the toc or styles. There shouldn't be any difference when reading, but the contents will be different. |
|
09-07-2016, 12:17 AM | #14 | |
Evangelist
Posts: 496
Karma: 356531
Join Date: Jul 2016
Location: 'burta, Canada
Device: Kobo Glo HD
|
Quote:
Hmm, maybe I don't know how to use Calibre properly (and sorry for going slightly off topic!), but is there a way to call on the extended driver instead then to do the epub conversions in advance (ideally in parallel to take advantage of my multi-core machine) and save those kepubs alongside the regular epubs in Calibre so that it doesn't do those conversions one-at-a-time when sending to the device? Or conversely, have the extended driver save the kepub into its associated Calibre entry rather than deleting it after transfer? I know there's a setting to save them all to one directory, but then I'd have to click and drag them to their corresponding Calibre entries to store them then, wouldn't I? That'd take a while for anyone whose collections are in the high hundreds or thousands. Really, all I want is to have to save the processing step by doing that part ahead of time so I can just skip ahead to the transferring step whenever I have to recover from a factory reset. Last edited by rtiangha; 09-07-2016 at 12:31 AM. |
|
09-07-2016, 03:01 AM | #15 | ||||
Grand Sorcerer
Posts: 24,908
Karma: 47303748
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
For black and white covers, you can have the driver generate and send these. Or use my Kobo Utilities to send them as a separate step. Quote:
Quote:
Quote:
But, I do factory resets frequently to test something. When I do, I backup the user partition, do the factory reset, test whatever I need to, and then restore the backup files. And I'm back where I started. I also backup the database (see my utilities plugin). On the fairly rare occasions when this gets corrupted, I just restore the last good backup. This is usually less that 24 hours old, so I don't lose much. |
||||
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
HOWTO make a Kobo sleep cover from a regular cover for about $2 | rwhe | Kobo Reader | 35 | 10-19-2014 04:07 PM |
How to make the flipping page does faster? | physics@war | iRex | 3 | 06-17-2009 04:25 AM |
GmailFS - make your Gmail a mountable filesystem | Alexander Turcic | Lounge | 2 | 08-30-2004 03:07 AM |