?
Solved

Consolidating multiple unix apps to linux

Posted on 2003-03-12
4
Medium Priority
?
251 Views
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.
0
Comment
Question by:imacleod
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 

Accepted Solution

by:
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,

-A



0
 
LVL 1

Expert Comment

by:arn0ld
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"



0
 
LVL 2

Expert Comment

by:jimbb
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.

http://cr.yp.to/daemontools.html

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:

http://user-mode-linux.sourceforge.net/

HTH.
0
 

Author Comment

by:imacleod
ID: 8126188
Thanks to all who contributed!
Cheers
Iain.
0

Featured Post

Industry Leaders: 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.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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ā€¦
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month9 days, 9 hours left to enroll

762 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