Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

MASTER THREAD: USB drives that work with Sentry and TeslaCam

This site may earn commission on affiliate links.
I can't imagine a single reason you'd ever want to secure-erase any flash media used to store your music unless I suppose you were disposing of the drive permanently.

Any other time it would provide not only no benefit at all, it would use up an entire drive worth of write cycles.

Likewise recommended defragging (let alone frequent defragging) of a flash drive (especially one only being read from in general) is totally nonsensical.... again 0 benefit, and you reduce the life of the device.

depending on file system type, defragment can improve performance of flash media as the metadata of the file system gets reduced by keeping track of fewer chunks that compose the files. while having your audio collection of MP3s play is not a scenario that most users will have a way to notice such a difference, here is an interesting read from years ago. back in those old days having to care for 150 SSDs of ~480GB was like being entrusted with a priceless piece of art :)

The real and complete story - Does Windows defragment your SSD? - Scott Hanselman

SSD and eMMC Forensics 2016
 
Last edited:
Can I suggest the best solution for the Tesla in terms of robust recording to get rid of use of useless micro sd card failures. Use an NVME SSD and a USB 3 caddy. This type of of drive is designed for many more read and writes in the PC world for years of use. Also it uses a lot less power in the realm of 80 mW's on average or 0.0028kw / 2800mW under load (the Tesla puts it under much less load). So far I have tested this in situations of pulling it live and stopping it properly and the format of the drive remains intact because of its buffering technology. Its bandwidth is superior. Warranty is solid. MTTF: Up to 1M hours

For e.g. ( chosen for low power consumption but you can get from many manufacturers )

Western Digital Green 240 GB Internal SSD M.2 SATA + M.2 to USB Enclosure, M2 SSD Adapter with Case.

Total Cost: £35
 
  • Disagree
Reactions: linux-works
100% disagree.

why?

I tried a usb/nvme adapter a few months ago (not for car, but for home. btw, those adapters are the farthest thing from automotive temperature and vibration rated). even for data center or home use, they are not ready for prime time, as they say. errors happen, HUGE amount of heat is wasted by the chipset and nvme buys you nothing for usb video i/o. not when you go thru a low speed usb interface.

sorry, but this is a very bad idea. the chipset is just not reliable (yet) and the heat - wow - such a battery drain.

now, direct nvme on a true pci bus -that rocks! I have only nvme systems at work and home for my build servers. they are typically at 3000MB/sec speed where normal ssd in sata is closer to 500MB/sec. internally, its not even close.

but for our car, its a total 100% waste and actually less reliable (due to the crappy usb/nvme bridge chips).
 
So far I have tested this in situations of pulling it live and stopping it properly and the format of the drive remains intact because of its buffering technology.

sorry, but I'm not able to make any sense from that statement.

ungraceful dismount (if that is what you are referring to) is not something a drive can defend against. its entirely an issue with the host (the car).

what happens in drive writes is this: the computer buffers i/o and linux is very aggressive in keeping its disk buffers in memory instead of on 'hard disk' (media). it flushes periodically (something like every 30 seconds, but its configurable) and will flush if a CLOSE operation is requested by the user, but if you just pull the media out, if you are lucky and the flush i/o op happened before you pulled it out, you're good; but if you needed that buffer flush and the data was still in the host's memory, you just LOST your last few disk writes.

the drive can't help or hurt here, he's just the slave.

tesla could handle things better; there are ways to be more synchronous in its i/o and tesla could fix things if they wanted to.

but there is nothing we, as users, can do to work around their buffering, their (sometimes) crashing the usb disk (no unmount) and probably other hung processes inside tesla's system.

the problem is not the speed of the media. the problem is all tesla.

tl;dr: adding more layers of stuff to go thru (nvme bridge) is not going to help.....
 
5 cards, 8gb each, true industrial rated (which is good enough for automotive applications):

https://www.amazon.com/Sandisk-Industrial-MicroSD-UHS-I-SDSDQAF3-008G/dp/B07BLQHVQD/

industrial is a cut higher than 'high endurance'. we want wide temperature range; pretty much the best we can get since 'auto grade' is a hard thing to find, when we are doing a DIY like this.

sd-card is quite reliable when its well engineered.

usb-sticks, otoh, are usually not designed or made to the same level of reliability.

that said, I will say that having extra metal to metal contacts (fingers) is never a good thing in a car environment, and having to use sd-card means that the card meets the metal fingers in the adapter, then the adapter meets the metal in the tesla usb plug. with sd-card, its one extra metal-to-metal path we go thru and honestly, I do hate that; but its still a more reliable total solution than the cheap consumer 'your data does not matter' style thumbdrives.

(btw, there are contact fluids that can bridge the gap, to some degree, on metal to metal contacts, but it will be messy to get it applied to the usb fingers and would likely be more trouble than its worth)
 
The one thing I'm curious about relating to NVME drives is.. I'm noticing with my ssd, every minute at the end of the videos the video freezes for a few seconds. I wonder if it's because of the write speed of the ssd. So I wonder if NVME drives have less seconds of frozen video every minute because of the faster write speeds.
 
sorry, but I'm not able to make any sense from that statement.

ungraceful dismount (if that is what you are referring to) is not something a drive can defend against. its entirely an issue with the host (the car).

what happens in drive writes is this: the computer buffers i/o and linux is very aggressive in keeping its disk buffers in memory instead of on 'hard disk' (media). it flushes periodically (something like every 30 seconds, but its configurable) and will flush if a CLOSE operation is requested by the user, but if you just pull the media out, if you are lucky and the flush i/o op happened before you pulled it out, you're good; but if you needed that buffer flush and the data was still in the host's memory, you just LOST your last few disk writes.

the drive can't help or hurt here, he's just the slave.

tesla could handle things better; there are ways to be more synchronous in its i/o and tesla could fix things if they wanted to.

but there is nothing we, as users, can do to work around their buffering, their (sometimes) crashing the usb disk (no unmount) and probably other hung processes inside tesla's system.

the problem is not the speed of the media. the problem is all tesla.

tl;dr: adding more layers of stuff to go thru (nvme bridge) is not going to help.....

Not to mention, the USB ports in the Model 3 are USB 2.0. So any speed of NVMe is totally wasted.
 
  • Like
Reactions: iamnid
burst speed and buffering can affect things; but there are so many variables along the write i/o chain. there are timeouts, as well, to keep things reliable and all that can fight against each other.

we don't have control over the write methods on the tesla. we don't have any control over the timing. we can't run hdparm or sysctl or anything (normally) and we can't even look at syslogs (again, normally) to find out WHAT is actually going on. we are blind and kept blind (for some good reasons, but still...)

flash media varies so much in how it works, internally. some have more 'cores' running so that they can multi buffer and be more concurrent (less wait states for the host). but even the same model drive from the same vendor could end up changing internal i/o 'engines' and when you buy it again 6 months later, it might not work as well as the previously released model. 'chip of the month club' is a common issue with consumer commodity electronics, so even if someone reports that 'drive xyz works well' it is no guarantee that it will work for everyone, for the life of the product sales.

the funny thing is: the demands on the flash are so trivial and this is such an easy solvable problem (even 10+ years ago!) that its kind of absurd that tesla has issues with any flash media over old school usb2 ports. they already use linux and that has a very robust filesystem, developed and refined over DECADES. it must be the multi tasking and sleep modes that tesla is having trouble with (my guess).

we can't do anything about the flash drive 'problem'. its entirely out of our hands (unless you use the old rasp pi 'emulate the usb flash drive' hack and yes, its kind of a hack for other reasons).
 
Wasted while it's plugged into the Tesla yes but.. There are other uses for a fast read speed. Like if you copy it to your desktop. And see my question about video freezing above.

sort of a valid point, in fact. just because tesla does not write to it very fast, does not means that you don't get a speed benefit from copying to YOUR host, as an upload. true that.

that is an argument for usb3 media even if used only on usb2 (our tesla).
 
The one thing I'm curious about relating to NVME drives is.. I'm noticing with my ssd, every minute at the end of the videos the video freezes for a few seconds. I wonder if it's because of the write speed of the ssd. So I wonder if NVME drives have less seconds of frozen video every minute because of the faster write speeds.

there is a lot going on between usb and nvme.

nvme is a whole pci bus! think about that.

the chip has, almost, too much to do. it does not do it very well (the current bridge chips). they overheat and they drop data. I recommend avoiding them. maybe the next gen or two will get that bridge feature working. it takes a few tries before such a complex (and new) protocol like nvme gets worked out down to the usb layer.

nvme native, on actual motherboards, ROCKS! LOVE THEM for servers.

just not ready for usb bridging, yet. give it time and the vendors will get their silicon, power budget, buffering and firmware right.
 
  • Informative
Reactions: turns2stone
slightly OT, but hopefully useful: for those that run their own x86 motherboards, they have been available with nvme m2 sockets (usually just one) for a few years now. be sure you get one on the TOP of the motherboard, not below! below creates too much heat and the ssd will throttle when it gets too hot. a pci-e riser is also a good option and does not hurt anything (other than extra metal contacts).

the nvme mem chips get super hot. the speed is incredible and so, yes, they run very hot. expect that.

and that's one really good reason to NOT run them in cars. just not needed or rated for car environment, yet.
 
slightly OT, but hopefully useful: for those that run their own x86 motherboards, they have been available with nvme m2 sockets (usually just one) for a few years now. be sure you get one on the TOP of the motherboard, not below! below creates too much heat and the ssd will throttle when it gets too hot. a pci-e riser is also a good option and does not hurt anything (other than extra metal contacts).

the nvme mem chips get super hot. the speed is incredible and so, yes, they run very hot. expect that.

and that's one really good reason to NOT run them in cars. just not needed or rated for car environment, yet.

I wonder though if the drive wont get hot when its getting written to through the slow usb2
 
here's a tip: mouser stocks the industrial sandisks, and you'll know you are not getting a fake.

not sure if this link will work: SDSDQAF3-016G-XI SanDisk | Mouser

if link does not work, go to mouser.com and search for SDSDQAF3-016G-XI (that's the 16gb version). you can buy up to 128gb but I prefer to buy more of the smaller ones and swap them in and out if needed (or just to keep some on hand).

if you can find the ones that go from -40C to 85C, that's the best you can do. others only (only, ha!) go down to -25C. the cost diff is not enough to care about.
 
I wonder though if the drive wont get hot when its getting written to through the slow usb2

well, it might be slow from the usb2 interface into the bridge chip, but after that, it buffers into internal chip RAM, then bursts out at full pci-e speed to the 'drive'. it can't write at slower than pci-e speed, but yes, it will be bursty.

heavy continuous writes will create more heat, but I still prefer to wait until usb->nvme is much lower power, much more reliable and I'm still not convinced that a pci-e metal finger contact is really car-worthy. and a socket that would be car-rated would cost more than you or I would want to pay, I can say that much for sure. consumer grade sockets of that nature will never be auto-rated, so its risky to even consider it.