Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
x32 ABI (questions and your exprerience)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
technolog
n00b
n00b


Joined: 26 Dec 2014
Posts: 5

PostPosted: Fri Dec 26, 2014 1:30 pm    Post subject: x32 ABI (questions and your exprerience) Reply with quote

Hey,

is anyone using a pure X32 system on a daily basis? I assume there should be plenty of you, because even in 2015 even top-notch ultrabooks have just 4GB of RAM. What problems did you encounter? Is running such a system a viable, hasleless alternative?

I have heard gentoo fully supports this abi, so I conclude I can have a stable desktop using this setup, right? What are the applications that still do not compile? Is there a list of such applications and are Java and Chromium among them?

So, I understand that if there is a single application that is not compilable under X32, you need a multilib system with a normal AMD64 support. Are those additional libraries loaded into RAM lazily, e.g. when you first run such an application? Are they unloaded when you close it?

What about wine? Can wine run 64 bit applications (no 32 bit support) on a pure x32 system?



p.s.: Let's say that Chromium is the only application I'd like to run under X32 abi (since most of the time, chromium is the memory hog in my usecase). What would be a memory overhead for all x64_32 for all libraries chromium needs in total?
Back to top
View user's profile Send private message
keet
Guru
Guru


Joined: 09 Sep 2008
Posts: 529

PostPosted: Sat Dec 27, 2014 1:32 am    Post subject: Reply with quote

I run Gentoo on a Pentium IV, and I haven't noticed any problems, except that I need distcc unless I want updates to take half a week. I haven't updated it in a few months, though.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13848

PostPosted: Sat Dec 27, 2014 4:37 am    Post subject: Reply with quote

keet wrote:
I run Gentoo on a Pentium IV, and I haven't noticed any problems, except that I need distcc unless I want updates to take half a week. I haven't updated it in a few months, though.
Are you using the experimental x32 ABI on that Pentium or are you using the classic x86 ABI?

OP: I suggest you stick with amd64. Library loading is handled as usual. I would be surprised if Wine runs Win64 applications using an x32 Wine, since a Win64 application will expect to use full-sized pointers and x32 is designed to use 32-bit pointers.
Back to top
View user's profile Send private message
technolog
n00b
n00b


Joined: 26 Dec 2014
Posts: 5

PostPosted: Sat Dec 27, 2014 9:15 am    Post subject: Reply with quote

Hu,

thanks for advice. But look. Many $1000+ ultrabooks only have 4GB of ram, even novadays! Secondly, I use chromium a lot (currently 4GB ram + 3GB swap), so this would decrease by approximately 30%. So, I am looking for a few people to confirm the x32 system works OK.

1. May I ask what is the status of java (openjdk) on x32?

2. What if only chromium would run as x32? How much overhead?
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6281

PostPosted: Sat Dec 27, 2014 9:37 am    Post subject: Reply with quote

technolog wrote:
so this would decrease by approximately 30%

Where did you get this huge number from? Do you have any reliable source for this number?
I would guess, a realistic number would be about 5%, probably even less: It is only pointers which decrease by a factor of 2, and pointers usually are only the overhead for the "main" data anyway.
However, I did not any benchmarks for myself, and I did not look for benchmarks recently: Quite a while ago, when I did, the only benchmarks I found were certainly biased since done by the developers of x32. We head a thread here, where some benchmarks were made, but these turned out to be faulty - I do not remember whether the results of the "correct" benchmarks were then posted in this thread, eventually. Of course, it might be, that chromium is particularly pointer intensive, and the mentioned thread is probably much older.
Anyway, 30% appears unreasonably large to me.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sat Dec 27, 2014 12:45 pm    Post subject: Reply with quote

mv wrote:
It is only pointers which decrease by a factor of 2, and pointers usually are only the overhead for the "main" data anyway.
Not quite: (unsigned) long is half-width as well (as is size_t ofc.)
Quote:
Anyway, 30% appears unreasonably large to me.
Agreed.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7092
Location: Saint Amant, Acadiana

PostPosted: Sat Dec 27, 2014 1:12 pm    Post subject: Reply with quote

The box I use as my desktop (x86_64 multilib) has 2 GiB of RAM, MythTV frontend is running and I have plenty of RAM left to run Chromium without going swapping, multiple tabs open. Do you really run out of memory with 4 GiB?
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
technolog
n00b
n00b


Joined: 26 Dec 2014
Posts: 5

PostPosted: Sat Dec 27, 2014 3:57 pm    Post subject: Reply with quote

Chromium uses around 100MB per tab, 70MB if the site is pretty basic. So, this is a main problem.

Therefore just running chromium under x32 would be a good solution.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7092
Location: Saint Amant, Acadiana

PostPosted: Sat Dec 27, 2014 5:21 pm    Post subject: Reply with quote

OK, I have multiple apps running, including Chromium. I opened five more tabs in Chromium, additional RAM usage was 145 MB - less than 30 MB per tab. All new tabs were displaying Google search page. Then I opened BBC news front page in one of those tabs and that content added 30 MB to RAM usage making it total 60 MB for this tab. Do you think when running x32 that tab with this content would take 30% less RAM?
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5761

PostPosted: Sat Dec 27, 2014 5:24 pm    Post subject: Reply with quote

Are you counting the resident/shared mem numbers correctly? How much does your system RAM usage actually increase for a new tab?
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7972
Location: ~Brussels - Belgique

PostPosted: Sat Dec 27, 2014 5:33 pm    Post subject: Reply with quote

I am not sure X32 is better than x86_64 (amd64). I am not sure that everything has been adapted for x32, so you will end up with unoptimal code (in C in place of assembler) especially for multimedia applications.

The place used by code is really small compared to your data, don't focus on that.

If you have > 2 Go, go for true 64 bits. And for less, you chose.

My choice is : 64 bits processor => 64 bits os.
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
technolog
n00b
n00b


Joined: 26 Dec 2014
Posts: 5

PostPosted: Sat Dec 27, 2014 5:35 pm    Post subject: Reply with quote

Facebook alone (just plain home page, no scrolling) is sitting at 350MB. Gentoo forum is at 52MB. This is what chrome task manager reports (Shift + Esc). It more or less agrees with the "top" output.

I have tried to find some memory comparisons for normal 32-bit (since it should have similar memory requirement as X32) vs 64bit chrome, but found nothing. Strange.

So, I'll stay with x64. No java support (or just zerovm) support is a dealbreaker. I wish x32 would arise in 2007 as the default amd64 ABI. With propper software support (compatible C, C++ code) it could be a step forward from what windows has to offer.

I really wish we had a conclusive benchmark. Michael at Phoronix promised a benchmark of X32 debian in 2012, but he didn't make it. I have written to him.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7092
Location: Saint Amant, Acadiana

PostPosted: Sat Dec 27, 2014 6:14 pm    Post subject: Reply with quote

Viewing this page Google Task Manager tells me 44 MB. But I'm behind privoxy, it may cut off some.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sun Dec 28, 2014 9:00 pm    Post subject: Reply with quote

xaviermiller wrote:
I am not sure X32 is better than x86_64 (amd64). I am not sure that everything has been adapted for x32, so you will end up with unoptimal code (in C in place of assembler) especially for multimedia applications.

My instinctive reaction to that is: so adapt that tiny percentage of libs where it matters, which would be worth community effort.

I accept that's not so useful for your average end-user, but then I don't think any Gentoo admin is an average end-user; and there aren't that many core multimedia libs using asm, though they should ofc be higher-priority than much else apart from toolchain, since they are so critical to the end-user experience.

So while I agree with your overall recommendation, as a default response, on a deeper level Gentoo users tend to be the ones making things work in unusual situations, by comparison to most distros.
Quote:
The place used by code is really small compared to your data, don't focus on that.

Yes it is, but this is all about the amount of space the data uses, not the code.
edit: it's also about having more registers and a decent ABI.
Quote:
If you have > 2 Go, go for true 64 bits. And for less, you chose.

My choice is : 64 bits processor => 64 bits os.

Yeah though x32 requires an amd64 kernel, so we're talking 64-bit O/S already.

For avoidance of any doubt, I agree with you, and have always run full amd64 for the expanded address space. However I'd rather see that confined to kernel, as in it has a 4G x 32-bit space to place programs in, whereas the vast majority of programs don't need to have a 64-bit VM space of their own.

Not that I think x32 is ready; just that Gentoo experimenters are likely to be some of the people helping to get it ready, and that's good.


Last edited by steveL on Sun Dec 28, 2014 9:03 pm; edited 1 time in total
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sun Dec 28, 2014 9:01 pm    Post subject: Reply with quote

Jaglover wrote:
Do you think when running x32 that tab with this content would take 30% less RAM?

No, I very much doubt that.
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7972
Location: ~Brussels - Belgique

PostPosted: Sun Dec 28, 2014 9:30 pm    Post subject: Reply with quote

hi SteveL,

I tested early stages of x32, and the problem was that every asm optmization was to be rewritten to be able to address 32-bits objects within 64 bits code, and it was a real PITA. So, for many ebuilds, the optimizations were disabled in favor of C code.
And the patches are not for Gentoo, but upstreams, or the x32 project. But the x32 project is not updated since 2013, so I am afraid it's dead. https://sites.google.com/site/x32abi/system/app/pages/recentChanges

Since our guest is willing to use a desktop system, I don't recommand x32 at all.
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sun Dec 28, 2014 10:02 pm    Post subject: Reply with quote

xavier: yeah you're absolutely right wrt the OP.

Sorry for going off on a tangent. I just can't believe there's that many multimedia libs with critical asm; my impression was that practically everything came down to a few libs like ffmpeg and mplayer, and everything else was usually a glue layer or an app built on top of that. And it's really not that hard to use 32-bit registers in amd64 code (the delta is pretty minimal assuming an amd64 codebase from what I've seen), so I figured those would be taken care of (or would at least be a good focus for community effort given a power-userbase.)

Hmm though that is with nasm, which is light-years ahead of gas for an asm-coder; gas is more targeted at gcc integration, and feels like it's written from a compiler-writer's pov, to me.
Back to top
View user's profile Send private message
technolog
n00b
n00b


Joined: 26 Dec 2014
Posts: 5

PostPosted: Sun Jan 04, 2015 8:03 am    Post subject: Reply with quote

Many of you have dis-advised me to use x32 for a desktop. I will listen to this advice, but can I ask what will happen if I don't (except no Java support)?
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5761

PostPosted: Sun Jan 04, 2015 9:07 pm    Post subject: Reply with quote

Keep in mind that if you have e.g. two GTK programs running under different ABIs, the overhead will be significantly larger than if they were e.g. GTK and Qt with the same ABI, because no resource sharing can take place.

If you really want the theoretical efficiency x32 offers, it's very much an all-or-nothing deal - otherwise you may as well just be using a hundred CFLAGS.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6281

PostPosted: Mon Jan 05, 2015 3:18 pm    Post subject: Reply with quote

technolog wrote:
but can I ask what will happen if I don't (except no Java support)?

I am not sure about "no Java support": It might be that icedtea compiles (or will compile in some releases).
I would guess that you can get to a similar system than with amd64, though with much more headache and perhaps less stable (since less tested by upstream), and not much actual saving of RAM: I would not expect too much trouble, but not many advantages, either. And in case that you suddenly need e.g. a huge file you are in real self-made trouble....
Back to top
View user's profile Send private message
Holysword
l33t
l33t


Joined: 19 Nov 2006
Posts: 946
Location: Greece

PostPosted: Fri Mar 13, 2015 3:30 pm    Post subject: Reply with quote

Quick question here though (I didn't want to create a thread just for that)
Is ABI_X86=32 conflicting with x32? Should I pick only one or both is fine?
Btw, steam overlay seems to just not work well with ABI flags, it keeps trying to pull in emul packages.
_________________
"Nolite arbitrari quia venerim mittere pacem in terram non veni pacem mittere sed gladium" (Yeshua Ha Mashiach)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum