Questions about Defragging or Antivirus? Look here first!

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
adfd1

Re: Questions about Defragging or Antivirus? Look here first

Post by adfd1 »

I wish I had the same luck with no Windoz viruses. My own fault though allowing someone else to use my Laptop. I set up a lot of Win 7 and XP machines for friends, loaded up AV and a good firewall, SAS, MWB, and they still managed to get infected. Bad practises online and windoz can get you into trouble. The good news is it kept me busy and put some $$ in my pocket. Linux so far so good. -AD
MacLindroid

Re: AW: Re: Questions about Defragging or Antivirus? Look he

Post by MacLindroid »

niowluka wrote:
/dev/urandom wrote:
powerhouse wrote: I'm running Linux for ~18 years now - never had a virus or malware on any Linux machine, some of which run 24/7.
Similar to my virus experience on Windows (18 years now). Get over it.
I've been using Linux for 10 years and never had a virus. I had been using Windows for about 5 years and also never had a virus. The difference is, I run no security software on Linux whatsoever, and on Windows I had 3 or 4 security apps running in the background, with regular disc scans and all that. And that still has not protected me against some nasties on a couple of occasions.
A few top security experts are of the opinion that a completely virus-free Windows installation does not exist. There simply is no security software that can identify all viruses and some only get discovered a decade or two after infection had taken place. Someone mentioned Norton, something I had banned from my shop seventeen years ago. Windows users should stick to http://www.emsisoft.com and http://www.bitdefender.com. The rest is a waste of time. Emsisoft's OnlineArmour firewall also is better than most. http://www.emsisoft.com/en/software/oa/
powerhouse
Level 6
Level 6
Posts: 1144
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: AW: Re: Questions about Defragging or Antivirus? Look he

Post by powerhouse »

/dev/urandom wrote:
powerhouse wrote: I'm running Linux for ~18 years now - never had a virus or malware on any Linux machine, some of which run 24/7.
Similar to my virus experience on Windows (18 years now). Get over it.
Get over what?

Now back to topic. Do you know what I did to keep my Linux PCs free of viruses? Nothing.

Care to tell us how you managed to keep Windows out of virus harm for 18 years?
Subjects of interest: Linux, vfio passthrough virtualization, photography
See my blog on virtualization, including tutorials: https://www.heiko-sieger.info/category/ ... alization/
MacLindroid

Re: AW: Re: Questions about Defragging or Antivirus? Look he

Post by MacLindroid »

powerhouse wrote:
/dev/urandom wrote:
powerhouse wrote:

Care to tell us how you managed to keep Windows out of virus harm for 18 years?

Not sure what he meant by saying this "And that still has not protected me against some nasties on a couple of occasions."
niowluka

Re: AW: Re: Questions about Defragging or Antivirus? Look he

Post by niowluka »

MacLindroid wrote: Not sure what he meant by saying this "And that still has not protected me against some nasties on a couple of occasions."
That's a technical term... I meant those programs that would install themselves and then start at boot and show in system tray, with no way of stopping or uninstalling them. Primarily they were a result of visiting 'gentleman's websites'...

Apologies I'm not up to scratch with terminology but that was 10 years ago and I haven't had to worry about it since...
MacLindroid

Re: AW: Re: Questions about Defragging or Antivirus? Look he

Post by MacLindroid »

niowluka wrote:
MacLindroid wrote: Not sure what he meant by saying this "And that still has not protected me against some nasties on a couple of occasions."
That's a technical term... I meant those programs that would install themselves and then start at boot and show in system tray, with no way of stopping or uninstalling them. Primarily they were a result of visiting 'gentleman's websites'...

Apologies I'm not up to scratch with terminology but that was 10 years ago and I haven't had to worry about it since...
Those are malware adn may contain spyware and viruses, they are trojans lurking inside other apps and then take some control over your computer. They may contain adware but most likely they run routines in the background, stealing you banking details, contacts, etc. It usually requires hacking into the Windows system registry to remove them. Some are relatively harmless but others are malignant and cause tremendous damage. For example, it could take business documents and send it to all your contacts, revealing your most intimate business or personal secrets to everyone out there. It then infects their machines as well and so your data gets strewn around the globe, Nasty. Example: http://computer.howstuffworks.com/worst ... ruses1.htm
MacLindroid

Re: AW: Re: Questions about Defragging or Antivirus? Look he

Post by MacLindroid »

niowluka wrote:
MacLindroid wrote: Not sure what he meant by saying this "And that still has not protected me against some nasties on a couple of occasions."
That's a technical term... I meant those programs that would install themselves and then start at boot and show in system tray, with no way of stopping or uninstalling them. Primarily they were a result of visiting 'gentleman's websites'...

Apologies I'm not up to scratch with terminology but that was 10 years ago and I haven't had to worry about it since...
Those are malware and may contain spyware and viruses, they are trojans lurking inside other apps and then take some control over your computer. They may contain adware but most likely they run routines in the background, stealing you banking details, contacts, etc. It usually requires hacking into the Windows system registry to remove them. Some are relatively harmless but others are malignant and cause tremendous damage. For example, it could take business documents and send it to all your contacts, revealing your most intimate business or personal secrets to everyone out there. It then infects their machines as well and so your data gets strewn around the globe, Nasty. Example: http://computer.howstuffworks.com/worst ... ruses1.htm

I steer clear of websites with questionable or explicit content as those are rather ungentlemanly.
MacLindroid

Re: Questions about Defragging or Antivirus? Look here first

Post by MacLindroid »

haiphonghponline wrote:hello. im newbiew here.
So what does defragging mean anyway? Why doesn't Linux need defragmenting? Please help me by answering these two questions. All your replies will be appreciated.
It helps if you try to first Google it, as it is a bit unfair to expect from others to write a lengthy piece to educate you. Your question also is rather surprising as almost everyone knows what it is. It has to do with file fragments getting strewn around a hard drive and to reorganize them, but you really should research it yourself a bit. It is something MS-DOS and MS-Windows have been doing for decades now. Go find Auslogics Defrag and see what comes up.
JerseyBiker

Re: Questions about Defragging or Antivirus? Look here first

Post by JerseyBiker »

This has probably already been mentioned but I'm too lazy to read through over 200 post. As far as defragging goes my understanding is that SSD's do not need to be defragged. So if you have a SSD as I do it's probably not an issue at all.
powerhouse
Level 6
Level 6
Posts: 1144
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: Questions about Defragging or Antivirus? Look here first

Post by powerhouse »

JerseyBiker wrote:This has probably already been mentioned but I'm too lazy to read through over 200 post. As far as defragging goes my understanding is that SSD's do not need to be defragged. So if you have a SSD as I do it's probably not an issue at all.
Yes, with SSDs you don't need defragging. And Linux also doesn't need it (usually).
Subjects of interest: Linux, vfio passthrough virtualization, photography
See my blog on virtualization, including tutorials: https://www.heiko-sieger.info/category/ ... alization/
niowluka

Re: Questions about Defragging or Antivirus? Look here first

Post by niowluka »

powerhouse wrote:
JerseyBiker wrote:This has probably already been mentioned but I'm too lazy to read through over 200 post. As far as defragging goes my understanding is that SSD's do not need to be defragged. So if you have a SSD as I do it's probably not an issue at all.
Yes, with SSDs you don't need defragging. And Linux also doesn't need it (usually).
Not only you don't need defragging an SSD, you shouldn't be defragging an SSD. Defragging generates a lot of disk writes which reduce the lifetime of SSD. And it has no benefit at all, regardless of what OS sees on the filesystem, only the SSD controller knows where the data is physically located on the disk. It's is a bit like posting a letter: you post it (i.e. save it) and someone receives it (i.e. it get's saved), but you (i.e. OS) have no idea how it actually got there.
killer de bug

Re: Questions about Defragging or Antivirus? Look here first

Post by killer de bug »

niowluka wrote: And it has no benefit at all, regardless of what OS sees on the filesystem, only the SSD controller knows where the data is physically located on the disk. It's is a bit like posting a letter: you post it (i.e. save it) and someone receives it (i.e. it get's saved), but you (i.e. OS) have no idea how it actually got there.
This is not the reason why defragmenting is useless. In the case of a mechanical HD, a spinning disk contains informations and it takes time to move the reading head around the disk. To maximize the speed it's important to have files stored in continuous clusters.

In the case of an SSD drive, cells are made of transistors. No moving part here. Reading a cell take the same time if the cell is near the edge or near the center of the HD. All cells can be read at the same speed. Thus it doesn't make sense to store all the files in continuous clusters. This will not increase the speed.
niowluka

Re: Questions about Defragging or Antivirus? Look here first

Post by niowluka »

killer de bug wrote:
niowluka wrote: And it has no benefit at all, regardless of what OS sees on the filesystem, only the SSD controller knows where the data is physically located on the disk. It's is a bit like posting a letter: you post it (i.e. save it) and someone receives it (i.e. it get's saved), but you (i.e. OS) have no idea how it actually got there.
This is not the reason why defragmenting is useless. In the case of a mechanical HD, a spinning disk contains informations and it takes time to move the reading head around the disk. To maximize the speed it's important to have files stored in continuous clusters.

In the case of an SSD drive, cells are made of transistors. No moving part here. Reading a cell take the same time if the cell is near the edge or near the center of the HD. All cells can be read at the same speed. Thus it doesn't make sense to store all the files in continuous clusters. This will not increase the speed.
I didn't say it's the only reason it's useless :mrgreen:

Although I agree that reading a single cell takes the same amount of time regardless of where it is located on the SSD, a very heavily fragmented filesystem will affect the total I/O time even for SSD. Retrieving 100 parts of a file will take longer than just 1.

I understand that contradicts a little what I said earlier about defragmentation having no benefits at all, but with Linux filesystems suffering from little fragmentation and the effect on SSD being much smaller than on HDD, the benefits are realistically none... :mrgreen:
killer de bug

Re: Questions about Defragging or Antivirus? Look here first

Post by killer de bug »

niowluka wrote: Although I agree that reading a single cell takes the same amount of time regardless of where it is located on the SSD, a very heavily fragmented filesystem will affect the total I/O time even for SSD. Retrieving 100 parts of a file will take longer than just 1.
This is wrong.
A file saved on a disk is divided in part as a function of its size and of the cluster size. This has nothing to do with a disk being fragmented or not. :wink:
niowluka

Re: Questions about Defragging or Antivirus? Look here first

Post by niowluka »

killer de bug wrote:
niowluka wrote: Although I agree that reading a single cell takes the same amount of time regardless of where it is located on the SSD, a very heavily fragmented filesystem will affect the total I/O time even for SSD. Retrieving 100 parts of a file will take longer than just 1.
This is wrong.
A file saved on a disk is divided in part as a function of its size and of the cluster size. This has nothing to do with a disk being fragmented or not. :wink:
I meant fragmented. Non-contiguous parts, i.e. scattered around the file system.
killer de bug

Re: Questions about Defragging or Antivirus? Look here first

Post by killer de bug »

niowluka wrote: I meant fragmented. Non-contiguous parts, i.e. scattered around the file system.
If you have an SSD drive, then reading 100 continuous parts or 100 scattered parts takes the same time.
niowluka

Re: Questions about Defragging or Antivirus? Look here first

Post by niowluka »

killer de bug wrote:If you have an SSD drive, then reading 100 continuous parts or 100 scattered parts takes the same time.
File in 1 contiguous fragment will require 1 request to SSD for retrieval. File in 100 non-contiguous fragments will require 100 requests to SSD to retrieve each frament.

:wink:
killer de bug

Re: Questions about Defragging or Antivirus? Look here first

Post by killer de bug »

You obviously don't understand how file are stored on a HD.

If you're file is too big to be stored in one cluster then you need to divide it in several clusters. Cluster size is fix. That's a constant of HD and filesystem.
The number of clusters used doesn't vary if your HD is almost full, if it's almost empty or if the disk is heavily fragmented.

So if your file take 100 clusters it takes 100 read operations. Even if you have 100 continuous clusters. Each cluster has to be access.
And as I said earlier, since you don't have a mechanical head moving around the disk, this operation is really fast for an SSD drive. Even an heavily fragmented one.

Intelligent System Maintenance
SSDs emulate HDDs such that the operating system thinks it is talking to a hard drive. However the physical data mapping is quite different. In fact the SSD intelligently manages the physical location of data on the drive in the background via wear leveling algorithms that maximize the life of the SSD. The extremely fast access times of SSDs permit the SSD to move the data around as needed for wear leveling without impacting the performance. The net result is that defragmenting is not needed and defragmenting will not improve the performance. In fact, defragmentation should be turned off.
http://www8.hp.com/h20195/v2/GetHTML.as ... =c04201478
Last edited by killer de bug on Sat Sep 20, 2014 11:41 am, edited 1 time in total.
eanfrid

Re: Questions about Defragging or Antivirus? Look here first

Post by eanfrid »

SSD firmware does complicated stuff with TRIM, garbage collecting, wear leveling and virtual addressing. There is no physical space, hence no contiguous allocation on a SSD. Consider this is an equivalent to 100% fragmentation by-design if you want :) So unless the firmware is buggy, outdated or badly written, disk or file "fragmentation" on a SSD is a non-existent concept. The only slowdowns you can meet occur when you manipulate (move/delete) big chunks of data, triggering and colliding with the wear-levelling mecanisms.
niowluka

Re: Questions about Defragging or Antivirus? Look here first

Post by niowluka »

killer de bug wrote:You obviously don't understand how file are stored on a HD.

If you're file is too big to be stored in one cluster then you need to divide it in several clusters. Cluster size is fix. That's a constant of HD and filesystem.
The number of clusters used doesn't vary if your HD is almost full, if it's almost empty or if the disk is heavily fragmented.

So if your file take 100 clusters it takes 100 read operations. Even if you have 100 continuous clusters. Each cluster has to be access.
And as I said earlier, since you don't have a mechanical head moving around the disk, this operation is really fast for an SSD drive. Even an heavily fragmented one.

Intelligent System Maintenance
SSDs emulate HDDs such that the operating system thinks it is talking to a hard drive. However the physical data mapping is quite different. In fact the SSD intelligently manages the physical location of data on the drive in the background via wear leveling algorithms that maximize the life of the SSD. The extremely fast access times of SSDs permit the SSD to move the data around as needed for wear leveling without impacting the performance. The net result is that defragmenting is not needed and defragmenting will not improve the performance. In fact, defragmentation should be turned off.
http://www8.hp.com/h20195/v2/GetHTML.as ... =c04201478
This is what I'm talking about. You are assuming that OS request to retrieve a fragment from a filesystem is synonymous with SSD's controller request to read from a cell. That's not correct.

There is filesystem overhead, where file fragment(s) have to be located in the address table (of what OS thinks is an HDD) and subsequent requests sent to SSD controller to retrieve them. If OS sees 1 fragment at 1 address it will send 1 request, if the OS sees 100 fragments at 100 addresses it will send 100 requests. The overhead for 100 requests is not the same as for 1 request, despite the fact that the physical retrieval of data by the SSD controller will take the same time in both cases.
Locked

Return to “Beginner Questions”