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
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
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
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| 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 |
- Designing Electronics with Linux
- New Products
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Dynamic DNS—an Object Lesson in Problem Solving
- Using Salt Stack and Vagrant for Drupal Development
- Linux Systems Administrator
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Web & UI Developer (JavaScript & j Query)
Enter to Win an Adafruit Pi Cobbler Breakout 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 Pi Cobbler Breakout 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
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Featured Jobs
| Linux Systems Administrator | Houston and Austin, Texas | Host Gator |
| Senior Perl Developer | Austin, Texas | Host Gator |
| Technical Support Rep | Houston and Austin, Texas | Host Gator |
| UX Designer | Austin, Texas | Host Gator |
| Web & UI Developer (JavaScript & j Query) | Austin, Texas | Host Gator |
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




55 min 23 sec ago
1 hour 29 min ago
2 hours 27 min ago
3 hours 18 min ago
7 hours 20 min ago
11 hours 7 min ago
11 hours 15 min ago
13 hours 29 min ago
15 hours 59 min ago
1 day 2 hours ago