wejones
Posts: 21
Joined: Sat Jan 05, 2013 10:15 pm

pacman too slow?

Sat Jan 05, 2013 10:38 pm

New to using the Raspberry. Just installed the Arch-Linux on an 8 GB sd card. Put the card into what I think is a model B-version 1 Raspberry that I received as a gift. Set up the network, and sshd to connect from other computers, and expanded the size of the SD card (although I did not add a swap partition).
I decided to try to import some programs using pacman. I tried to use the pacman command, but it failed. I did a google and found a post saying that I needed to initiate keys using a
pacman-key --init
command. I tried this, and it started a process, but then it just sat there for a few hours. I checked with another terminal connection, and a ps -A showed that it was still running, but a top command seemed to indicate that it wasn't doing anything. So I canceled out of the process, and decided to try again to import some programs.
I did a pacman -S zzzz
where zzzz were program names, on a couple programs. It seemed to start up, ie found the programs, asked me to type "Y" to download, and then started the process. However very quickly, I started getting error messages, some error:404, and a message saying that less than 1 KB of data was transferred in 10 seconds, and that the file failed to load.
One of the programs I tried, had dozens of files to transfer, and some of them transferred OK, but most of them gave this error 404 and said that the transfer was too slow.
I thought that maybe the SD card I used was too slow, so I experimented with some ftp transfers over my LAN, and was getting ~7 Mbps rates in both directions. I'm connecting over a WildBlue Exede ISP, that runs at around 11 Mbps download, however there is about 0.6s latency. I've sucessfully downloaded program packages over this system with a Ubuntu system (I'm new to that too), and those worked fast.
Anyway, as I said, I'm new to this Raspberry thing, and don't have a clue re what I'm doing wrong. I'm thinking that the Raspberry is slow, since I've read that it should boot in 10s, but it's been taking MUCH longer than that.
Is my SD card too slow?
Do I need a swap partition? (If so link to how to do that?)
Do I need to do the pacman-key --init again, and wait more than a couple hours?
Or am I doing something else wrong?

Thanks in advance, and sorry for newbee questions.

wejones
Posts: 21
Joined: Sat Jan 05, 2013 10:15 pm

Re: pacman too slow?

Sun Jan 06, 2013 3:58 pm

Update. Previous post was based on what I did yesterday.
Today, I decided to repeat attempt to get some files via pacman, after a reboot.
Today, I still get error 404, however I no longer get the message telling me that the transfers are too slow.
So maybe today speed is not an issue, but I don't know what error 404 is.

User avatar
azeam
Posts: 194
Joined: Fri Oct 26, 2012 11:13 pm
Contact: Website

Re: pacman too slow?

Sun Jan 06, 2013 4:56 pm

404 means that it can not be found, sounds to me like a bad internet connection or possibly problems at the server end. It is also normal that it takes much longer than 10 seconds to boot the RPi.

wejones
Posts: 21
Joined: Sat Jan 05, 2013 10:15 pm

Re: pacman too slow?

Sun Jan 06, 2013 5:32 pm

Thank you for the reply, re file not found. Since the errors I was seeing yesterday mentioned the transaction being slow, it never occurred to me that the file wouldn't be there, but I think that's the case.

Today, changed to a different mirror, and it was pretty much the same. Then, I looked closer at the list of dependencies, and the files that were actually trying to be downloaded, and I then I went to the mirror website, and looked at the files actually there.
What I found was that pacman was trying to download a different version of the file than what was actually there, and I assume that was responsible for the file not found error.
I guess I need to look in a different place for these other file versions.

I'm slowly trying to learn how this works, but I still have NO idea about what was causing the messages about the transaction going too slow yesterday, but I guess since it isn't happening today, I don't need to worry about it.

Thanks.

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: pacman too slow?

Tue Jan 08, 2013 6:29 am

It is possible that the packages pacman was having trouble downloading from the mirror, got upgraded between the time it took for pacman to decided what it needed to download and then when it went to get them. You may not need to change mirrors. They all have to get updated at some point, and that can cause problems with package versions not matching if you try to perform the installation at that particular moment.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

wejones
Posts: 21
Joined: Sat Jan 05, 2013 10:15 pm

Re: pacman too slow?

Tue Jan 08, 2013 3:30 pm

I don't think it has to do with the mirror being updated, at least not now.
I'm convinced now that I don't have the pacman.conf and/or mirrorlist file set up right, however I'm confused re how I should have those files set up. I wonder if someone using Arch Linux OS could give an example of how they have the pacman.conf set up, and what mirror url they are using in the mirrorlist file?
I finally got the pacman-key --init command to complete, although it took leaving it run for 15 hours! However, now I think I had the .conf file set up wrong, so I'm wondering if now I have to go through that again?
Anyway, the reason I think the .conf and mirrorlist files aren't correct, is that pacman is trying to download the wrong files. Ie, one of the several packages I tried to download was mplayer. I went to the mirror I was trying to use, which is va.us.mirror.archlinuxarm.org , using my browser in windows, and came to a place where you have to choose between arm, armv6h and armv7h. I assume that for the RPi, I should be using armv6h, so that's the one I choose. The mplayer file is in the extra directory, and has a name of mplayer-35421-1-armv6h.pkg.tar.xz . However the file that pacman was trying to download was mplayer-34799-1-arm.pkg.tar.xz . If I look in the arm branch instead of the armv6h branch at the mirror site, it shows a file named mplayer-35421-1-arm.pkg.tar.xz with a 17-Nov-2012 date. I don't know where it is getting the "34799" file, as I don't see it in any of the branches on that mirror. But one thing is clear, and that is that all the files pacman is trying to load, including all the other target files, only have "-arm.pkg" in the name, and I think that they should have "-armv6h.pkg" in the name.
I looked in the .conf file, and has a Architecture = arm line. So I tried changing that to armv6h, but that didn't work. I also tried changing the url in the mirrorlist file to indicate armv6h, but that didn't work either (I think both attempts gave an error saying incorrect architecture or something similar.

Anyway, I feel good that I think I know that pacman is just going to the wrong branch of the mirror site, but I'm not sure how the .conf file should be altered, and not sure what url I should have in the mirrorlist file. And I'm also not sure whether I have to repeat the pacman-key --init command again after I've altered the two files. I also didn't know how to alter the 3 repository lines indicated in the .conf file, except that it seems to be going to the right repository, just the wrong branch. But a complete .conf file example would really help a lot.


thanks.

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: pacman too slow?

Tue Jan 08, 2013 4:10 pm

You cannot assume that your version of arch is armv6h, you need to check. If your mirror lists are taking you to mirrors with arm rather than armv6h packages, your system is badly out of date.

When did you get and dd your image? Can you post the file name of the image?

Post the results of the following

cat /proc/version

You may need to do a fresh install of the current hard float image, or if you are getting the packages using your Windows box, then get the ones from the plain arm directory.

Also, before running Pacman, you should be entering sync, and doing pacman -Syu to update your system. But be aware that you could lose everything when you run the Pacman -Syu, I am suspicious you have a very old soft float image.

Back up your system or any irreplaceable files before you do any updating. I personally am doing what I can to keep one old soft float version of Arch without updatiing it, and putting a fresh install of the current hard float image on a different SD card. Pepedog will be coming out with a new image soon, as soon as some issues are resolved. You might just want to wait until that happens. Keep your eyes on the Arch subforum here. And if your mirror lists that your Pi are using are pointing to arm rather than armv6h urls, use those. Where are the mirror lists? Let me see...

/etc/pacman.d/mirrorlist
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

wejones
Posts: 21
Joined: Sat Jan 05, 2013 10:15 pm

Re: pacman too slow?

Tue Jan 08, 2013 5:12 pm

Thanks for responding so quickly.

sdjf wrote:You cannot assume that your version of arch is armv6h, you need to check. If your mirror lists are taking you to mirrors with arm rather than armv6h packages, your system is badly out of date.

When did you get and dd your image? Can you post the file name of the image?


Re version of the image, I think it is archlinuxarm-13-06-2012.img . I got it about 2 weeks ago from a link I found at the http://www.element14.com web page. {I received my RPi as a holiday gift, and the box only had element14 written on it, and I didn't know what it was, so I went to that web page to learn about it.}
sdjf wrote: Post the results of the following

cat /proc/version
It returns:
Linux version 3.1.9-20-ARCH+ ([email protected]) (gcc version 4.7.0 20120505 (prerelease) (GCC) ) # 1 PREEMPT Mon Jun 11 05:55:47 UTC 2012
I got the idea that it was armv6h because when I first booted the RPi up, I did a
cat proc/cpuinfo and got:, which said the processor was ARMv6 .... but I see now that it also says rev-7 and v6l so now I don't know what it really is.
Processor : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 697.95
Features : swp half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7

Hardware : BCM2708
Revision : 0002
Serial : 0000000033a6ad31
sdjf wrote: Also, before running Pacman, you should be entering sync, and doing pacman -Syu to update your system. But be aware that you could lose everything when you run the Pacman -Syu, I am suspicious you have a very old soft float image.
I remember reading about that step, but I may have skipped that, because the first time I tried to do the pacman-key --init step, it never finished, so I forgot that next step. Can I still do that now, and do I need to edit the .conf file first and do I need to do the key init step again first?
sdjf wrote: Back up your system or any irreplaceable files before you do any updating. I personally am doing what I can to keep one old soft float version of Arch without updatiing it, and putting a fresh install of the current hard float image on a different SD card. Pepedog will be coming out with a new image soon, as soon as some issues are resolved. You might just want to wait until that happens. Keep your eyes on the Arch subforum here. And if your mirror lists that your Pi are using are pointing to arm rather than armv6h urls, use those. Where are the mirror lists? Let me see...

/etc/pacman.d/mirrorlist
a cat mirrorlist gives
#
# Arch Linux ARM repository mirrorlist
# Generated on 2012-06-08
#

## Geo-IP based mirror selection and load balancing
#Server = http://mirror.archlinuxarm.org/arm/$repo

### Mirrors by country

### China
# Server = http://cn.mirror.archlinuxarm.org/arm/$repo

### Finland
# Server = http://fi.mirror.archlinuxarm.org/arm/$repo

### Germany
# Server = http://eu.mirror.archlinuxarm.org/arm/$repo
# Server = http://6.eu.mirror.archlinuxarm.org/arm/$repo

### Netherlands
# Server = http://nl.mirror.archlinuxarm.org/arm/$repo

### United States
## CA
# Server = http://ca.us.mirror.archlinuxarm.org/arm/$repo
## IL
# Server = http://us.mirror.archlinuxarm.org/arm/$repo
## VA
Server = http://va.us.mirror.archlinuxarm.org/armv6h/$repo
Originally this file had everything commented out except the first Server = http://mirror.archlinuxarm.org/arm/$repo server, but I commented that out, and uncommented the last one from va.us , which is closer, which I also edited to add the armv6h instead of just arm, and also tried half a dozen other things.

I don't have anything important on the SD chip now, so I wouldn't mind starting over from scratch, as I've been trying so many things by now, that I may have replaced some files I shouldn't have.

I've used Unix, and Linux on and off for over 20 years, but I'm still pretty much a novice at it, as I spend most of my time on Windows. But I'm trying to learn again with this RPi, as it seems like a great little gadget. I think I'm also going to get another SD chip, and put one of the GUI systems on it, but I really wanted to use this Arch Linux, because I'm more familiar with terminal based stuff from working on Unix.

Thanks for the help.

wejones
Posts: 21
Joined: Sat Jan 05, 2013 10:15 pm

Re: pacman too slow?

Tue Jan 08, 2013 6:30 pm

I think I really messed things up now.
I got impatient, and decided to try that pacman -Syu command anyway. It went through a bunch of steps and updated a LOT of files, but then got down and wanted to update pacman itself, at which point it failed. It was trying to add the v6h version, possibly because of what I had in the .conf file??? So I put the architecture line back where it was, and tried again, but this time it wouldn't do anything.

I'm pretty much down to where unless it's possible to delete all the pacman files, get the conf file correct, and redo the pacman -Syu, that I may just re burn the SD chip and start over. Although even if I do that, I'd appreciate response re last message, so that I don't make the same mistakes all over again. Ie should I have the arm or armv6h. And why did it take between 7 and 15 hours to do that pacman-key initialization step???

Do you think I can just delete the contents of /var/lib/pacman, and do the pacman -Syu again.

Thanks.

User avatar
sharow
Posts: 9
Joined: Wed Oct 17, 2012 7:24 am
Location: Tokyo

Re: pacman too slow?

Tue Jan 08, 2013 6:36 pm

Try

SigLevel = Never

in /etc/pacman.conf

see: https://wiki.archlinux.org/index.php/Pacman-key

wejones
Posts: 21
Joined: Sat Jan 05, 2013 10:15 pm

Re: pacman too slow?

Tue Jan 08, 2013 6:49 pm

SigLevel = Never was already uncommented, although I had also tried SigLevel = Optional TrustAll, which appeared prior. Perhaps I shouldn't have done that.

Obviously, I have just enough linux knowledge to mess things up. :)

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: pacman too slow?

Wed Jan 09, 2013 12:32 am

That is a very old image. You definitely should not have changed the url in the mirror list, the urls in the mirror list lead to mirror directories that are compatible with your version of the Pi.

My best advice is for you to start over by clicking on the link at the top of this page for "Download", and then use the link for downloading Arch Linux you will find there to get the current system. The old soft float image you have cannot upgrade properly, sorry you got mislead by the very outdated version that element14 had on their site.

You should like the newer one anyhow, it is supposed to be a whole lot faster than what you got and has had a lot of bugs fixed. I can understand your not wanting to wait for a January image to come out but, at this point, I think your time is better spent downloading the Sept 18 image on the downloads page than messing around with an image that cannot really be updated without lot of issues, especially as you have been trying to get pacman to install the wrong versions of the software that you want.

Guessing when editing configuration files is not a very good idea unless you have 99% certainty that you could not be making a mistake. And this goes especially if you are downloading and installing software, that is one activity that can really destroy or seriously crash an operating system in some cases.

I am not saying I have not made that sort of mistake, although the things I mess up are more in the hardware and power department, but please do yourself a favor and get the current image. And maybe shoot an email to the webmaster at element14, complaining that the image they have online is terribly out of date.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

wejones
Posts: 21
Joined: Sat Jan 05, 2013 10:15 pm

Re: pacman too slow?

Wed Jan 09, 2013 2:19 pm

Thanks.
Yeah, I decided yesterday to start over, and downloaded the more recent file. I made a copy of what I have on the SD card now, so I can compare things later out of curiosity.
But re the proper way to get this Arch Linux going, it's still strange to me that it should have taken 15 hours for that pacman-key --init command to complete. I tried to download that program that would speed things up, but since pacman wasn't working I wasn't able to get that installed, so I had to do the ls -R thing over and over manually. But even doing that for 6 hours didn't help. I really don't understand the entropy thing. I understand entropy relative to physics/chemistry, but don't understand why the randomness would help speed up this process.
Anyway, I'm going to wipe the card clean, then reload the newer OS today. I'll probably be back in a few days with more problems. Wouldn't be fun if there weren't some problems.
Thanks.

Cloudcentric
Posts: 982
Joined: Fri Sep 14, 2012 9:13 am

Re: pacman too slow?

Wed Jan 09, 2013 3:03 pm

I know everything about nothing"

wejones
Posts: 21
Joined: Sat Jan 05, 2013 10:15 pm

Re: pacman too slow?

Wed Jan 09, 2013 3:49 pm

Another question.
I had been following an installation guide I found at:
http://elinux.org/ArchLinux_Install_Guide
Which said after editing the pacman.conf to do:
# pacman-key --init

#ls -R / && ls -R / && ls -R / multiple times in a second console

Then, after a key is generated:

# pacman -Syu
However, the guide that Cloudcentric just posted says to do the pacman -Syu before anything else, which suggests that it might not be necessary to do the 15 hour key initialization, or perhaps that this might make that step go faster. ( I wasn't planning to load a GUI at this time, so the rest of the steps weren't applicable).
Anyway, still curious about speeding up the initialization of packman, and also wondering if I actually need to edit the pacman.conf before doing anything, which is recommended in the first guide?

Just trying to avoid going down the same road I did before.

Thanks.

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: pacman too slow?

Wed Jan 09, 2013 5:57 pm

There are a bunch of threads talking about how to do the pacman key thing. I haven't paid much attention to them, though, as my pacman never demanded I do that. They talk about how to get it to not take hours to happen.

And I have ignored the arch guides, it just works for me, out of the box, except for me needing to do some very unusual tweaking so it will start running headless from the get go using my PDA. That sort of odd setup would be too confusing for anyone to put in the basic noob arch wiki setup guide.

What confused me at first getting my pi, is people giving advice based on the GUI distributions that do not apply to Arch. I am used to running from command line, so it has just been a matter of figuring out how to do what everyone said was impossible. It took a month to get it running stable, but I have got it working well now.

Oh, because my Pi is running offline, and I use the -U option, I really did not have to edit pacman.conf to start with, to get it to work. It complained it could not find the mirrors, but it still installed the packages that I had put on my pi. But the ones I have done so far are ones not having any dependencies to speak of, so they install as is, because they have just been command line utilities.

And, to make it clear, I do not see any reason why you have to edit pacman.conf to begin with. It worked for me without doing so, so why should you have to edit it? I did not need to do any initialization of pacman to get it to work for me. But then, I have not done -Syu either. When you are running online and getting from the repository, your instructions will be different than what I had to do. But beware! Make sure you run "sync" before you run pacman to make sure your system does not get corrupted by too many writes not written to disk yet when it starts updating/installing.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

wejones
Posts: 21
Joined: Sat Jan 05, 2013 10:15 pm

Re: pacman too slow?

Wed Jan 09, 2013 6:53 pm

Thanks.

wejones
Posts: 21
Joined: Sat Jan 05, 2013 10:15 pm

Re: pacman too slow?

Wed Jan 09, 2013 10:54 pm

Just an update.
Today, after last post above,
I used flashnul to fill my SD card with zeros
Used flashnul to send the most recent image to the SD card
I then booted on the card, and used fdisk to expand the use the whole 8GB card
Instead of doing the pacman-key --init, at this point I decided to try
pacman -Syu
right away. This seemed to mostly work, but there were some errors, including the core section not getting updated. So I ran it again. This time the core updated, but it missed a few files. I think I may have run it a third time, and this time it seemed to get most things updated.
After rebooting, I decided to try that pacman-key --init thing , mainly because while going through it's update, it updated pacman, and printed out a line saying to run that command.
This time, before I could generate a script to do ls -R over and over, it completed. Must have taken less than a minute. So no waiting for 15 hours.
Anyway, I think the thing is set up 99% right now.
Thanks for all who helped.

Return to “Beginners”