Jump to content

i am not too sure about whether its safe to defrag or not.

Waht does it do?

will i lose my data?

 Main Desktop

Spoiler

CPU: Intel Core i7-14700KF

CPU Cooler: Arctic Liquid Freezer III A-RGB

MB: ASUS ROG STRIX Z790-F Gaming Wifi II

RAM: 32GB(2x16GB) Team T-FORCE Delta RGB 6000MHz DDR5

GPU: ASUS ROG STRIX RTX 4070ti 12GB

STORAGE: 2.048TB Kingston KC3000, 2TB Crucial T500, 250GB Samsung 850 Evo, 1TB Samsung 970 Evo Plus, 240GB WD Green M.2 SATA SSD

CASE: Montech King 95 Pro

PSU: Be Quiet! Straight Power 12 1000W

OS: Windows 10 Home

Monitor: Samsung Oddessy G6 27" 1440p, Viewsonic VX2455 144Hz

Mouse: Logitech G502 Lightspeed Wireless Mouse

Keyboard: ASUS Flare II Animate

Headphones: HyperX Cloud Alpha S Black

Microphone: HyperX Quadcast S

https://au.pcpartpicker.com/user/johnno12/saved/4HDc4D

 
 
 
 
1

 

Laptop:

Spoiler

Dell Inspiron 15-5000

CPU: i5-8250U Quadcore with hypertheading

GPU: AMD Radeon 540 4GB Hybrid Graphics

Storage: Micron 1100 SATA 256GB SSD

OS: Windows 10 Home

1

 

Link to comment
https://linustechtips.com/topic/648610-defraging-please-explain/
Share on other sites

Link to post
Share on other sites

it doesn't delete anything it just reorganizes to read the data more efficiently.

Case - NZXT H6 Flow : Mobo - ASRock X670E PG Lightning : PSU - Deepcool PX1000G : CPU - AMD Ryzen 9 7900X3D w/Arctic Freezer III 360  : Memory - G.Skill Ripjaws S5 32gb 6000mhz CL30 : GPU - MSI Expert 4080 Super : Storage - Verbatim Vi7000G 4tb NVME SSD  : Displays - Gigabyte 32" M32QC Curved 165hz & 27" M27Q Pro 165hz 1440p

Link to comment
https://linustechtips.com/topic/648610-defraging-please-explain/#findComment-8342292
Share on other sites

Link to post
Share on other sites

 

CPU: Intel i7 5820K @ 4.20 GHz | MotherboardMSI X99S SLI PLUS | RAM: Corsair LPX 16GB DDR4 @ 2666MHz | GPU: Sapphire R9 Fury (x2 CrossFire)
Storage: Samsung 950Pro 512GB // OCZ Vector150 240GB // Seagate 1TB | PSU: Seasonic 1050 Snow Silent | Case: NZXT H440 | Cooling: Nepton 240M
FireStrike // Extreme // Ultra // 8K // 16K

 

Link to comment
https://linustechtips.com/topic/648610-defraging-please-explain/#findComment-8342297
Share on other sites

Link to post
Share on other sites

It's safe (and considered routine maintenance) if you have a HDD.  If you have an SSD, do not do it - it will wear it out and give you no benefit whatsoever.

Solve your own audio issues  |  First Steps with RPi 3  |  Humidity & Condensation  |  Sleep & Hibernation  |  Overclocking RAM  |  Making Backups  |  Displays  |  4K / 8K / 16K / etc.  |  Do I need 80+ Platinum?

If you can read this you're using the wrong theme.  You can change it at the bottom.

Link to comment
https://linustechtips.com/topic/648610-defraging-please-explain/#findComment-8342302
Share on other sites

Link to post
Share on other sites

When a file is created on the disk, the operating system tries to find a place on the drive with as much continuous space as possible and that's where the file is created. As data is written to the file, if some other file is in the way of the data being written, the operating system just makes a note there that says something like "if you want to continue reading data from this file, jump to this other place on the hard drive and continue reading from there" and the operating system finds another empty space on the drive as big as possible and continues writing data of that file there.  So a file is not necessarily one continuous block of bytes on the hard drive, it could be spread all over the drive in lots of small chunks.

 

An application that defragments the drive simply takes all the files from the computers, categorizes them in several degrees of importance and tries to put the most important files at the beginning of the hard drive, because it takes the smallest amount of time to read files from the beginning of a classic hard drive, and the read speed is the fastest there.

At the same time, if a file is split on the hard drive in lots of small chunks, the application is smart enough to join all those small blocks into one big block when the files are rearranged on the hard drive.

 

With SSD drives, all this is irrelevant, because no matter where data is on a SSD, the speed is the same and it takes the same amount of time to read data from anywhere on the SSD. In fact, in order to keep the flash memory chips at the same degree of  "wear and tear" (yes, memory chips have a finite lifetime, a limited number of bytes written to each memory chip), the controller chip inside SSD drives doesn't really write the data exactly where the operating system says so, but it actually spreads the data all over the memory chips trying to keep the number of writes in each memory as equal to the other chips as possible. 

 

So if you were to defragment a SSD drive, when the application says "hey SSD, I want to move this file to the beginning of the drive" the SSD will say "ok application, the file is created at the beginning of the drive" but in reality it will just pick a random memory chip and write to that random memory chip. So basically, you're wasting the SSD with a pointless operation.

 

Link to comment
https://linustechtips.com/topic/648610-defraging-please-explain/#findComment-8342361
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×