Best of Technical Support
I would like to understand what the issues are that limit the memory available to a single process under Linux.
I have an Athlon 1.2GHz processor with 1.5GB of RAM and 2GB of swap space. The OS is Red Hat 7.1 with kernel 2.4.3-12. The system sees all 1.5GB on bootup and reports as much through top and other utilities. But alas, single processes can grab no more than roughly 940MB. I'm testing the process memory limit by running a simple C program that allocates a single large char array.
—Ned Piburn, npiburn@oti.gd-ots.com
The Linux kernel has a setting on how the memory is split between the kernel and user space. It may be that your specific kernel is built to give 3GB to the kernel and 1G to user space. When you go in the kernel configuration (cd /usr/src/linux; make menuconfig), check “Processor type and features / Maximum Virtual Memory” and set it to 3GB (some patched kernels have bugs if you use 2GB).
—Marc Merlin, marc_bts@valinux.com
GNU libc uses brk() for small allocations and mmap() for larger allocations, and only about 900MB can be allocated using brk(). Many small allocations might fail where fewer large allocations would succeed. If this is the problem your code is running into, one solution would be to write a custom malloc()--either one that always allocates memory using mmap() or one that first mmap()s large chunks and then parcels out fragments within the chunks.
—Scott Maxwell, maxwell@ScottMaxwell.org
The mallopt function is covered in the GNU Info documentation for libc under “Malloc Tunable Parameters”. Set M_MMAP_THRESHOLD to force malloc() to use mmap() instead of brk().
—Don Marti, dmarti@ssc.com
I've installed SuSE 7.1 on a three-processor machine and then added a fourth processor. The OS doesn't see the new CPU. It's a Compaq dl580, x86 architecture. Do you have to recompile or do something extra to get the OS to acknowledge the new CPU?
—Chet Jaynes, cjorlb@pacbell.net
Linux should be able to detect and use the fourth processor as long as the motherboard does. Use the BIOS setup in order to make sure the system itself is enabling it.
—Mario Neto, mneto@argo.com.br
I'm currently using Red Hat Linux 6.2 with RPM-3.0.3. To upgrade from RPM-3.0.3 to RPM-4.0.2 I tried to install db3-3.1.17 as prescribed but got the error message:
rpm can only install packages with major version number <= 3
—Atul, atul_info@yahoo.com
Install the latest release of version 3 RPM, as that deals with both RPM3 and RPM4. You can get it from ftp.rpm.prg/pub.
—Keith Trollope, keith@wishing-well.demon.co.uk
My Red Hat 6.2 automatically detects the Adaptec 29160 card, and a dynamic module AIC-7xxx is added to /etc/conf.modules. But when I connect an SCSI hard drive to the card, there is no /dev/sda available for fdisk. The device file exists but cannot be accessed by fdisk. If I boot Red Hat 7.1, the SCSI disk is recognized and works. But I need to boot Red Hat 6.2 with this SCSI card. How can I make it work under Rh6.2?
—Joshua, cschen@asiaa.sinica.edu.tw
One solution would be to install your Red Hat 7.1 kernel on a Red Hat 6.2 distribution. You will also need to upgrade a few other packages like modutils.
—Marc Merlin, marc_bts@valinux.com
I had the same problem when I got my Adaptec 29160 (great card, by the way). I installed Linux on an IDE drive temporarily, got a recent 2.2 series kernel from a kernel.org mirror and built the AIC-7xxx driver into the kernel, not as a module. Then I rebooted with the new kernel and copied everything over to the SCSI drive.
—Don Marti, dmarti@ssc.com
What can I do to make a user's directory be like a root directory, where the user just has an access to that directory or subdirectory?
—Rafael, rafaelss@ig.com.br
What you need is chroot. Many FTP dæmons chroot by default. If you want Telnet (or even better, SSH) to chroot, you can make a chroot shell. For more information go to freshmeat.net/projects/jail_c.
—Ben Ford, ben@kalifornia.com
Once you jail a user in, let's say, /home/user, you'll have to make some portion of /lib and /bin available under /home/user if you want the chrooted user to be able to run any commands at all.
—Marc Merlin, marc_bts@valinux.com
Today’s modular x86 servers are compute-centric, designed as a least common denominator to support a wide range of IT workloads. Those generic, virtualized IT workloads have much different resource optimization requirements than hyperscale and cloud applications. They have resulted in a “one size fits all” enterprise IT architecture that is not optimized for a specific set of IT workloads, and especially not emerging hyperscale workloads, such as web applications, big data, and object storage. In this report, you will learn how shifting the focus from traditional compute-centric IT architectures to an innovative disaggregated fabric-based architecture can optimize and scale your data center.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
| Trying to Tame the Tablet | May 08, 2013 |
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Home, My Backup Data Center
- New Products
- Tech Tip: Really Simple HTTP Server with Python
- RSS Feeds
Enter to Win an Adafruit Prototyping Pi Plate Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Prototyping Pi Plate Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- Next winner announced on 5-21-13!
Free Webinar: Linux Backup and Recovery
Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.
In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.




25 min 24 sec ago
1 hour 23 min ago
2 hours 52 min ago
4 hours 55 sec ago
4 hours 47 min ago
5 hours 8 min ago
11 hours 23 min ago
17 hours 1 min ago
23 hours 1 min ago
23 hours 23 min ago