Skip to content

untar is very slow #507

Closed
Closed

Description

Hello,

First things first: I tried the WSL today for the first time, and I'm very impressed, I could replicate part of my current VirtualBox + Ubuntu setup without a single error.

One thing I noticed in that process is that "tar" is slow when unpacking archives. Just as an example, I tried to untar the latest linux archive using "tar Jxf ". In virtualbox, this takes only 10 seconds, in WSL it's more like 10 minutes, so I think something is wrong.

Is that something others experience as well?

Activity

  1. o-g-o commented on Jun 11, 2016

    @o-g-o

    I've found that the antivirus (windows defender) have a great impact on file performance on my system. I use no other antivirus.

    So I've added an exclusion in windows defender on my system

    • launch cmd and type echo %LOCALAPPDATA%\lxss
    • cut the resulting directory
    • go to settings/security/windows defender and add a folder exclusion with the folder you cutted in cmd

    Could you tell if untar is faster aftter that ?

  2. kanigsson commented on Jun 12, 2016

    @kanigsson
    Author

    Thank you for that tip. Yes, that actually helped a lot - untar now is 5 times faster than before! I measured roughly 2 minutes instead of 10 for unpacking that archive after adding that folder exclusion. Definitely better, although there still is a lot of room for improvement.

  3. o-g-o commented on Jun 12, 2016

    @o-g-o

    Does your tar display something while unpacking ? If yes, try to not display anything, because the windows console (conhost) is a big bottleneck too. It could also explain why it's so slow.
    Could you try ? Thanks

    edit: seems like you don't use the "v" option, so tar should not display anything

  4. o-g-o commented on Jun 12, 2016

    @o-g-o

    I've made some tests unpacking linux-4.6.2.tar.xz with "time tar -Jxf linux-4.6.2.tar.xz"

    On my surface pro 3 and build 14361, with windows defender exclusion on lxss folder it takes 42 seconds.

    With windows defender completely disabled it takes 32 seconds. So windows defender alone (with lxss folder excluded) costs 25% of i/o performance in this case ... I hate antiviruses ...

  5. kanigsson commented on Jun 12, 2016

    @kanigsson
    Author

    Yes, all my experiments were with the same command that you used, so no textual output. I have the same build number 14361.

    Your numbers are quite good, it probably means there is something wrong with the setup of the machine I used. It's a spare computer I have and that I just took out of the cupboard to try WSL - I didn't want to go to Insider builds on my main computer. However, even the spare shouldn't take that long to untar. But well ...

    In other words, given your results, it's likely that it's a problem with my setup and not with WSL, so I suggest we close the issue. I will probably use WSL when it comes out, and if I encounter similar issues again will try to get to the bottom of this.

  6. benhillis commented on Apr 10, 2017

    @benhillis
    Member

    Closing this out per Johannes Kanig (@kanigsson)'s comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions