Re: lpt0 printer slows system response significantly

2006-11-02 Thread Anton Shterenlikht
On Fri, Nov 03, 2006 at 03:03:21AM +1100, Ian Smith wrote:
> On Wed, 1 Nov 2006 Anton Shterenlikht wrote:
>  > On Wed, Nov 01, 2006 at 10:49:36AM -0500, Lowell Gilbert wrote:
>  > >  * Change the printer port to polled mode.  ["lptcontrol -p"]
>  > >With this kind of hardware, it may even speed up your printing as 
> well.
>  >Thanks a lot, I think it does print a bit faster. But more
>  > importantly I see virtually no performance degradation during
>  > printing.
>  > 
>  >On slower machines using interrupt mode might cause
>  >significant degradation of the overall system perfor-
>  >mance due to the interrupt service using most of the
>  >CPU time. On such machines changing to polled mode
>  >will balance the CPU load as well as result in
>  >faster printing.
>  > 
> 
> I'm not sure if that's generally true for slower machines; you haven't
> said (or I missed) what sort of printer you're using, what filters you
> run via printcap, and such?  Not one covered by the existing para?
> 
> I have a 1500c, bit faster than your 1700 @300MHz, that has printed lots
> of large files via gs without ever seeing any significant irq 7 load nor
> any slowdown of the machine at all - albeit using a slow old printer. 
> 
> Not that I see any problem with your proposed addition.  Perhaps 'On
> some slower machines running fast printers using interrupt mode ..' ? 
> 
> Cheers, Ian

That's interesting.
I use lj2100 with apsfilter via printcap.

aps1|lp|laserjet;r=1200x1200;q=medium;c=gray;p=a4;m=auto:\
:lp=/dev/lpt0:\
:if=/usr/local/etc/apsfilter/basedir/bin/apsfilter:\

thanks
anton

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: lpt0 printer slows system response significantly

2006-11-02 Thread Ian Smith
On Wed, 1 Nov 2006 Anton Shterenlikht wrote:
 > On Wed, Nov 01, 2006 at 10:49:36AM -0500, Lowell Gilbert wrote:
 > >  * Change the printer port to polled mode.  ["lptcontrol -p"]
 > >With this kind of hardware, it may even speed up your printing as well.
 > 
 >  Thanks a lot, I think it does print a bit faster. But more
 > importantly I see virtually no performance degradation during
 > printing.
 > 
 >  Perhaps a sentence on this should be added in section
 > 9.3.1.3 (Setting the Communication Mode for the Parallel Port) of
 > the user manual somewhere in the end of this pararaph:
 > 
 >  The interrupt-driven method is usually somewhat
 >  faster but uses up a precious IRQ line. Some newer
 >  HP printers are claimed not to work correctly in
 >  interrupt mode, apparently due to some (not yet
 >  exactly understood) timing problem. These printers
 >  need polled mode. You should use whichever one works.
 >  Some printers will work in both modes, but are
 >  painfully slow in interrupt mode.
 > 
 > and then add something like:
 > 
 >  On slower machines using interrupt mode might cause
 >  significant degradation of the overall system perfor-
 >  mance due to the interrupt service using most of the
 >  CPU time. On such machines changing to polled mode
 >  will balance the CPU load as well as result in
 >  faster printing.
 > 
 >  Perhaps I should send a message to the documentation
 > list?
 > 
 > anton

I'm not sure if that's generally true for slower machines; you haven't
said (or I missed) what sort of printer you're using, what filters you
run via printcap, and such?  Not one covered by the existing para?

I have a 1500c, bit faster than your 1700 @300MHz, that has printed lots
of large files via gs without ever seeing any significant irq 7 load nor
any slowdown of the machine at all - albeit using a slow old printer. 

Not that I see any problem with your proposed addition.  Perhaps 'On
some slower machines running fast printers using interrupt mode ..' ? 

Cheers, Ian

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: lpt0 printer slows system response significantly

2006-11-01 Thread Ted Mittelstaedt
You can also get a faster CPU, more cycles available for servicing
interrupts.

Ted

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: 
Sent: Wednesday, November 01, 2006 12:02 AM
Subject: Re: lpt0 printer slows system response significantly


> > PID USERNAME  THR PRI NICE   SIZERES STATETIME   WCPU COMMAND
> >  18 root1 -60 -179 0K 8K *Giant  15:09 77.05% irq7: lpt0
> >  11 root1 171   52 0K 8K RUN 48.0H 11.13% idle
>
> The interrupt service for the parallel port is using over 3/4 of
> the CPU, and half of the rest is "idle".
>
> I take it this is a laser printer, which can consume bytes from the
> parallel port as fast as the processor can send them.  Top-of-head
> dump of ways to cut down on the interrupt traffic:
>
> * Get a DMA-capable parallel port (supposing such exist, and FreeBSD
>   supports them);
>
> * Move the printer to a network connection or dedicated print server;
>
> * Somehow tell the printer not to receive so quickly.
>
> Alternatively, one possible way to handle that sort of interrupt
> load without bogging down is to get a second CPU and run SMP, so
> you've still got a CPU available for tasks when one is swamped
> with interrupt traffic.
>
> The other thing that *might* help some is more RAM, if it happens
> that the idle time is caused by page wait due to the set of active
> threads needing more RAM than you have, but this will at best get
> your tasks up from 1/9 of the CPU to 2/9.
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
"[EMAIL PROTECTED]"
>

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: lpt0 printer slows system response significantly

2006-11-01 Thread perryh
> > * Somehow tell the printer not to receive so quickly.
>
> how can I do this?

I have no idea how to do it, or if it is even possible, which is why
I said "somehow".  You could check the printer's manual to see if it
has such a setting.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: lpt0 printer slows system response significantly

2006-11-01 Thread Anton Shterenlikht
On Wed, Nov 01, 2006 at 10:49:36AM -0500, Lowell Gilbert wrote:
>  * Change the printer port to polled mode.  ["lptcontrol -p"]
>With this kind of hardware, it may even speed up your printing as well.

Thanks a lot, I think it does print a bit faster. But more
importantly I see virtually no performance degradation during
printing.

Perhaps a sentence on this should be added in section
9.3.1.3 (Setting the Communication Mode for the Parallel Port) of
the user manual somewhere in the end of this pararaph:

The interrupt-driven method is usually somewhat
faster but uses up a precious IRQ line. Some newer
HP printers are claimed not to work correctly in
interrupt mode, apparently due to some (not yet
exactly understood) timing problem. These printers
need polled mode. You should use whichever one works.
Some printers will work in both modes, but are
painfully slow in interrupt mode.

and then add something like:

On slower machines using interrupt mode might cause
significant degradation of the overall system perfor-
mance due to the interrupt service using most of the
CPU time. On such machines changing to polled mode
will balance the CPU load as well as result in
faster printing.

Perhaps I should send a message to the documentation
list?

anton
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: lpt0 printer slows system response significantly

2006-11-01 Thread Lowell Gilbert
[EMAIL PROTECTED] writes:

>> PID USERNAME  THR PRI NICE   SIZERES STATETIME   WCPU COMMAND
>>  18 root1 -60 -179 0K 8K *Giant  15:09 77.05% irq7: lpt0
>>  11 root1 171   52 0K 8K RUN 48.0H 11.13% idle
>
> The interrupt service for the parallel port is using over 3/4 of
> the CPU, and half of the rest is "idle".
>
> I take it this is a laser printer, which can consume bytes from the
> parallel port as fast as the processor can send them.  Top-of-head
> dump of ways to cut down on the interrupt traffic:
>
> * Get a DMA-capable parallel port (supposing such exist, and FreeBSD
>   supports them);
>
> * Move the printer to a network connection or dedicated print server;
>
> * Somehow tell the printer not to receive so quickly.

 * Change the printer port to polled mode.  ["lptcontrol -p"]
   With this kind of hardware, it may even speed up your printing as well.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: lpt0 printer slows system response significantly

2006-11-01 Thread Anton Shterenlikht
On Wed, Nov 01, 2006 at 12:02:24AM -0800, [EMAIL PROTECTED] wrote:
> > PID USERNAME  THR PRI NICE   SIZERES STATETIME   WCPU COMMAND
> >  18 root1 -60 -179 0K 8K *Giant  15:09 77.05% irq7: lpt0
> >  11 root1 171   52 0K 8K RUN 48.0H 11.13% idle
> 
> The interrupt service for the parallel port is using over 3/4 of
> the CPU, and half of the rest is "idle".
> 
> I take it this is a laser printer, which can consume bytes from the
> parallel port as fast as the processor can send them.  Top-of-head
> dump of ways to cut down on the interrupt traffic:

yes, it is lj2100.

> * Somehow tell the printer not to receive so quickly.

how can I do this?

thanks
anton
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: lpt0 printer slows system response significantly

2006-11-01 Thread perryh
> PID USERNAME  THR PRI NICE   SIZERES STATETIME   WCPU COMMAND
>  18 root1 -60 -179 0K 8K *Giant  15:09 77.05% irq7: lpt0
>  11 root1 171   52 0K 8K RUN 48.0H 11.13% idle

The interrupt service for the parallel port is using over 3/4 of
the CPU, and half of the rest is "idle".

I take it this is a laser printer, which can consume bytes from the
parallel port as fast as the processor can send them.  Top-of-head
dump of ways to cut down on the interrupt traffic:

* Get a DMA-capable parallel port (supposing such exist, and FreeBSD
  supports them);

* Move the printer to a network connection or dedicated print server;

* Somehow tell the printer not to receive so quickly.

Alternatively, one possible way to handle that sort of interrupt
load without bogging down is to get a second CPU and run SMP, so
you've still got a CPU available for tasks when one is swamped
with interrupt traffic.

The other thing that *might* help some is more RAM, if it happens
that the idle time is caused by page wait due to the set of active
threads needing more RAM than you have, but this will at best get
your tasks up from 1/9 of the CPU to 2/9.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


lpt0 printer slows system response significantly

2006-10-31 Thread Anton Shterenlikht
Hello

I have a printer attached to a parallel port on an old
Compaq Armada 1700 laptop. When I print large (> 100k) documents
the system responds very slow (1-3sec) to keyboard strokes or
mouse moves. I wonder if I can lower the priority of printing.

The details:
$dmesg

[skip]

FreeBSD 6.0-RELEASE #1: Thu Sep 14 10:40:41 BST 2006
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Pentium II/Pentium II Xeon/Celeron (233.34-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x652  Stepping = 2
  
Features=0x183f9ff
real memory  = 167772160 (160 MB)
avail memory = 158879744 (151 MB)

[skip]

lpt0:  on ppbus0
lpt0: Interrupt-driven port
ppi0:  on ppbus0


Two typical outputs from top taken during printing:

last pid: 12387;  load averages:  0.75,  0.44,  0.23  up 2+01:16:3210:48:06
89 processes:  2 running, 63 sleeping, 23 waiting, 1 lock

Mem: 81M Active, 24M Inact, 37M Wired, 6940K Cache, 25M Buf, 3868K Free
Swap: 128M Total, 108K Used, 128M Free


  PID USERNAME  THR PRI NICE   SIZERES STATETIME   WCPU COMMAND
   18 root1 -60 -179 0K 8K *Giant  15:09 77.05% irq7: lpt0
   11 root1 171   52 0K 8K RUN 48.0H 11.13% idle
12269 daemon  1  -80 10996K  8908K pipewr   0:27  6.15% gs
  485 root1  960 18064K 16668K select   6:30  0.00% Xorg
   28 root1 -32 -151 0K 8K WAIT 5:05  0.00% swi4: clock sio

and

last pid: 12388;  load averages:  0.75,  0.44,  0.23  up 2+01:16:3410:48:08
89 processes:  3 running, 62 sleeping, 24 waiting

Mem: 81M Active, 24M Inact, 37M Wired, 6940K Cache, 25M Buf, 3868K Free
Swap: 128M Total, 108K Used, 128M Free


  PID USERNAME  THR PRI NICE   SIZERES STATETIME   WCPU COMMAND
   18 root1 -60 -179 0K 8K WAIT15:10 77.34% irq7: ppc0
   11 root1 171   52 0K 8K RUN 48.0H 10.89% idle
12269 daemon  1  990 10996K  8908K RUN  0:28  5.57% gs
   40 root1 171   52 0K 8K pgzero   0:35  0.15% pagezero
12270 daemon  1  -80  1184K   580K piperd   0:01  0.05% cat
  485 root1  960 18064K 16668K select   6:30  0.00% Xorg
   28 root1 -32 -151 0K 8K WAIT 5:05  0.00% swi4: clock sio

In the user manual I found about vm.swap_idle_enables kernel
variable. Is that something I should try?

thanks
anton
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"