Phone File Optimization


#1

Was hoping to float the idea of having an application on the phone that would act as a file optimizer/cleaner. Something to cleanly address excessive temp files etc so the phones do not get bogged down overtime. Does this exist already for PureOS? Might have to start learning D if I am interested in something like this I suspect.


#2

You could likely use a cron job and shell script that does this.


#3

Total noob here but if I remember correctly /tmp is cleared every time you boot on most distros, so even if creating a cron job would be a very good answer I wouldn’t even bother and just reboot my system when it’s getting a bit bloated.


#4

yes but maybe he doesn’t want to reboot or can’t for certain reasons. his concern sounds like a server problem rather than a laptop/desktop one.

@Kryptonius i think you can rest easy. this is gnu/linux not windows :stuck_out_tongue:


#5

Well I can absolutely understand that depending on the use of the device you may not be able to reboot anytime soon, but if I’m not mistaken we’re talking about the Librem 5 and the cold booting seems to be pretty fast so I don’t think it will be much of an hindrance. :wink:


#6

Good point! In fact I see this happen from time to time on my machines too.

Regularly having to reboot to empty the cache? Sounds more like a reason someone else could use to laugh at you about your phone.

But to be honest maybe that’s something we might fix in linux or the distro and not especially for the phone? The cron job would also suit me - but more as a temporary workaround.


#7

I don’t reboot my phone. It’s uptime is measured in months. Still a cron job would be adequate.


#8

There’s more to 100% reliable housekeeping than merely clearing /tmp but the upside is that whatever problems exist along those lines will typically take some time to emerge after initial release and hence can be addressed in the months following initial release.

I believe that the design goal for a mobile phone should be “never rebooted” (e.g. my current phone is only rebooted if I overlook recharging it when that is needed and it runs out of juice and dies - and the odd software bug that can only be resolved with a reboot). It may take some time to reach that target level of software maturity. I expect a few rough edges at initial release.


#9

that’s because there’s not a lot to load so far. the comparison that purism made seems to me like it’s just a child bragging about how fast he can run while “daddy” is loaded.

when there are as many things on the L5 as there are on the 'Droid devices let’s do that comparison again and see how it behaves.


#10

When I worked in automotive, there was a goal of having a 200 millisecond boot time. This is because there is a NHTSA requirement for the rear-view camera on a vehicle to be on in two seconds. One of the reasons Android is not suitable for this task is that the Android virtual machine alone takes four seconds to boot, even with expensive and highly proprietary engineering done by very large automotive companies. The fact that the Librem 5 does not need to boot a Java Virtual Machine means that boot times are much, much faster. We haven’t even started optimizing them yet so there is more room for fast boot.


#11

Then again, there isn’t much running.
The relevant boot time must certainly include bringing the modem and relevant telephony services up and query for the SIM cards PIN.

As the modem (apparently) will be attached via USB and USB setup isn’t exactly bazingly fast, this might take a while.


#12

Those services are lightning fast. On one system I have systemd-analyze blame states modem takes about .15 seconds to boot.

158ms ModemManager.service


#13

That doesn’t tell us much, since ModemManager does its device setup in the background after it has started.
The StateChanged signal for the MM_MODEM_STATE_REGISTERED would be more interesting.

Anyway, great to know that this works.
Would be greater to know what Modem is actually used, we still don’t have any official information :frowning:


#14

#15

I wonder if the full disk encryption will take boot time - as encryption is also part of the android boot up. In fact, I am not sure if it even will rob the general performance.

The i.MX8X seems to have aes, for the i.MX8M I didn’t find something

However for launch fde is not scheduled as mandatory at launch (from https://forums.puri.sm/t/full-disk-encryption-performance-in-librem-5)


#16

Thanks David, but which m.2 Card will it be?
As far as I can tell Gemalto doesn’t roll their own cards, only the chips, so I assume the card will come from a 3rd party vendor (and those tend to roll their own firmwares including their own AT commands)?