You are not logged in.

#1 2010-03-06 12:06:56

cleanrock
Member
Registered: 2008-11-17
Posts: 109

xz (LZMA2) packages

I read that arch is moving to xz packages and i am a bit skeptical.
Is it really worth ~30% smaller archives when decompressing takes 3 times longer and compressing take about 10 times longer ?

Offline

#2 2010-03-06 12:27:31

lymphatik
Member
From: Somewhere else
Registered: 2009-03-07
Posts: 119

Re: xz (LZMA2) packages

I'm not sure about the ten times slower. But if they move to it, it's mostly for saving bandwidth.

http://stephane.lesimple.fr/blog/archiv … hmark.html

Last edited by lymphatik (2010-03-06 12:27:49)

Offline

#3 2010-03-06 12:41:44

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,650
Website

Re: xz (LZMA2) packages

I'm prepared to take the 10x longer compression as it will save me a heap of time uploading.  You can keep PKGEXT='.pkg.tar.gz' in your makpekg.conf and not worry about compression time.

As far as decompression goes, it is about 2 to 2.5 times as slow and if you have to download the package, you will end up saving time.  Of course, reinstalls from the cache would be slower.

Online

#4 2010-03-06 13:22:40

n0dix
Member
Registered: 2009-09-22
Posts: 956

Re: xz (LZMA2) packages

Is there a announce or an article relate to it?

Offline

#5 2010-03-06 13:30:54

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,650
Website

Re: xz (LZMA2) packages

No...  there was some discussion on arch-dev-public but I do not think there has been a formal "everyone switch" directive.

Online

#6 2010-03-06 13:35:05

n0dix
Member
Registered: 2009-09-22
Posts: 956

Re: xz (LZMA2) packages

Thanks for the quickly answer Allan.

Offline

#7 2010-03-06 16:05:59

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: xz (LZMA2) packages

cleanrock wrote:

I read that arch is moving to xz packages and i am a bit skeptical.
Is it really worth ~30% smaller archives when decompressing takes 3 times longer and compressing take about 10 times longer ?

Sounds like a lot of FUD and an utter lack of personal experience.

I've been using XZ for my own package repo ever since libarchive introduced support for it. That was already a while ago. My system is a 1,2 GHz Core 2 Duo. Not really something you want to throw powerful compression at, but it does a good job. Way faster than bzip2, slower than gzip, but better compression than both. 99% of the time though, you'll only decompress. You'll just install packages from the repos, and the few ones you build yourself (if any) won't really make the difference.

Oh, and did I mention it doesn't even blink when it has to install xz packages?


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#8 2010-03-06 16:10:33

fflarex
Member
Registered: 2007-09-15
Posts: 466

Re: xz (LZMA2) packages

I think it's the right decision, because (de)compression does not cost anyone very much money, whereas bandwidth definitely does...

Offline

#9 2010-03-06 16:40:35

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: xz (LZMA2) packages

So when will this change be starting/taking place?

Offline

#10 2010-03-06 16:52:45

some-guy94
Member
Registered: 2009-08-15
Posts: 360

Re: xz (LZMA2) packages

anonymous_user wrote:

So when will this change be starting/taking place?

It already has, new/updated packages are using xz now.

Unless you have your own repo, you should keep your own PKGEXT to tar.gz.

Offline

#11 2010-03-06 17:53:21

shinythings
Member
Registered: 2010-03-06
Posts: 6

Re: xz (LZMA2) packages

some-guy94 wrote:

Unless you have your own repo, you should keep your own PKGEXT to tar.gz.

Why do you suggest that? For the time saved compressing?

Offline

#12 2010-03-06 18:15:57

some-guy94
Member
Registered: 2009-08-15
Posts: 360

Re: xz (LZMA2) packages

shinythings wrote:
some-guy94 wrote:

Unless you have your own repo, you should keep your own PKGEXT to tar.gz.

Why do you suggest that? For the time saved compressing?

Disk space is cheap, and compressing/decompressing takes longer.

Offline

#13 2010-03-06 18:47:23

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: xz (LZMA2) packages

I've seen packages like libgweather dropping from 8MB to 2.2MB. That's a 72.5% decrease in size. Compressing packages with .xz takes more time, but decompression is only 2 times slower than gzip. Decompression is only a small part of the process of installing packages though:
(- download)
- read file from disk
- decompress
- write files to disk

By decreasing the package size, you have to download less and you have to read less from disk. If you don't have the file cached, you'll gain speed, if you have the file cached, you will see a slight delay compared to gzip.

One funny finding is this, taken from the OpenOffice package. Times are from uncompressing the compressed tarball itself, the tarball isn't extracted here:
gzip:  0m 5.772s
bzip2: 0m29.433s
xz -1: 0m13.983s
xz -2: 0m12.949s
xz -3: 0m12.706s
xz -6: 0m11.462s

You'll see that decompression times decrease when the compression rate increases. This is caused by the smaller input file. The difference between xz -1 and xz -6 in file size was 25.8MB. The gzip file was 41.3MB larger than the xz -6 compressed file. By using xz -6 compression on the OpenOffice package we saved 25% on package size.

As for cheap diskspace: disk space is cheap yes, but bandwidth isn't. When a large amount of packages is updated on our servers, it can take a day or more to get everything pushed to all mirrors. If we can decrease the needed bandwidth with 25%, we can transfer more packages to our mirrors in less time. Another thing you should keep in mind is that though disk space on your home machine is cheap, mirrors could be coping with expensive SAS or SAN setups that are way more expensive.

Offline

#14 2010-03-06 20:15:43

godane
Member
From: NH, USA
Registered: 2008-02-03
Posts: 241
Website

Re: xz (LZMA2) packages

My thought on xz packages is the should only be used on extra and community packages. This will make it less confusing when building for core packages. You don't have to think if its a depend of pacman etc.


I'm working on a live cds based on Archlinux. http://godane.wordpress.com/

Offline

#15 2010-03-06 20:19:51

Pierre
Developer
From: Bonn
Registered: 2004-07-05
Posts: 1,967
Website

Re: xz (LZMA2) packages

The upgrade path from older installation which don't know about xz is alreaady taken care of. Ther are only a few pacakaes which need to be kept in gz format; not the entire core repo. (Sure, updating from pacman 2.x might be a problem, but I just don't care)

Offline

#16 2010-03-06 20:22:51

cleanrock
Member
Registered: 2008-11-17
Posts: 109

Re: xz (LZMA2) packages

.:B:. wrote:
cleanrock wrote:

I read that arch is moving to xz packages and i am a bit skeptical.
Is it really worth ~30% smaller archives when decompressing takes 3 times longer and compressing take about 10 times longer ?

Sounds like a lot of FUD and an utter lack of personal experience.

I've been using XZ for my own package repo ever since libarchive introduced support for it. That was already a while ago. My system is a 1,2 GHz Core 2 Duo. Not really something you want to throw powerful compression at, but it does a good job. Way faster than bzip2, slower than gzip, but better compression than both. 99% of the time though, you'll only decompress. You'll just install packages from the repos, and the few ones you build yourself (if any) won't really make the difference.

Oh, and did I mention it doesn't even blink when it has to install xz packages?

not really FUD, i understand that xz has more pros than cons, i just wanted to hear some comments/discussion about this since i could not find anything on the forum .. i am happy now (and probably some more people) after seeing some comments from the devs.
PS. you sound a bit angry in ur reply, i dont think thats the arch way wink

Offline

#17 2010-03-06 20:58:10

combuster
Member
From: Serbia
Registered: 2008-09-30
Posts: 711
Website

Re: xz (LZMA2) packages

Well bandwith is everything so I support the switch to xz. This will be good for syncing mirrors also smile

Offline

#18 2010-03-08 03:31:50

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: xz (LZMA2) packages

cleanrock wrote:

not really FUD, i understand that xz has more pros than cons, i just wanted to hear some comments/discussion about this since i could not find anything on the forum .. i am happy now (and probably some more people) after seeing some comments from the devs.
PS. you sound a bit angry in ur reply, i dont think thats the arch way wink

Not really angry... I'm just apalled people are being this skeptical. I mean, even Slackware - which is one of the most conservative distros - already switched to xz. You can hardly call that a rash decision.

You can still compress your own packages with gzip or whatever (a choice the user has always had), and since the difference in decompression time is minimal, it's a win-win. Most devs really won't care for the increased compression time; the users even less.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#19 2010-03-08 03:42:40

MP2E
Member
Registered: 2009-09-05
Posts: 115

Re: xz (LZMA2) packages

.tar.xz is amazing! I just took the git package(unfortunately still gzip at the moment) which is a 6MB download, decompressed, then compressed to .tar.xz. 2MB! I was so shocked. Fantastic smile

And really, compression time is not much larger, and decompression time is even less!
(By the way I used the -9 and -e options for maximum compression and maximum compression time)


17:23 < ConSiGno> yeah baby I release the source code with your mom every night
17:24 < ConSiGno> you could call them nightly builds if you know what I mean

Offline

#20 2010-03-08 10:31:26

SiC
Member
From: Liverpool, England
Registered: 2008-01-10
Posts: 430

Re: xz (LZMA2) packages

Can honestly say that I had not noticed the change over.  Just checked my package cache, and sure enough, there are some .xz files there.  Just goes to show how much attention I pay and how good the pacman devs are.  Nice work guys smile

Offline

#21 2010-03-08 10:54:38

sand_man
Member
From: Australia
Registered: 2008-06-10
Posts: 2,164

Re: xz (LZMA2) packages

SiC wrote:

Can honestly say that I had not noticed the change over.  Just checked my package cache, and sure enough, there are some .xz files there.  Just goes to show how much attention I pay and how good the pacman devs are.  Nice work guys smile

Same here. I'm all for it but I have to admit that I didn't even notice either. I would much rather be downloading less and decompressing (slightly) longer. Seems like a no brainer to me.


neutral

Offline

#22 2010-03-10 12:16:15

mangus
Member
From: Bologna, Italy
Registered: 2007-04-07
Posts: 289

Re: xz (LZMA2) packages

All I have to say is...good job guys! Thank you!

Offline

#23 2010-03-10 13:04:43

bharani
Member
From: Karaikudi, India
Registered: 2009-07-12
Posts: 202

Re: xz (LZMA2) packages

Having a connection with top speed of about 40kbps i am very happy to see this feature.
Thank you devs.


Tamil is my mother tongue.

Offline

#24 2010-03-11 17:00:31

mathieui
Member
Registered: 2009-07-21
Posts: 38
Website

Re: xz (LZMA2) packages

Just one issue with those .xz packages: pacman.static does not handle them yet, afaik, so a chroot install is a bit harsh.
Without this problem, I found those great, even if I don't have a really bad connection (around 700kBps), it will save me some disk space when making a local repo smile.
My friend with a slooow netbook won't be so pleased with this, but I guess that it isn't a real issue.

Offline

#25 2010-03-11 17:02:47

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: xz (LZMA2) packages

mathieui wrote:

Just one issue with those .xz packages: pacman.static does not handle them yet, afaik, so a chroot install is a bit harsh.

i remember that the guy who maintain pacman.static submitted a feature requesting us to ship xz-utils with static lib. we did long time ago so i believe he intent to add this support.


Give what you have. To someone, it may be better than you dare to think.

Offline

Board footer

Powered by FluxBB