1. You may have noticed things look a little different around here - we've switched to a new platform (XenForo) and have some new forum styles and features. This how-to guide will help you find your way around. If you find anything that looks strange, post it in this thread.

Advantages/Disadvantages of Compressing Files

Discussion in 'Windows OS and Software' started by foosa123, Jul 24, 2008.

Thread Status:
Not open for further replies.
  1. foosa123

    foosa123 adsfjldsajflkajsdfa

    Joined:
    Sep 1, 2006
    Messages:
    1,784
    Likes Received:
    0
    Trophy Points:
    55
    Location:
    Vancouver, Canada
    So I decided to run Disk Cleanup today (well just now actually :D ) and I saw the check box to "Compress Old Files" (note: I am not talking about compressing the WHOLE disk, just the old files) and it occurred to me that I have never really thought about the advantages and/or disadvantages of compressing files.

    So what are some advantages and disadvantages of compressing these "old files" and just for the heck of it, the whole disk? I know one obvious advantage is that you get more disk space, but at what cost?
     
  2. wobble987

    wobble987 Notebook Virtuoso

    Joined:
    May 23, 2006
    Messages:
    2,869
    Likes Received:
    0
    Trophy Points:
    55
    Location:
    Australia
    the cost is: slower access of compressed data. and it consumes more resources when accesing the compressed data.
     
  3. protomenace

    protomenace Notebook Consultant

    Joined:
    Jun 13, 2008
    Messages:
    128
    Likes Received:
    0
    Trophy Points:
    30
    I would strongly discourage compressing the entire disk. Your overall performance is going to drop probably 20% or more, what with the cpu constantly compressing and decompressing every file. However, compressing the old files might not be a bad idea, especially if you are tight on disk space and don't know if you will ever even access those files again.
     
  4. qhn

    qhn Notebook User

    Joined:
    May 26, 2006
    Messages:
    5,955
    Likes Received:
    0
    Trophy Points:
    205
    . got enough disk space? leave it alone
    . you never know when the so called "old" files will be needed again
    . the "advantage" of having a few extra gigo is not really advantageous
    . backing up "old" files to external media like cd, dvd or even external hard drive would be my approach

    cheers ...
     
  5. S.SubZero

    S.SubZero Notebook Deity

    Joined:
    Apr 6, 2008
    Messages:
    1,310
    Likes Received:
    115
    Trophy Points:
    81
    The OS treats the compressed file as if it were uncompressed, so applications can still access it normally. This differs from say, zipping a file, where the application would need to know how to handle a ZIP file or else you need to uncompress it to use it.

    The mechanism Windows uses for compression isn't particularly efficient by today's standards, so for most moderately compressed files the user is not likely to notice the performance impact since it will be rather small. The NTFS compression stuff hasn't changed much since it debuted and was designed to be minimal-impacting on computers from 10 years ago. So your modern dual core box is not going to really be taxed much.

    http://support.microsoft.com/kb/307987

    Compression is nice for storing files on archive drives or external drives where you may need to access the file but don't want the extra step of unzipping it.
     
  6. Arki

    Arki Super Moderator

    Joined:
    Nov 17, 2007
    Messages:
    4,136
    Likes Received:
    0
    Trophy Points:
    105
    Location:
    The Bay State
  7. foosa123

    foosa123 adsfjldsajflkajsdfa

    Joined:
    Sep 1, 2006
    Messages:
    1,784
    Likes Received:
    0
    Trophy Points:
    55
    Location:
    Vancouver, Canada
    thanks for all the info guys :D
     
  8. swiego

    swiego Notebook Consultant

    Joined:
    May 30, 2006
    Messages:
    221
    Likes Received:
    0
    Trophy Points:
    30
    The truth of the matter is that it depends a great deal on your CPU and disk.

    There are many situations in which you are disk throughput limited but have CPU to spare--in this case, compression could actually speed things up. In other situations, your CPU is running busy all the time whereas your HD is super fast--compression might slow you down.
     
  9. Rogresalor

    Rogresalor Notebook Enthusiast

    Joined:
    Jun 18, 2008
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    15
    Location:
    In SouthEast Netherlands
    I don't agree with that, sorry.

    My harddisk with XP on it is totally compressed and since it is totally compressed my laptop start up much faster, programs start up faster and I don't have any negative issue with it.

    Because a notebook disk is reasonally slow and the most notebook like mine has a dual core the decompression of the data occurs on the fly. UT2004 as example goes from 9,49 GB to 4,88 GB and it starts insanely fast and levels also loads insanely fast.

    The only thing when compression occurs is data defragmentation. I use O&O defrag from my neigbour country German and defrag the files physically by name on the disk and watch the show :D


    The games I have starts even as fast as on my desktop with a decent 7200 rpm disk uncompressed.

    When copying a database (1,22 GB to 387 MB) loads in 12 seconds in memory (30 MB/s, as fast my harddisk is) and loading 1,22 GB raw last much longer.



    The matter that compression was slow lasts out of the DoubleSpace age when CPU's are less powerfull.

    Zipping files with 4 threads in 7-zip goes with 9-10 MB/s! NTFS is using the Lempel-Ziff 77 compression and that compression method has an 64 KB overhead. LZ77 compress with 17 MB/s and decompress with 98 MB/s on my notebook.

    Only my music and movies on the disk are left uncompressed because FLAC and MP4 won't compress, but the Windows folder compresses greedly.


    http://www.ntfs.com/quest7.htm
    http://www.ntfs.com/ntfs-compressed.htm
    http://www.ntfs.com/ntfs_optimization.htm

    Last link in the middle of the text.

    Greetz and watch the fireworks tonight.
     
  10. metril

    metril Notebook Deity

    Joined:
    Feb 21, 2007
    Messages:
    969
    Likes Received:
    0
    Trophy Points:
    30
    Compression does increase the time it takes to load files. You might not see the effect of compression on system performance immediately since most systems today have dual core processors. Try running a couple of programs to tie up both of your processor's cores and then try to open the compressed files. Then try the same thing with the same files uncompressed.

    You will see a difference. Compression does not increase system boot speeds nor does it increase program launching speeds. Compression is like having a translator. This adds to the time it takes to complete a conversation or in technical terms, system requests.

    Compression does not cause defragmentation. If you compress before you defragment your system (assuming your system is already fragmented) then compression will increase the fragmentation. If you defragment your system before compressing, then it will not increase fragmentation. When files are uncompressed to be read, they are either written to your system RAM or pagefile depending on the utilization. Compression will actually slow down defragmentation because a file will take up less blocks. When the file is decompressed to be read, if it is written into the pagefile, then the pagefile is the most likely to be fragmented. In the case of compression, the pagefile gets fragmented faster than the rest of the system and as a result, it takes longer for the rest of the system to get fragmented. In the case of no compression, the majority of the fragmentation is not isolated to any specific area, thus the entire system will fragment at almost the same rate.
     
  11. olyteddy

    olyteddy Notebook Deity

    Joined:
    May 27, 2004
    Messages:
    1,369
    Likes Received:
    0
    Trophy Points:
    55
    Another small point: 'compressed' files sometimes are actually bigger. Most media files, for instance, are already about as small as they can be (exceptions, of course, are Raw AVI, WAV and any other non encoded files). Program files also don't compress much, if any. Being as there is some overhead and housekeeping stuff in most compressed files, they can actually become bigger. Try it with a couple of MP3 files by ZIPping them...
     
  12. Hiker

    Hiker Notebook Deity

    Joined:
    Jun 12, 2006
    Messages:
    1,718
    Likes Received:
    1
    Trophy Points:
    56
    I always get the message I could save 4GB or so by compressing old files in Disk Clean-up but pass. What files does Windows defragger compress.
     
  13. Apollo13

    Apollo13 Vista Downgrader

    Joined:
    May 31, 2007
    Messages:
    2,388
    Likes Received:
    113
    Trophy Points:
    81
    I think Rogresalor is right here - it depends on your hard disk and CPU. A dozen years ago, hard disks were slower than they are today, but CPU's were much slower. So while you may be able to read something from disk 4 times as fast today, you'll be able to decompress a file maybe 20 times faster. If the compression algorithm decompresses at 100 MB/s (about what Rogresalor said), and the disk reads at 50 MB/s, it shouldn't add much time at all even if it doesn't save space. Considering that you're reducing the amount of disk space you read, and you should actually get better performance.

    Now metril does have a point that if you're already running your CPU 100%, then compression will make things dog slow. But really, who's doing that often? And perhaps it will result in slowdowns when data is stored in RAM. But that's not a huge problem these days, either.

    I haven't tried compression myself, but I'd hazard a guess that in most cases today it would result in a net speedup. If you've got a fast new Intel SSD, probably not, but most of us, it probably would be a good option.
     
Thread Status:
Not open for further replies.

Share This Page