cancel
Showing results for 
Search instead for 
Did you mean: 

Intel 335, TRIM not available, zeroing beneficial?

JPete11
New Contributor

Hi, I have an Intel 335 240GB SATA drive installed behind a PATA bridge (old Thinkpad X41). I'm running Linux 2.6.32 (and 2.6.34 is also an option that works with this hardware -- later kernels don't seem to be able to set up the framebuffer how I want it). It appears that TRIM is not available over the PATA bridge.

Assuming TRIM is not available, is it better to live without TRIM (and leave plenty of unused space on the drive), or attempt to emulate TRIM by zeroing unused blocks. Zeroing might be beneficial if the drive optimises storage of zero blocks. Otherwise it will just add more wear.

Does anyone know if zero block storage is optimised on this drive and will work as a TRIM substitute?

7 REPLIES 7

JPete11
New Contributor

Since the logical block number has to be mapped internally to get the physical block number, it seems an obvious optimisation to keep a special physical block number for an all-zero block. Since an SSD isn't really read-write (a write goes to a different physical block) then this is like de-duplication of all-zero blocks. Well -- if I was writing the firmware it seems like it would be a good cheap optimisation, so I wondered if it was done that way. Or maybe I don't know enough about the low-level workings of a SSD drive and if I did I would know that this is not feasible. Unfortunately we seem to have no firmware engineers on this forum to answer the question!

BTW, if the Sandforce controller does compression then my all-zero block would compress really well, and maybe only take up a few bytes on the drive. Which means that writing zeros would be almost as good as TRIM.

I think this question is unanswerable unless a firmware engineer comes along to tell us who's right. I'll hold off writing zeros for now, though! Thanks.

Jose_H_Intel1
Valued Contributor II

As far as I know TRIM is supported by ext4 file system since kernel version 2.6.33. It is important to note that if the kernel available in the Linux distribution is compiled without the TRIM support, it will be necessary to recompile the kernel and enable the support for TRIM.

If by any chance (as stated above) your SATA/RAID controller (PATA bridge) is not capable of providing the TRIM command we suggest a secure erase or low level format to optimize the drive again.

Thanks, I am aware of all that. On 2.6.34, attempts to use TRIM cause fatal errors and shut down the driver. I assume this is because of limitations of the PATA bridge. That is why I was looking for an alternative. I am not going to risk secure erase over this PATA bridge, so that would probably mean removing the drive from the machine, in which case I might as well plug it into a machine that does support direct SATA connections and TRIM and use fstrim to rejuvenate the drive.

My original question was about using zeroing as an alternative.

To resolve this thread, I think that the answer to my question about zeroing is:

Nobody here knows the answer (despite their best intentions)