0

I am trying to install Python-3.5.5 for local user without sudo on Linux. I downloaded the Python-3.5.5.tgz with wget https://www.python.org/ftp/python/3.5.5/Python-3.5.5.tgz, then used tar zxvf Python-3.5.5.tgz to unzip the file. But this line takes forever to unzip this 19M file. I waited for several hours but it didn't seem to finish. On the terminal, things like this

Python-3.5.5/
Python-3.5.5/Lib/
Python-3.5.5/Lib/poplib.py
Python-3.5.5/Lib/nntplib.py

are poping out every one or two seconds. But it seems that there are just too many of these files. Is there anything that can speed up this process? Or are there any alternatives for the command tar zxvf to unzip a .tgz file?

  • There is most likely something wrong with your system. – Klaus D. Dec 28 '18 at 02:31
  • 2
    Give some context and information. What command are you entering exactly? Where is the `tgz` file versus where are you executing the command from? If you ^C after "several hours" dis you examine the file structure created and is there anything unusual about it? Does `tar tvzf ...` produce reasonable results? – lurker Dec 28 '18 at 02:34
  • @lurker The command tar tvzf works fine and displays all the files in the tgz file. Actually I created a repertory called src to install Python, so I'm at /home/nak/myname/src and the tgz file is just inside this repertory. I did check the file structure after ^C the process, but nothing weird has been spotted. It just contains what has been extracted from the tgz file. – user10819593 Dec 28 '18 at 02:54
  • So does it infinitely spew out file names as it's executing, or does it, at some point, stop spewing file names and just sits there without terminating or outputting any file names? – lurker Dec 28 '18 at 03:07
  • @lurker It keeps spewing out file names slowly, like every 2 or 3 seconds. I haven't noticed any too long stops so far. – user10819593 Dec 28 '18 at 03:15
  • This isn't a question about software development, so no matter what the cause, it doesn't belong on Stack Overflow. Consider our sister site [unix.se]. That said: Personally, I'd start by using [sysdig](https://sysdig.com/) to track which syscalls are actually experiencing latency -- it has a nice histogram. That said, what you're describing is slow enough you may even be able to use `strace` (which is *normally* so high-overhead that it changes the timings you're trying to observe). That'll let you see if it's the read operations, the write operations, or something else that's taking time. – Charles Duffy Dec 28 '18 at 03:55
  • You might also consider `oprofile` as a tool that can give you timings in terms of where time is being spent *inside the kernel*. (`strace` or `sysdig` will tell you *which* syscalls are taking time; `oprofile` will tell you *why* those syscalls are slow, or at least what part of the kernel time is being spent in while executing them). BTW, if you haven't checked `dmesg` yet for any pertinent kernel logs, you should do so; in many common failure cases there'll already be related errors spooled there. – Charles Duffy Dec 28 '18 at 03:58
  • Again, though: Not a question about writing code, so it doesn't belong on this site. – Charles Duffy Dec 28 '18 at 03:59
  • (BTW, another thing you can test is the time to read with no compression; `time cat Python-3.5.5.tgz >/dev/null` will give you a distinct number from `time gunzip -c /dev/null`, so you can figure out if it's I/O read or decompression that's slowing things down; if both those are fast, that's a useful data point as well, and lets focus go to other operations -- logging to console, or writing results, etc). – Charles Duffy Dec 28 '18 at 04:02
  • ...btw, `gunzip -c Python-3.5.5.tar` will do *only* the decompression, and not the dearchival (splitting the tarball out into separate files), whereas `tar -x – Charles Duffy Dec 28 '18 at 04:05
  • (...the above comments largely assume Linux -- with MacOS, you can get a lot of the same details `sysdig` and/or `strace` would provide you from `dtrace`, though with recent versions of the OS it's kinda' a pain to disable the various security features to enable it). – Charles Duffy Dec 28 '18 at 04:17
  • @CharlesDuffy OK, thank you very much. I'll try these tools now. – user10819593 Dec 28 '18 at 04:53

0 Answers0