Does AppArmor decrease the system performance? I have a slow system (900 MHz CPU) which has AppArmor because it was installed by default I would like to know if it become faster if I remove it, security is less important than performance on that system.
Of course, it slows down your system. To which extent depends on what your applications do. File system accesses are slower (because they have to be checked) and all the other things that can be configured. But if a process does not open files or sockets and so on then it should not be affected at all (after initialization).
I just had a short look at my favorite search engine (why didn't you?) and the result is that the impact is irrelevant in most cases.
It depends on what your program does: how often does it access files, how often does it spawn new programs, how long does it run,... AppArmor is build using the [LSM]1 interface, which checks every system call. AppArmor may have an access cache to speed up recurring file accesses or subsequent requests to an already open file from the same process, but the most noticeable overhead is during the initialization (a program's profile has to be loaded, and some context initialization must take place). If you are in the mood for a somehow impractical judgement of worst cases, the following is a figure comparing AppArmor to DAC (the traditional permission model) during a study on some other LSM-based framework (CMCAP-Linux). The system was a Linux 4.4.6 booted on an Intel Core2 Duo E8400 running at 3GHz with 8GB of RAM. The micro-benchmark consisted of 10 averaged runs (in tight loops) of 10 million operations for the open+close test, and 10 thousands for the 2 others. No one spawns programs at such a high rate in real life, but you get my point.