LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-18-2021, 12:14 PM   #16
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625

Why is it megathread? Besides I never update - do fresh install. Which allows me fresh beginning without garbage collected through years.
 
1 members found this post helpful.
Old 02-18-2021, 12:28 PM   #17
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Quote:
Besides I never update - do fresh install.
The original post contains the text, "This thread is not for those who choose to perform a fresh install."
 
Old 02-18-2021, 01:36 PM   #18
domen80
LQ Newbie
 
Registered: Sep 2009
Posts: 7

Rep: Reputation: 0
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 ?
 
Old 02-18-2021, 02:21 PM   #19
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,867

Rep: Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528
Quote:
Originally Posted by domen80 View Post
( 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.
 
Old 02-18-2021, 02:54 PM   #20
domen80
LQ Newbie
 
Registered: Sep 2009
Posts: 7

Rep: Reputation: 0
Quote:
Originally Posted by Petri Kaukasoina View Post
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.
 
Old 02-18-2021, 02:59 PM   #21
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,867

Rep: Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528Reputation: 1528
You should have an executable /sbin/ldconfig. Look:
Code:
if [ ! -x /sbin/ldconfig ]; then
...
( cd lib64 ; rm -rf ld-linux-x86-64.so.2 )
...
fi
Yes, ln -sf would be enough if you knew for sure that the previous ld-linux-x86-64.so.2 were a file or a symlink (not a directory).

Last edited by Petri Kaukasoina; 02-18-2021 at 03:01 PM.
 
Old 02-18-2021, 07:00 PM   #22
gus3
Member
 
Registered: Jun 2014
Distribution: Slackware
Posts: 490

Rep: Reputation: Disabled
re: fstrim during/after install

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.
 
2 members found this post helpful.
Old 02-19-2021, 09:57 AM   #23
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 497

Rep: Reputation: 119Reputation: 119
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.
 
Old 02-19-2021, 10:54 AM   #24
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Your information doesn't seem to be correct. This is direct from Crucial's site explaining what trim is for (bold is my emphasis):

Quote:
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 multiple sites say 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...
 
Old 02-19-2021, 02:31 PM   #25
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 497

Rep: Reputation: 119Reputation: 119
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.
 
Old 02-19-2021, 03:35 PM   #26
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by Martinus2u View Post
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.
 
Old 02-19-2021, 10:45 PM   #27
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Quote:
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.
 
Old 02-20-2021, 03:41 AM   #28
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 497

Rep: Reputation: 119Reputation: 119
Quote:
Originally Posted by bassmadrigal View Post
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.

Over and out.
 
Old 02-20-2021, 03:51 PM   #29
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by Martinus2u View Post
I agree with all that.



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.
 
Old 02-20-2021, 04:08 PM   #30
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
OP here. Perhaps the SSD trim discussion is off topic?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
The Ultimate "When Will The Next Slackware Release Arrive" MegaThread slackamp Slackware 1429 10-03-2006 05:47 AM
Ubuntu - ALL FINE NOW! - Megathread FreeDoughnut Ubuntu 41 07-24-2006 08:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration