Consolidating multiple unix apps to linux

Posted on 2003-03-12
Medium Priority
Last Modified: 2010-05-18
I'm looking at porting and possibly consolidating multiple unix (HP-UX and Solaris) applications in order to reduce cost and simplify the environment, trouble is that I don't know much about it! Could anyone give me some words of wisdom on the following?

Is it advisable to place more than one app in a Linux instance or would it be best to keep them on different instances?
If you have multiple apps on the same instance how do (or can you) you control memory or CPU allocation other than using the nice command?

Can you run multiple instances of Linux in the same Intel box (other than using VMware or similar)? I know you can partition some midrange Unix boxes but that would defeat the purpose of the exercise.

I used to be a HP-UX administrator years ago but I've been away working on other things for the last six years or so...

Cheers Iain.
Question by:imacleod

Accepted Solution

troburn69 earned 150 total points
ID: 8120240
Here's my 2 cents on your questions...

1) More than one application on a single box?

It is hard to generalize on a broad question like this one :-).  However the best answer is of the "it depends" variety.  Any greedy application (Oracle, java app server, etc.) is going to tend to hog a lot of the CPU and more importantly the memory.  Whenever you combine applications on a box you are of course introducing contention for finite resources.  Linux's multi-tasking and VM management are good now and continue to improve so it's not impossible to run many such applications concurrently.  However you can definitely expect diminishing returns.  Benchmarking and load-testing is the best way to determine the sweet spots.  Incidentally many applications I've run (Tomcat, Apache, MySQL among others) can coexist very nicely; even under significant loads.

2) Memory or CPU allocation and restriction?

The latest kernels include a CPU-affinity option (patches also exist for older 2.4 kernels).  This is a little bit like cpubind, however my understanding is that you need to make a library call to access this functionality.  In that case the application needs to be designed to take advantage of this feature or a launching wrapper mechanism would need to handle this.  This is a relatively new linux feature, but as it becomes a standard and mature feature you can expect many applications to directly work with it.

Not so sure on the memory part...  Many applications (java for example) allow for configurable memory heap settings.  There may be a way to do this on the OS side.  

Further suggestions welcomed on this one!

3) Multiple instances on the same box?

You can certainly do this using VMWare or the like.  However the advantage of this for a production environment is uncertain.  In theory this would give you more redundancy in a server farm scenario.  However the hardware contention would become significant quickly.  I wouldn't expect this type of solution to scale well.  As you add more VMWare virtual machines you decrease the hardware timeslice for each machine.  This combined with the VMWare overhead for each VM would seem to outweigh the gains.  Remember also that the base OS becomes a single point of failure for all the VMs in this scenario; depending on your requirements this may offset the gains.

For development and/or testing purposes however I've found VMWare to be a great solution.  

Hope this helps,



Expert Comment

ID: 8122028
before this - are you sure they will run on linux?
are they source or binary?

I have been able to use linux as a development platform for aix, but I had to recompile and put in a few #ifdef's to acieve "portability"


Expert Comment

ID: 8124774
memory and cpu resource allocation: you can use *nix rlimits (resource limits) using the process's parent shell's command, whatever that may be.  For example, with ksh or bash you could use 'ulimit' to set memory limits on a child process.  You can do this with accumulated CPU time as well, but for "CPU usage" issues you really do want to use 'nice' to handle the scheduling priority.

There are also separate, portable tools that do the same thing such as DJB's "softlimit" which is part of his daemontools package.


As for the multiple instances: there is the "user-mode linux" option which runs a copy of the kernel as a userspace program, which can have its own environment.  I've never used this myself, but I believe you can run a bunch of them if you really wanted to.  Here's the URL for the project:



Author Comment

ID: 8126188
Thanks to all who contributed!

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month9 days, 3 hours left to enroll

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question