I have a PC with both Linux/Samba 3.0.10 and Windows 98SE and with HP
DJ 5150 printer which is shared over the network.

I'm trying to use this printer from another PC with XP SP2. The printing is
extremely slow. I noticed that there are large amounts of data transferred
between XP and Linux on TCP port 445.

When I leave the printer status window open the printer is refreshed from
time to time and each refresh causes 370 kB to be sent and 370 kB are
received. Opening printer properties means 12 MB sent and 12 MB received.
Printing a test page - 80 MB out, 80 MB in (the testpage itself has 1.6 MB).

It makes the printer work slowly on a LAN and almost impossible to use over
an 1-2Mbps link (takes one hour of full link load to print a few pages).

When I switch the Linux box to Win98SE everything works much better, so I
suppose it's something with Samba setup. I had version 3.0.4, today upgraded
to 3.0.10, but there was no improvement.

Any ideas?

smbd -d9 quickly creates a 100MB logfile filled with the messages attached
below. Sometimes there are other messages ("api_rpcTNP: spoolss op 0x8 -
api_rpcTNP: rpc command: SPOOLSS_GETPRINTER" or "rpc command:
SPOOLSS_GETPRINTERDRIVER2") but I suppose they are caused by the refreshing
status window.

---
[2005/02/05 15:45:25, 3] smbd/process.c:switch_message(685)
switch message SMBreadX (pid 448)
[2005/02/05 15:45:25, 4] smbd/uid.c:change_to_user(186)
change_to_user: Skipping user change - already user
[2005/02/05 15:45:25, 4] rpc_server/srv_pipe_hnd.c:get_rpc_pipe(1156)
search for pipe pnum=7225
[2005/02/05 15:45:25, 5] rpc_server/srv_pipe_hnd.c:get_rpc_pipe(1160)
pipe name spoolss pnum=7227 (pipes_open=3)
[2005/02/05 15:45:25, 5] rpc_server/srv_pipe_hnd.c:get_rpc_pipe(1160)
pipe name spoolss pnum=7226 (pipes_open=3)
[2005/02/05 15:45:25, 5] rpc_server/srv_pipe_hnd.c:get_rpc_pipe(1160)
pipe name spoolss pnum=7225 (pipes_open=3)
[2005/02/05 15:45:25, 6] rpc_server/srv_pipe_hnd.c:read_from_pipe(911)
read_from_pipe: 7225 name: spoolss len: 4280
[2005/02/05 15:45:25, 5] rpc_parse/parse_prs.crs_debug(82)
000000 smb_io_rpc_hdr hdr
[2005/02/05 15:45:25, 5] rpc_parse/parse_prs.crs_uint8(577)
0000 major : 05
[2005/02/05 15:45:25, 5] rpc_parse/parse_prs.crs_uint8(577)
0001 minor : 00
[2005/02/05 15:45:25, 5] rpc_parse/parse_prs.crs_uint8(577)
0002 pkt_type : 02
[2005/02/05 15:45:25, 5] rpc_parse/parse_prs.crs_uint8(577)
0003 flags : 00
[2005/02/05 15:45:25, 5] rpc_parse/parse_prs.crs_uint8(577)
0004 pack_type0: 10
[2005/02/05 15:45:25, 5] rpc_parse/parse_prs.crs_uint8(577)
0005 pack_type1: 00
[2005/02/05 15:45:25, 5] rpc_parse/parse_prs.crs_uint8(577)
0006 pack_type2: 00
[2005/02/05 15:45:25, 5] rpc_parse/parse_prs.crs_uint8(577)
0007 pack_type3: 00
[2005/02/05 15:45:25, 5] rpc_parse/parse_prs.crs_uint16(606)
0008 frag_len : 10b8
[2005/02/05 15:45:25, 5] rpc_parse/parse_prs.crs_uint16(606)
000a auth_len : 0000
[2005/02/05 15:45:25, 5] rpc_parse/parse_prs.crs_uint32(635)
000c call_id : 000002e3
[2005/02/05 15:45:25, 5] rpc_parse/parse_prs.crs_debug(82)
000010 smb_io_rpc_hdr_resp resp
[2005/02/05 15:45:25, 5] rpc_parse/parse_prs.crs_uint32(635)
0010 alloc_hint: 00004b98
[2005/02/05 15:45:25, 5] rpc_parse/parse_prs.crs_uint16(606)
0014 context_id: 0000
[2005/02/05 15:45:25, 5] rpc_parse/parse_prs.crs_uint8(577)
0016 cancel_ct : 00
[2005/02/05 15:45:25, 5] rpc_parse/parse_prs.crs_uint8(577)
0017 reserved : 00
[2005/02/05 15:45:25, 3] smbd/pipes.c:reply_pipe_read_and_X(242)
readX-IPC pnum=7225 min=4280 max=4280 nread=4280
[2005/02/05 15:45:25, 5] lib/util.c:show_msg(456)
[2005/02/05 15:45:25, 5] lib/util.c:show_msg(466)
size=4339
smb_com=0x2e
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=136
smb_flg2=51201
smb_tid=1
smb_pid=65279
smb_uid=100
smb_mid=39810
smt_wct=12
smb_vwv[ 0]= 255 (0xFF)
smb_vwv[ 1]= 0 (0x0)
smb_vwv[ 2]= 0 (0x0)
smb_vwv[ 3]= 0 (0x0)
smb_vwv[ 4]= 0 (0x0)
smb_vwv[ 5]= 4280 (0x10B8)
smb_vwv[ 6]= 59 (0x3B)
smb_vwv[ 7]= 0 (0x0)
smb_vwv[ 8]= 0 (0x0)
smb_vwv[ 9]= 0 (0x0)
smb_vwv[10]= 0 (0x0)
smb_vwv[11]= 0 (0x0)
smb_bcc=4280
[2005/02/05 15:45:25, 6] lib/util_sock.c:write_socket(432)
write_socket(24,4343)
[2005/02/05 15:45:25, 6] lib/util_sock.c:write_socket(435)
write_socket(24,4343) wrote 4343
[2005/02/05 15:45:25, 6] smbd/process.crocess_smb(889)
got message type 0x0 of len 0x3b
[2005/02/05 15:45:25, 3] smbd/process.crocess_smb(890)
Transaction 7791 of length 63
[2005/02/05 15:45:25, 5] lib/util.c:show_msg(456)
[2005/02/05 15:45:25, 5] lib/util.c:show_msg(466)
size=59
smb_com=0x2e
smb_rcls=0
smb_reh=0
smb_err=0
smb_flg=24
smb_flg2=51207
smb_tid=1
smb_pid=65279
smb_uid=100
smb_mid=39874
smt_wct=12
smb_vwv[ 0]= 255 (0xFF)
smb_vwv[ 1]=57054 (0xDEDE)
smb_vwv[ 2]=29221 (0x7225)
smb_vwv[ 3]= 0 (0x0)
smb_vwv[ 4]= 0 (0x0)
smb_vwv[ 5]= 4280 (0x10B8)
smb_vwv[ 6]= 4280 (0x10B8)
smb_vwv[ 7]=65535 (0xFFFF)
smb_vwv[ 8]=65535 (0xFFFF)
smb_vwv[ 9]= 4280 (0x10B8)
smb_vwv[10]= 0 (0x0)
smb_vwv[11]= 0 (0x0)
smb_bcc=0
---

P.