When to compress with upx?

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
User avatar
papaschtroumpf
Posts: 250
Joined: Fri 17 Jun 2005, 04:23

When to compress with upx?

#1 Post by papaschtroumpf »

upx does a great job at compressing executables but I'm not 100% sure in what situations it is appropriate to use it.
If everything in /usr is part of a cram_fs filesystem then it's probably not worth compressing any executable in /usr right?

Is everything else not compressed? so should everything in /bin, /sbin be compressed?

If something is on a compressed filesystem (in the cram_fs), using upx will only slow the program down right? (since it needs uncompressed before running, no matter how fast that is).

Are there other instances when using upx is not appropriate, like maybe something that needs to be ran often so it would get loaded and decompressed a lot? (would a upx'ed application that is called 4 times in a row be decompressed 4 times or would it somehow be cached?)

what about stuff in /root? (like my-applications)

I want to make the most of my available space (disk and RAM)
Mandriva LE 2005 user and puppy newbie

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#2 Post by BarryK »

Yes, you can compress executables in /bin and /sbin, but they're all pretty small in there anyway. The only reason I have done it is because the initial ramdisk size was chosen to be 11264K, as small as possible.

But /usr is of course separate, already compressed.

/root is also separate, usually, as it is the pupxxx file mounted on /root -- and that it initially 256M.
You can compress executables in /root, but if it is on hard drive, it's easy enough to increase the size of the pupxxx file.
Flash memory is a different story, as there is usually much more limited space.

Regarding slowdown of upx compressed files, it is only at startup, and I can't see any difference, but then I've only tried upx on very small apps so far.

Post Reply