SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a question.
libc update
why there is command
( cd lib64 ; rm -rf ld-linux-x86-64.so.2 )
( cd lib64 ; ln -sf ld-2.33.so ld-linux-x86-64.so.2 )
If you delete ld-linux-x86-64.so.2, all commands stop working, since there is missing library ?
Should it be without rm command and just ln ?
( cd lib64 ; rm -rf ld-linux-x86-64.so.2 )
( cd lib64 ; ln -sf ld-2.33.so ld-linux-x86-64.so.2 )
It's a block of dead code as explained above it. But you could give those commands when you run them from the install disk. That link lib64/ld-linux-x86-64.so.2 is not under root then but in /mnt.
(I think the rm command is there to protect against a directory called ld-linux-x86-64.so.2)
Last edited by Petri Kaukasoina; 02-18-2021 at 02:31 PM.
It's a block of dead code as explained above it. But you could give those commands when you run them from the install disk. That link lib64/ld-linux-x86-64.so.2 is not under root then but in /mnt.
(I think the rm command is there to protect against a directory called ld-linux-x86-64.so.2)
Well i am thinking when you do update on system that is running.
Isn't ln -f enough, man page says it will remove existing destination files ?
Currently i have problem when i am installing on virtual machine, and each time there is libc update, it removes this file and blocks.
The only point I'd add to bassmadrigal's excellent comments about fstrim: It probably wouldn't hurt to defragment the filesystem first, via "e4defrag" or "xfs_fsr", to consolidate the files' extents. SSD derives the same benefit as spinning platters, by merging multiple-sector read operations into a single bus transfer. Doing that before running fstrim will help to make a "cleaner" volume on the SSD, plus yielding faster write response for a longer time (by providing more "clean" blocks available for immediate write).
For myself, I also omit the journal on the root partition (which contains /usr per PV's policy). On a "normal" Slackware install, the root and /usr stuff is normally more read than written. The typical candidates for journal entries are mtime/atime updates, and the "lazytime" mount option reduces that dramatically. As I understand it, including a discrete journal within a volume on the SSD potentially doubles the write-outs for any file writes, once to the journal, and once to the FS structure proper (excepting log-structured FS's, like Btrfs and F2FS).
Bear in mind, these thoughts are 6 or 7 years old, so they may approach a "cargo cult" mentality.
just a quick correction on the nature of trim: sectors do not need to be "reset before re-written". The file system will happily rewrite the exact same sectors of formerly deleted files. What fstrim, or discard, does: it informs the SSD controller that those sectors can be returned to the pool of unused blocks, so that they can be re-integrated in the wear-levelling algorithm, ensuring that there is no concentration of write-operations on a small set of physical memory cells.
The Trim command tells the SSD that specific areas contain data that is no longer in use. From the user's perspective, this data has been deleted from a document. Because of the way solid state drives read and write information, the data is not deleted from the drive at the user's command. Instead, the area of the SSD that contains the data is marked as no longer used. The Trim command tells the drive that the data can be removed. The next time the computer is idle, Active Garbage Collection will delete the data.
If the Trim command did not exist (as was the case before Windows® 7), then the solid state drive would not know that certain sectors in the drive contained invalid information until the computer told the drive to write new information to that location. The drive would need to erase the existing information, then write the new information. This takes slightly more time to do than just writing the new information, so using Trim and Active Garbage Collection helps your SSD perform write commands more quickly.
I did kinda combine trim and garbage collection to simplify it (since the post was long already), but multiplesitessay that used blocks need to be erased before they can be written again.
Quote:
A block of data stored on a flash memory chip must be electrically erased before new data can be written, or programmed, to the solid-state drive (SSD).
Quote:
A magnetic hard disk can always write wherever it likes and update data "in-place." Flash storage can't. It can (essentially) only write to empty, freshly erased pages.
Quote:
Because flash memory must be erased before it can be rewritten...
well, it is correct that SSD controllers will initialize ("delete") sectors in the unused block pool, in order to save time when they are allocated and written to in the future. In that respect we are talking about the same thing. What I tried to make clear is that from the external API (the point of view of the filesystem), you can re-write any sector any time, because the SSD controller will always map it to a fresh sector from the pool of unused blocks (releasing the previously mapped sector). The trim / discard function serves to return sectors to the pool no longer in use by the file system.
well, it is correct that SSD controllers will initialize ("delete") sectors in the unused block pool, in order to save time when they are allocated and written to in the future. In that respect we are talking about the same thing. What I tried to make clear is that from the external API (the point of view of the filesystem), you can re-write any sector any time, because the SSD controller will always map it to a fresh sector from the pool of unused blocks (releasing the previously mapped sector). The trim / discard function serves to return sectors to the pool no longer in use by the file system.
Correct, but if the filesystem doesn't have any available unused/erased blocks, when the filesystem goes to write them, the flash controller needs to erase the block before it can be written to.
This is all done without knowledge from OS and is done internally from the controller of the SSD/NVMe device.
So, the sectors the filesystem sees don't need anything beyond simply deleting the file (because the filesystem doesn't know about the inner workings of the flash memory), but the blocks on the device do need to be "reset" or erased once a file is deleted before being able to be rewritten, which is all handled by the flash controller with the OS being left in the dark. If there are available erased sectors/blocks, then the controller will typically use those with little to no penalty before spending the extra time erasing other blocks so they can be written to. Trimming the device pretty much just tells the device to reset/erase all those blocks that had files deleted so they are ready to be written to whenever they're needed.
I believe it should be noted that I didn't use "sectors" anywhere in my post. I was simply talking about the data on the drive itself, not what the filesystem sees (since the filesystem doesn't deal with the actual writing of data to the device), so I don't understand what information on trim you were trying to correct.
I think in settings Manager / Fonts / Rendering
you have to disable and enable anti-aliasing once to have proper fonts.
Digging a bit deeper, the fonts still look funky but part of the problem is the TraditionalOK theme I use, which comes with the MATE packages, which I haven't downloaded or tested yet in Current.
My really big sore spot with Xfce is tooltips. I feel totally helpless that I can't disable the sumbitches. Annoying as Hell.
Correct, but if the filesystem doesn't have any available unused/erased blocks, when the filesystem goes to write them, the flash controller needs to erase the block before it can be written to.
This is all done without knowledge from OS and is done internally from the controller of the SSD/NVMe device.
So, the sectors the filesystem sees don't need anything beyond simply deleting the file (because the filesystem doesn't know about the inner workings of the flash memory), but the blocks on the device do need to be "reset" or erased once a file is deleted before being able to be rewritten, which is all handled by the flash controller with the OS being left in the dark. If there are available erased sectors/blocks, then the controller will typically use those with little to no penalty before spending the extra time erasing other blocks so they can be written to.
I agree with all that.
Quote:
Trimming the device pretty much just tells the device to reset/erase all those blocks that had files deleted so they are ready to be written to whenever they're needed.
This is the part I tried to elaborate on. Whilst the initialization of physical memory blocks is indeed part of what is going on, the function is trimming is more fundamental. The SSD has more physical memory blocks than sectors are offered to the SATA API. They are constantly re-mapped (and potentially initialized) for wear-levelling purposes. To that end the SSD controller keeps a free list redundantly from the consumer. What is being trimmed (hence the name) - ie. kept in sync - is those redundant lists.
From the point of view of software architecture, this redundancy is an example of a -> leaky abstraction.
Not trimming (i.e. not telling the SSD controller that certain sectors can be returned to the pool) is less detrimental than people think, as long as the file system sticks more or less to the same sectors as it grows and shrinks. The worst case would be a random access pattern, because the pool of available physical memory blocks from the point of view of the SSD controller will shrink to the minimum, but never be zero, as the device has been fitted with more memory than official sectors by the manufacturer.
In the early days people sometimes gave the advice to leave a certain space empty in the partition table for the lifetime of the SSD, in order to increase the memory pool.
This is the part I tried to elaborate on. Whilst the initialization of physical memory blocks is indeed part of what is going on, the function is trimming is more fundamental. The SSD has more physical memory blocks than sectors are offered to the SATA API. They are constantly re-mapped (and potentially initialized) for wear-levelling purposes. To that end the SSD controller keeps a free list redundantly from the consumer. What is being trimmed (hence the name) - ie. kept in sync - is those redundant lists.
From the point of view of software architecture, this redundancy is an example of a -> leaky abstraction.
Not trimming (i.e. not telling the SSD controller that certain sectors can be returned to the pool) is less detrimental than people think, as long as the file system sticks more or less to the same sectors as it grows and shrinks. The worst case would be a random access pattern, because the pool of available physical memory blocks from the point of view of the SSD controller will shrink to the minimum, but never be zero, as the device has been fitted with more memory than official sectors by the manufacturer.
In the early days people sometimes gave the advice to leave a certain space empty in the partition table for the lifetime of the SSD, in order to increase the memory pool.
Over and out.
Trimming is to make sure that blocks marked as deleted are available for the flash controller to write as needed. If trimming isn't accomplished, if the drive needs to write into a space that hasn't been erased, it needs to erase it before it can write to it.
Yes, there is provisioned space that isn't available to the user to help enhance wear leveling and provide backup blocks as the individual blocks wear out and can no longer write new data, but that was far beyond the point of the post I was writing to answer the question about whether running fstrim did anything.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.