mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-15 14:16:14 -06:00
[GH-ISSUE #1539] New namespace setup time #1025
Labels
No labels
LTS merge
LTS merge
bug
bug
converted-to-discussion
doc-todo
documentation
duplicate
enhancement
file-transfer
firecfg
firejail-in-firejail
firetools
graphics
help wanted
information_old
installation
invalid
modif
moved
needinfo
networking
notabug
notourbug
old-version
overlayfs
packaging
profile-request
pull-request
question
question_old
removal
runtime-permissions
sandbox-ipc
security
stale
wiki
wiki
wontfix
wordpress
workaround
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/firejail#1025
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jsm09a on GitHub (Sep 7, 2017).
Original GitHub issue: https://github.com/netblue30/firejail/issues/1539
I have just deployed FireJail 0.9.48 and XPRA 2.03 on a new Debian Stretch (9.1) workstation install.
As shown by the following timings to launch a new FireFox instance, guarding against keystroke logging seems to be quite time consuming. These are repeated launches so that everything possible is already cached in memory (3.4 GHz Xeon with 32 GB ECC):
Native launch: 1.03 seconds
firejail firefox: 1.71 seconds
firejail --net firefox: 4.34 seconds !
firejail --x11=xpra: 4.55 seconds
firejail --x11=xpra --net=br0: 6.30 seconds :(
The XPRA setup time is unfortunate, but somewhat understandable in that a 276MB shared mmap buffer is set up, ... among other things.
But the time to set up a new Network Name Space seems somewhat excessive (to me ;). Is there anything that can be done to optimize the launch time for these configurations ?
Thanks, Scott.
@Ferroin commented on GitHub (Sep 8, 2017):
I've never done any profiling myself, but I would not be surprised if at least part of that time is overhead in the kernel. There's actually a reasonable amount of allocation involved in setting up any type of namespace in the kernel (except possibly a UTS namespace), and of the various types, a net namespace is probably the most expensive to set up.
Part of it is probably also setup overhead to configure the network inside the namespace.
@ghost commented on GitHub (Sep 8, 2017):
You can try to reconfigure xpra by disabling some options not needed when it runs on local machine. Read logs for more info.
@netblue30 commented on GitHub (Sep 14, 2017):
This is bad! It should be in tens of milliseconds. Grab firejail version 0.9.50 and run a simple bash session. I am printing up the startup time for the sandbox:
53.ms for the sandbox itself. A sandbox with a network namespace will add one more second:
@ghost commented on GitHub (Sep 16, 2017):
@netblue30 I believe that "Native launch" means it starts without firejail. Firejail adds 1.71-1.03=0.68 seconds which is quite similar to your results.
@netblue30 commented on GitHub (Sep 18, 2017):
I was expecting one second more for --net version. Could this be coming from DNS? Let's keep an eye on it.