Tag Info

Hot answers tagged

42

Yes, theres a very plausible way to do this with device mapper. The device mapper can recombine block devices into a new mapping/order of your choosing. LVM does this. It also supports other targets, (some which are quite novel) like 'flakey' to simiulate a failing disk and 'error' to simulate failed regions of disk. One can construct a device which ...


17

Setting overcommit_ratio to 80 is likely not the right action. Setting the value to anything less than 100 is almost always incorrect. The reason for this is that linux applications allocate more than they really need. Say they allocate 8kb to store a couple character string of text. Well thats several KB unused right there. Applications do this a lot, and ...


12

For checking program's robustness in case their output fails, you can use the pseudodevice /dev/full, which always returns "ENOSPACE" when written to. $ dd if=/dev/zero of=/dev/full dd: writing to `/dev/full': No space left on device 1+0 records in 0+0 records out


11

This is due to counterintuitive byte order in /proc/net/tcp6. The address is handled as four words consisting of four bytes each. In each of those four words the four bytes are written backwards. This is probably due to endianness differences. Most PCs these days use IA32 or AMD64 which are using the opposite endianness from what IP was designed with. I ...


10

Windows patches can patch any part of the Windows distribution, including kernel, system tools, and user tools. Linux patches can patch any part of a Linux distribution, which can include kernel, system tools, and user tools. Linux kernel patches are a subset of 'Linux patches'.


9

Provided you have a distro that supports the dir_index capability then you can easily have 200,000 files in a single directory. I'd keep it at about 25,000 though, just to be safe. Without dir_index, try to keep it at 5,000.


9

Some routers will allow for multicast traffic to be tunnelled across IP network links. Both ends of the tunnel will have to be configured accordingly. Cisco in particular supports tunneling multicast traffic over GRE links. Here's an in article about how to achieve that Cisco


9

In Debian/Ubuntu, grub.cfg is fully generated by scripts and any manual changes made to it will be clobbered. In RHEL/CentOS however, grub.cfg is modified by scripts but manual changes are persisted, and is actually the canonical location for certain settings. The tool which manages grub.cfg is grubby, which is called by /sbin/new-kernel-pkg when kernels ...


9

I know of only 2 cgroups related to network, net_prio (set the priority of network traffic) and net_cls (tags packets to allow identification by Linux tc). net_prio has been introduced in Linux Kernel 3.3, so it is normal that you do not see it in Ubuntu LTS 12.04 unless you installed the LTS hardware enablement stack (which gets you a Linux Kernel 3.5), ...


9

With your backup tapes. Unix does not protect you from doing bad things. You specified the recursive & force flags, it assumed you knew what that would mean, and did what you asked. If the data is important power the machine off immediately (seriously, rip the plug out of the wall before the operating system writes something in that "free" space and ...


8

Be VERY careful how you select the directory split. "a/b/c" sounds like a recipe for disaster to me... Do not just blindly go making a several directory deep structure, say 100 entries in the first level, 100 entries in the second level, 100 entries in the third. I've been there, done that, got the jacket and had to restructure it when performance went in ...


8

Nope, you can't; it is hardcoded in the kernel. So change the kernel and recompile. #define TCP_TIMEOUT_INIT ((unsigned)(3*HZ)) /* RFC 1122 initial RTO value */ This is what you should get in your include/net/tcp.h. But I can see someone provided a patch, even though never tried it myself


8

Section 9.6 "Overcommit and OOM" in the doc that @dunxd mentions is particularly graphic on the dangers of allowing overcommit. However, the 80 looked interesting to me as well, so I conducted a few tests. What I found is that the overcommit_ratio affects the total RAM available to ALL processes. Root processes don't seem to be treated differently from ...


8

Normally, linux will clear cache for you application. What you can do is exclude your application from OOM killer. OOM killer will not terminate your application then. echo -17 > /proc/PID/oom_adj PID should be the PID of your program.


7

I am answering to the linux tag. My answer is specific only to Linux. Yes, huge pages are more prone to fragmentation. There are two views of memory, the one your process gets (virtual) and the one the kernel manages (real). The larger any page, the more difficult it's going to be to group (and keep it with) its neighbors, especially when your service is ...


7

Each compiled/installed kernel image is built for one specific microprocessor (or microprocessor family usually). The source code is partly hardware-independent (= many drivers, schedulers, ...) and partly platform specific (= low-level interaction with hardware, ...), but the resulting binary is always specific for one architecture.


7

I'm guessing you mean incoming connections (the INPUT chain), and not forwarded ones (as in a router). Also I take postfix means just SMTP (25). iptables -P INPUT ACCEPT iptables -F INPUT for port in 21 22 25 80 3306 do iptables -A INPUT -p tcp --dport $port -j ACCEPT done iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A ...


7

OK, so lets go through each bit. Active memory is regions of memory that get thrown to the top of the LRU stack (basically get called a lot). Inactive memory is stuff thats not being used a lot and is a swap nomination should memory need to be swapped. Free is genuinely free memory About 40Mb. What gives? The clue is in these lines: DMA: 2358*4kB ...


6

flush processes are responsible for managing writeback of dirty pages to the filesystem they came from. They should never take up much CPU; most of their time is spent waiting for disk (or network for NFS and the like). If you're seeing high CPU usage from a flush process, it might be a kernel bug - try rebooting, this should clear the state.


6

VMware Tools should be installed and upgraded to be able to enable some features and to install the paravirtualization drivers that will improve the speed of the VM. I recommend to install and upgrade them religiously especially if you overcommit your hardware (CPU or memory). If you do not want the overhead of upgrading the VMware Tools, may be Linux ...


6

This action goes against the purpose of Red Hat Enterprise Linux (and thus, CentOS). These enterprise distributions are meant to maintain stable minor versions of the kernel and core packages (glibc, gcc, etc.) in order to provide a stable platform throughout the supported lifecycle of the distribution. That means that installing a much newer kernel would ...


6

Top (at least in some versions) calculates SWAP per process as VIRT - RSS instead of reporting real swap usage. Under Linux the result is a completely meaningless number.


6

You cannot run your own kernel on a VPS using OpenVZ. You would have to upgrade from OVH's VPS Classic service to their VPS Cloud service, which runs VMware and would allow you to run a customised kernel.


5

I would suggest you try testing various directory sizes with a benchmarking tool such as postmark, because there are a lot of variables like cache size (both in the OS and in the disk subsystem) that depend on your particular environment. My personal rule of thumb is to aim for a directory size of <= 20k files, although I've seen relatively decent ...


5

KSplice was a novel piece of code and nothing similar has been written for Linux. While it possible (and probable) that somebody can fork the old open source code and continue development, there are presently no alternative pieces of software in distribution for hot patching a running Linux kernel.


5

/etc/security/limits.conf file is processed by the pam_limits PAM module and is used to assign resource limits for a user session. These will be applied only when PAM and the pam_limits module is used during the session setup. In your system the su utility may be not configured to use the pam_limits module (see the /etc/pam.d/su.conf file) or uses it only ...


5

If you really must, you can get newer kernels from ElRepo but once you do this you're on your own so to speak. You will be outside of the normal EL support channels and may not be able to get security and bug fixes etc.


5

This enables you to get the kernel configuration, with which your kernel was compiled. Usually you use it, if you want to build a new kernel, but you don't have the actual configuration of your running kernel. See Linux Kernel Configuration Why you want to change it? Normally you can't, it should be read only from userspace view. By the way, all files ...


5

It looks like you already have the most up-to-date kernel kernel-2.6.32-431.20.3.el6.x86_64 on your system so yum is correct in that there is nothing to do. However this kernel is not active. uname -r 2.6.32-358.11.1.el6.x86_64 You will need to reboot your system to make it active.


4

No, they won't. After rebooting, you begin from scratch. Normally, for modules that you want loaded after every reboot, there's a configuration file listing modules to be auto-loaded at boot time. Look at /etc/modules. man modules: NAME /etc/modules - kernel modules to load at boot time DESCRIPTION The /etc/modules file contains the names of ...



Only top voted, non community-wiki answers of a minimum length are eligible