Operating System - HP-UX
1836681 Members
2803 Online
110108 Solutions
New Discussion

Re: lpsched and swapper problems

 
SOLVED
Go to solution
Oscar Garcia
Regular Advisor

lpsched and swapper problems

Hi everybody!

I am experiencing some nasty problems with our L-Class server (1 cpu) with 3Gb of memory, running 11i and oracle 8.1.7.4.
A week ago it was added a remote printer hosted in a win2000 box. The printer was using an lpd server from Esker Tun that did not work and it was changed for the standard Win lpd server. Then we were enable to print but after a while the printer got the disable status, after enabled it works for a while and gets disable or just get stuck until somebody does the disable/enable trick.
The PHCO_30431 was applied thinking something was really wrong with the lpsched. But things did not improved.
Now our dba is blaming the printing for slowing down the machine, increasing the load in the CPU. Another guy is telling me we are pushing to hard with 100 printers in the system.
I do not agree with them and I am trying to replace that remote lpd server for something decent. A point in their cause is that I have seen in the top list of processes the lpsched with more than 10% of load and a hell of acumulated time in the cpu. This happens once per day usually in the late night/early morning.
Also I have seen the process swapper permanently listed in the top with %CPU around 1.50 is this normal?

Do I need to patch my system to the latest level?

Thanks in advance for all your comments.
16 REPLIES 16
Stephen Keane
Honored Contributor

Re: lpsched and swapper problems

Having swapper in the top list of processes isn't that unusual. I'd run vmstat (or glance if you have it) over a period of time and check out the pi/po columns (in vmstat) to see how much work the swapper is actually doing. How big is your swap, just as a matter of interest?
RAC_1
Honored Contributor

Re: lpsched and swapper problems

When swapper is running, that means, the server is swapping. What kind of a bottleneck do you experience. start glance and check.

For printing, how many printers are defined on this server?? When this printer stops responding, do see something in log file (/var/adm/lp/log)

Anil
There is no substitute to HARDWORK
Oscar Garcia
Regular Advisor

Re: lpsched and swapper problems

Stephen,

I am attaching a file executing vmstat -S 15 and the swapinfo. I do not have glance, but I hope sar and the other tools will help.
Stephen Keane
Honored Contributor

Re: lpsched and swapper problems

Is the output from vmstat taken when the system was showing the symptoms you describe? The activity reported looks fairly normal, not a log of page faults or page-in/page-out activity. Maybe you could run vmstat or sar (-b) overnight when the problems usually occur and capture the output in a file? Unless you can blag a copy of glance of course :)

It's not unusual to see swapper in the top list, but it usually show state 'sleep'. What is unusual is if it is running all the time.

What are your buffer cache settings, just as a matter of interest?

# kmtune -q dbc_min_pct
# kmtune -q dbc_max_pct
Oscar Garcia
Regular Advisor

Re: lpsched and swapper problems

Anil,

We just experienced a pick load in the system around 13 o more.

About the printer we have 103 defined printers, 29 of them network printers. I can not see any error message in the /var/adm/lp/log file. The latest thing is that the jobs queue and the status of the printer says busy but nothing is printed out. So you disable and enable the printer and the first job is gone, so you have to do it manually for the rest of jobs.
RAC_1
Honored Contributor

Re: lpsched and swapper problems

Next time, when you ave problem, do lpshut and start with lpsched -v. Hope that gives something in log file. A heavily loaded system (cpu, memory etc) can cause slowness with printing also.
There is no substitute to HARDWORK
Stephen Keane
Honored Contributor

Re: lpsched and swapper problems

When a printer stops responding, is it usually a networked printer, a local printer or fairly random?

You might want to run lanadmin (lan->display) and check you're not getting excessive errors or collisions. Just a thought.

Oscar Garcia
Regular Advisor

Re: lpsched and swapper problems

Stephen,

The dbc_max_pct is 50 and
the dbc_min_pct is 5.

I read in other thread that dbs_max_pct should be 10 but I did not want to change them before being 100% sure. Moreover it means downtime, and I have to inform the users quite in advance.
Stephen Keane
Honored Contributor

Re: lpsched and swapper problems

Oscar, I was more worried about it being too low than too high! If you were running out of memory, you could always increase your swap, but until we get some vmstat/sar output when the problem is actually occurring, it's difficult to see whether you are actually running out of memory.
Oscar Garcia
Regular Advisor

Re: lpsched and swapper problems

I have again the problem with the scheduler:

Memory: 1317020K (428460K) real, 2375304K (1116396K) virtual, 33200K free Page3 1/22 TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND ? 5 397 lp 236 20 276K 284K run 564:09 64.14 64.03 lpsched

Before restating it with lpsched -v I had a look in /var/adm/lp/log and I found a lot of entries starting with FIFO:
FIFO: NCTS94: p enabled not busy /dev/null
FIFO: nippon_man_p1: p enabled not busy /dev/null

I am attaching the file so we have a better look.

Florian Heigl (new acc)
Honored Contributor

Re: lpsched and swapper problems

Just a small hint towards swapper / lpsched:
If possible, try to have primary swap and /var/spool/lp/request on different physical disks to avoid overloading the disk when a windows user prints out his 100MB power point presentation.
yesterday I stood at the edge. Today I'm one step ahead.
Bill Hassell
Honored Contributor

Re: lpsched and swapper problems

I would check whether the lp processes that are consuming CPU time and the disabled printers are all pointing to lpd servers. You risk a lot of failure modes by trying to hook incompatible system together (Windows and Unix). This is where LAN-based printers (specifically, HP JetDirect interfaces) simplify the entire process. Rather than depending on patch levels and virus problems in the Windows server, you talk direct to the printer from HP-UX. And you gain a huge number of lp options that are not available in remote print servers (see man net_ljx000)

Note that WAN printing, whether direct to JetDirect or remote lpd servers, is subject to WAN difficulties (line turnaround time, retransmissions, etc) so you may also want to quantify the problems printers as to the type of link (and associated rotuters between HP-UX and the printers).


Bill Hassell, sysadmin
Oscar Garcia
Regular Advisor

Re: lpsched and swapper problems

Bill,

I am again having the problem with the printers being disabled. The load of the system it is normal (around 4) and nothing unusual seems to be consuming CPU. I believe these two problems are unrelated.

You are quite right about your comments with lpd servers. We suggest to users to buy hp printers or to buy the jetdirect cards. But as you may know some of them are reluctant to buy new hardware.

I wanted to know if there is a way to check if there is a comms problem or a lpd server problem...
Bill Hassell
Honored Contributor
Solution

Re: lpsched and swapper problems

Unfortunately, there's not a lot you can do to place the blame except to trace the connection. nettl can be used but it is very cyrptic to to use. I'd get a copy of Ethereal and WinPcap for a reasonably fast PC (1Ghz or faster). Etheral is available from: http://www.ethereal.com/ and WinPcap from: http://winpcap.polito.it/

Ethereal is quite cool in thta it will format nettl output from HP-UX (along with many other formats). You'll probably need RFC 515 ( http://www.faqs.org/rfcs/rfc1179.html ) to find any protocol violations. Make sure that *ALL* of your remote printer server connections are marked as BSD (see SAM or lpadmin man page). Without BSD checked, the print job number will be too long (4 digits) for the remote servers.


Bill Hassell, sysadmin
Oscar Garcia
Regular Advisor

Re: lpsched and swapper problems

Funny enough Bill, the printers were created with the BSD flag. I have recreated the printers and changed the BSD flag and they have been working without problem, so far so good.

I am going to download the Ethereal, which seems to be a nice tool to have around.

I am closing this thread. Thanks to all of you.
Oscar Garcia
Regular Advisor

Re: lpsched and swapper problems

I removed the printers and create them again without the BSD option.