Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


apt-get upgrade and apt-get install is slow as hell
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

apt-get upgrade and apt-get install is slow as hell

trexostrexos Member
edited August 2013 in General

Hello,

I ordered a new VPS with this specs:

4GB Ram
4GB Swap
4 Cores


I installed Debian 6.0 64 bit minimal and I try to bring my system up 2 date. So I run apt-get update and apt-get upgrade. But apt-get upgrade is REALLY slow. So I reinstalled my VPS and tested the dd speed:

root@s7:~# dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
16384+0 records in
16384+0 records out
1073741824 bytes (1.1 GB) copied, 9.16583 s, 117 MB/s<br><br>

FreeVPS.us Benchmark:

root@s7:~# wget freevps.us/downloads/bench.sh -O - -o /dev/null|bash
CPU model :  Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz
Number of cores : 4
CPU frequency :  3300.013 MHz
Total amount of ram : 4096 MB
Total amount of swap : 4096 MB
System uptime :   3 min,
Download speed from CacheFly: 34.1MB/s
Download speed from Coloat, Atlanta GA: 7.14MB/s
Download speed from Softlayer, Dallas, TX: 5.21MB/s
Download speed from Linode, Tokyo, JP: 5.21MB/s
Download speed from i3d.net, NL: 17.3MB/s
Download speed from Leaseweb, Haarlem, NL: 25.0MB/s
Download speed from Softlayer, Singapore: 2.79MB/s
Download speed from Softlayer, Seattle, WA: 2.43MB/s
Download speed from Softlayer, San Jose, CA: 6.63MB/s
Download speed from Softlayer, Washington, DC: 7.02MB/
I/O speed :  133 MB/s

I think the results are ok, so why is it so slow? btw atm I'm running a ServerBear Benchmark to see the CPU speed.

Comments

  • TravTrav Member

    Did you try changing the mirrors in /etc/apt/sources.list ? Could just be a slow repository.

    Thanked by 1c0y
  • Not yet, but it takes a long time for this steps:

    Processing triggers for man-db ... Processing triggers for install-info ... Setting up screen (4.0.3-14) ...

    So I don't think it's something with the download, is it?

  • tuxtux Member

    Overselling?

  • Maybe, I wait for the CPU benchmark.

  • Could be a cpu issue...

  • Check the load and free RAM?

  • Yeah I think it's a CPU issue. The benchmark needs several hours now...

    Ram and load is low.

  • TravTrav Member

    Yeah, definately sounds like a CPU issue, especially if the RAM and hard disk look good. Somebody else on the server may be hogging the CPU or something.

  • Do you have ipv6 enabled? I had this issue before.

    As @rds100 said in an old thread"


    If the speed issue is IPv6 related edit /etc/gai.conf and put (uncomment) this line:

    precedence ::ffff:0:0/96 100

    This will make ipv4 preferred over ipv6 (by default ipv6 is preferred).

  • tchentchen Member
    edited August 2013

    The wheezy template I got was from rackster which has an overloaded repo (points to their own mirror). Chances are high you have this minimal template too. Just delete those two entries and fallback on the official repos.

    Opps, just saw the deb 6. Nvm

  • trexostrexos Member
    edited August 2013

    I reiceved the benchmark, and it's quite good I think:

    UnixBench (w/ all processors) 3728.5 UnixBench (w/ one processor) 1655.7

    @Spencer said:
    Do you have ipv6 enabled? I had this issue before.

    As rds100 said in an old thread"


    If the speed issue is IPv6 related edit /etc/gai.conf and put (uncomment) this line:

    precedence ::ffff:0:0/96 100

    This will make ipv4 preferred over ipv6 (by default ipv6 is preferred)
    .

    I did that and rebooted. But maybe it's a bit faster, but not much.

  • I wrote the support they said they can't find a problem.

  • perennateperennate Member, Host Rep
    edited September 2013

    IPv6 would only affect the download. AFAIK apt-get downloads everything and then installs stuff, so that wouldn't help. Could be disk if not CPU; dd doesn't show everything.

  • Google for, download and run ioping.

  • trexostrexos Member
    edited September 2013

    Thank you @perennate and @Abdussamad.

    here is the disk IO part from ServerBear:

  • MatiMati Member
    edited September 2013

    @trexos said:
    Thank you perennate and Abdussamad.

    here is the disk IO part from ServerBear:

    doesn't look that bad, quite actually similar to my KS2G (I get much better sequential, worse seek and cached. Also have spike in I/O pings - does it mean something in practice except of destroying statistics? :P)

    http://serverbear.com/benchmark/2013/08/28/EVWwP6fEKIW0dkN6

  • Be sure to check your DNS settings in /etc/resolv.conf
    If nameserver lines listed aren't responding, resolution timeouts will make apt-get very slow (from experience).

  • A good way to debug is apt-get install something, then apt-get remove it, then reinstall it again so it pulls from a local cache copy. That should tell you if it's a network issue or a local issue.

  • MaouniqueMaounique Host Rep, Veteran

    From what he says it is a local issue. It spends time installing, rather than pulling the packages.

  • Sounds like it to me as well, not sure why people keep suggesting it's a network problem.

  • @NodePing said:
    Be sure to check your DNS settings in /etc/resolv.conf
    If nameserver lines listed aren't responding, resolution timeouts will make apt-get very slow (from experience).

    I use 8.8.8.8 and 8.8.4.4. So I don't think thats the problem, but thanks :)

    @black said:
    A good way to debug is apt-get install something, then apt-get remove it, then reinstall it again so it pulls from a local cache copy. That should tell you if it's a network issue or a local issue.

    With or without -purge?

  • If it's in the apt cache, it won't fetch it from the network so if it's still slow, it's a local issue

Sign In or Register to comment.