Operating System - Tru64 Unix
1748080 Members
5327 Online
108758 Solutions
New Discussion юеВ

'su' is too slow

 
hy_4
Advisor

'su' is too slow

Platform is ALPHA 4100.OS is True64 5.1A.I create an ORACLE9i database on the machine.The database is very normal.But when I execute su from root to oracle,it is very slow and hangs.At this time,I shutdown the database and restart it.Then I re-execute su from root to oracle,it is very fast.But some time later,the same phenomena happens again.So I have to restart the database again.What is the matter?
11 REPLIES 11
Han Pilmeyer
Esteemed Contributor

Re: 'su' is too slow

Sounds like you're doing something in a login script that hangs the command. So this is probably a "su - oracle" rather than a "su oracle", correct?

If that's the case, check the script to see what it is doing.

You could also check with "ps" from another terminal to see what's going on, e.g. has "su" already started a shell. Determine that which is the "hung" process. If you know that, you could make a stack trace of the process to see what it is doing, e.g.:

dbx -k /vmunix /dev/mem
(dbx) set $pid=
(dbx) t
(dbx) quit

Ravi_8
Honored Contributor

Re: 'su' is too slow

hi,

increase the swap space.
never give up
hy_4
Advisor

Re: 'su' is too slow

Thank you,Han.There are 2 users(qb and oracle) belonging to the group of dba.Their .profile files are same.'su - qb' is very fast.'su oracle' and 'su - oracle' are all very slow.When 'su - oracle',I use 'ps auxwww':
USER PID %CPU %MEM VSZ RSS TTY S STARTED TIME COMMAND

oracle 888012 25.9 0.0 2.45M 320K pts/6 R + 15:52:39 0:01.19 -ksh (ks
h)
The %CPU is 25.9.
When 'su - oracle' complete,and the prompt appears,I use 'ps auxwww' again:
USER PID %CPU %MEM VSZ RSS TTY S STARTED TIME COMMAND

oracle 888012 0.0 0.0 2.48M 352K pts/6 S + 15:52:39 0:01.19 -ksh (ks
h)



Erich Wimmer
Valued Contributor

Re: 'su' is too slow

What about the home directories of user "oracle" and "qb" ? May be the home-filesystem for user oracle is slower than the home for "qb", depending on the workload of the database. Are both users using the same login shell?
Possible profiles depending on the shell could be:
$HOME/.profile
$HOME/.kshrc
$HOME/.cshrc
$HOME/.login
and so on...

Erich.
hy_4
Advisor

Re: 'su' is too slow

The home directories of user "oracle" is /oracle(dsk18c) and "qb" is /qb(dsk10b).I think the filesystem has no problem.All the users use the same profile--$HOME/.profile.
I use dbx when the 'su - oracle' hangs:
#dbx -k /vmunix /dev/mem
dbx version 5.1
Type 'help' for help.

stopped at [thread_block:3230 ,0xfffffc00002eb200] Source not available

warning: Files compiled -g3: parameter values probably wrong
(dbx) set $pid=899974
(dbx) t
> 0 thread_block() ["../../../../src/kernel/kern/sched_prim.c":3230, 0xfffffc0]
(dbx) quit
What does it mean?
Michael Schulte zur Sur
Honored Contributor

Re: 'su' is too slow

Hi,

could you post .profile?

greetings,

Michael
Erich Wimmer
Valued Contributor

Re: 'su' is too slow

Please add following 2 lines to the beginning of your .profile:

ps -f
set -x

This will trace the .profile statements and processes to stdout and send the output too.
Erich.
hy_4
Advisor

Re: 'su' is too slow

I have uploaded the files.
Erich Wimmer
Valued Contributor

Re: 'su' is too slow

Hmm.. Did you have the performace problem when creating this output ?
If you had, did you notice at which point in the profile it happened, or was it before getting the trace output ?

How can the performance of su depend on oracle:

I have seen you are using a cluster. Is filesystem /oracle served by the same member as /qb (check with cfsmgr command).

Oracle makes the /oracle filesystem busy.

The system starts swapping if running oracle or makes the CPU's busy (check with vmstat - see "cpu" and "pout").

You are using NIS and oracle makes the network busy.

What is su doing (not a complete list):
Checking the calling user and the "called" user against /etc/passwd and /etc/group, reads the file /etc/sia/matrix.conf, reads the file /etc/nsswitch.conf, changing the uid and gid, writing logfiles (f. e. sialog)
spawning the shell (ksh in your case). ksh is executing /etc/profile and $HOME/profile.

Erich.