You are not logged in.

#1 2013-02-17 04:26:35

smsware
Member
From: Szczecin, Poland
Registered: 2012-08-14
Posts: 149
Website

[SOLVED] Understanding chroot (from efficiency point of view)

I have 64-bit system and another, 32-bit system for some applications like Wine (games and spotify) or Skype; I don't really like using [multilib] as I end up with cluttered system. I'm using this 32-bit system via chroot but left myself the possibility to boot into it directly (I've never did that, though). I'm using this solution for some time now and everything's fine but there are aspects I don't understand:

2.
(a) Is using application via chroot more system-demanding (slower) than booting into "chroot system" and running it directly? Let's say that they are configured the same and have same DE.
(b) if not: is there any gain from having 64-bit system running 32-bit system in matter of having 64-bit processor, in comparison to running 32-bit system directly? I mean, can chrooted system be tricked to think that my processor is more efficient (as it's in fact 64-bit)?

3. How using [multilib] to run 32-bit application compare to chrooting into 32-bit system or to running 32-bit system (in matter of efficiency)?

1.
(a) What drivers are used while chrootning? Main root or chroot ones? Do they have to be the same? I have Intel graphics so there are no options in the matter for me but what about people who would like to have propetiary drivers on chroot (for games) and open drivers on main system (for stability)?
(b) What configuration files are used? E.g. if I have SNA/UXA acceleration methods to choose between - does the method depend on root or chroot configuration file? Can I have e.g. UXA for main system and SNA for chroot (I doubt it but it's better to ask)?

Last edited by smsware (2013-02-17 19:16:22)

Offline

#2 2013-02-17 06:52:13

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] Understanding chroot (from efficiency point of view)

From what I understand, you are essentially running from the main system still. Sure, it is like its own system and you are able to launch code from a separated environment. But consider the fact that the "two" systems are sharing the /sys, /proc, /dev, etc and that for the chroot, all of those temporary filesystems are r/o.

Offline

#3 2013-02-17 07:56:42

smsware
Member
From: Szczecin, Poland
Registered: 2012-08-14
Posts: 149
Website

Re: [SOLVED] Understanding chroot (from efficiency point of view)

WonderWoofy, thank you for answering my 1st question but I'm just too of a noob to fully get it. Configuration files are in /etc which is not shared but as /dev is shared and there everything resolves - configuration itself is keept, right? Just like network configuration, graphics drivers are running there so that's why I need the same drivers on chroot and root; configuration files of chroot system (like X.Org configuration files) will be ignored. Did I got it right?

So, I guess the 1st question can be marked as solved - thank you again. Still, there are 2nd and 3rd left:

2.
(a) Is using application via chroot more system-demanding (slower) than booting into "chroot system" and running it directly? Let's say that they are configured the same and have same DE.
(b) if not: is there any gain from having 64-bit system running 32-bit system in matter of having 64-bit processor, in comparison to running 32-bit system directly? I mean, can chrooted system be tricked to think that my processor is more efficient (as it's in fact 64-bit)?

3. How using [multilib] to run 32-bit application compare to chrooting into 32-bit system or to running 32-bit system (in matter of efficiency)?

Last edited by smsware (2013-02-17 08:01:32)

Offline

#4 2013-02-17 12:17:53

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: [SOLVED] Understanding chroot (from efficiency point of view)

smsware please mark the whole thread [SOLVED] instead of merely mentioning this in your post. Edit the title of this first post accordingly.


To know or not to know ...
... the questions remain forever.

Offline

#5 2013-02-17 16:01:15

smsware
Member
From: Szczecin, Poland
Registered: 2012-08-14
Posts: 149
Website

Re: [SOLVED] Understanding chroot (from efficiency point of view)

bernarcher wrote:

smsware please mark the whole thread [SOLVED] instead of merely mentioning this in your post. Edit the title of this first post accordingly.

The thread is not solved. Only one matter was solved. See the quotation in my 2nd post and the change of questions' order in my 1st post... I coudn't make it any more clear. tongue

Last edited by smsware (2013-02-17 16:01:46)

Offline

#6 2013-02-17 16:52:12

z0id
Member
From: Romania
Registered: 2010-02-02
Posts: 122

Re: [SOLVED] Understanding chroot (from efficiency point of view)

I don't think there's really any difference between using [multilib] and a 32-bit chroot, except the libraries/files are in different locations. I'm not absolutely sure, though.

Last edited by z0id (2013-02-17 16:53:37)


/usr/bin/drinking

Offline

#7 2013-02-17 17:05:26

smsware
Member
From: Szczecin, Poland
Registered: 2012-08-14
Posts: 149
Website

Re: [SOLVED] Understanding chroot (from efficiency point of view)

z0id wrote:

I don't think there's really any difference between using [multilib] and a 32-bit chroot, except the libraries/files are in different locations. I'm not absolutely sure, though.

So there is also no difference between [multilb] and using native 32-bit system, right?

It should then mean that there are no cons of having only base system installed and operate fully via chroot in order to have clean and easy to replace system?

Last edited by smsware (2013-02-17 17:17:34)

Offline

#8 2013-02-17 18:13:16

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED] Understanding chroot (from efficiency point of view)

I use multilingual because it is super convenient. I only use a few packages for android-sdk though.

Oh and I think you misinterpreted what I wrote above. I meant etc. not /etc. So etc. as in any other temporary filesystems included. I am not sure if you just always use arch-chroot or what, but if you do it manually by mounting /sys, /proc, /dev, /dev/pts then actually use chroot, then you will kind of see what I am talking about. The /sys filesystem is where stuff relating to modules is kept. Thus, you can change parameters of the modules by echo-ing values into files there. With a simple chroot, you are entering an alternate environment, but you are still booted from the kernel of the host system. If you want to actually use an alternate kernel and modules, you need to be looking into a hypervisor (virtualization).

I think the only reason I would ever use a 32 bit chroot would be for an clean building environment. The devs have done a great job supplying a 32 bit compatibility repo so you might as well use it. Of course, that's up to you.


Edit: keep in mind that this is probably information that could be found using the Google. But I think your last two questions are essentially the same. Though a chroot is not as resource costly as full virtualization, you have to consider that you are asking your system to run the chroot as well as the applications inside of it, whereas with multilib, it is in the native environment. Though I don't think that a chroot is too resource hungry, it still is not nothing...

Last edited by WonderWoofy (2013-02-17 18:18:19)

Offline

#9 2013-02-17 19:16:00

smsware
Member
From: Szczecin, Poland
Registered: 2012-08-14
Posts: 149
Website

Re: [SOLVED] Understanding chroot (from efficiency point of view)

I coudn't find relevant information with Google: what I only found is that virtualization is slower than chrooting which is kinda obvious. I believe that the answers for my questions could be found by understanding how everything's work so there was no need for anyone to do simple comparison - anyone capable of doung so thought it's obvious. Your edit answered my question but I think I will just install some benchmark (like resource-hungry game) via [multilib] on 64-bit system and on 32-bit system (and run it directly and later - via schroot) to find out myself. If my resarch would show that it's anything more than 1-2 frames per second - I will share it here. Thanks for help!

Last edited by smsware (2013-02-17 19:16:57)

Offline

#10 2013-02-17 19:53:51

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

Re: [SOLVED] Understanding chroot (from efficiency point of view)

There is no emulation involved; neither in using multilb nor a 32bit chroot. Both van be executed nativly by the CPU. There is no real overhead here. The multilib solution is easier to maintain and needs less disk space. They might even perform better due to more optimizations we can enable on x86_64 CPUs.

Offline

#11 2013-02-17 22:16:47

smsware
Member
From: Szczecin, Poland
Registered: 2012-08-14
Posts: 149
Website

Re: [SOLVED] Understanding chroot (from efficiency point of view)

Pierre wrote:

There is no emulation involved; neither in using multilb nor a 32bit chroot. Both van be executed nativly by the CPU. There is no real overhead here. The multilib solution is easier to maintain and needs less disk space. They might even perform better due to more optimizations we can enable on x86_64 CPUs.

Thanks for lighting it up.

Offline

Board footer

Powered by FluxBB