Subject: [netatalk-admins] Slow write performance on FreeBSD 2.2.5, 1.4b2

From: Gary Teter <[email-masked]>
Date: Sat, 21 Feb 98 18:23:37 -0800

I'm having troubles with my installation of netatalk-1.4b2 on FreeBSD 
2.2.5: 

Read performance from the server is great, but write performance is 
really, really lousy. The client is a PowerMac 604e/200 clone, 10baseT 
network. (Actually on a large file it's great for the first 1.8MB or so, 
then it seems to pause for big chunks of time.)

I've installed the FreeBSD 2.2.5 netatalk patch that fixed the broken 
Appletalk support in the kernel.

Someone suggested changing the definition of ddp_recvspace in 
sys/netatalk/ddp_usrreq.c to a higher value, so I changed it to 50 * 600.

Any suggestions would be >greatly< appreciated!

PS: I have to admit, I'm coming at this from the Mac side of things, so 
I'm not as familiar with Unix conventions as I'd like to be. (But I 
suppose that's probably typical of people who need netatalk...)

PPS: I never could get the netatalk-1.4b2+asun2.0a18.2 set of patches to 
work right, mainly because I can't quite figure out how to install the 
tcp wrapper stuff properly (I think).

--
Gary Teter, Landless Peasant
Bulldog Beach Interactive http://www.bulldogbeach.com

---

From: Nico Lumma <[email-masked]>
Date: Sun, 22 Feb 1998 08:44:27 +0100

Hi,

I successfully installed netatalk 1.4b2 a couple days ago and I really like
it. There's still one thing I don't like, but I don't know how to change
it, or whether it is possibly to change at all...

I need to mount several accounts from one mac, i.e. my own account, the
html-directory and the ftp-directory, all with full read and write
permissions.
But once I am in the chooser,I can only select one login, not several
different ones...

Any ideas?

Thanks in advance,

Nico

"Even though Mac Users may be only 10% of the market, always remember that
we are the top 10%" 	- Douglas Adams

---

From: David Perry <[email-masked]>
Date: Sun, 22 Feb 1998 08:47:35 +0000 ()

Nico,

You can only login as one user at a time. However if you login in as nico 
you could edit the ~/.AppleVolumes file to allow 
	~/
	/htdocs
	/ftp

to show up in your chooser. You might also need to make sure that 'nico' 
belongs to the groups that have read / write access to these last two.

Dave Perry

---

From: Jon Torrez <[email-masked]>
Date: Sun, 22 Feb 1998 15:47:27 -0600 (CST)

I have had the same problem, the one key note when I go back and read the
reports is this:

	mac client: system 7.6.xx could not mount multiple netatalk drives

		yet

	same mac client: system 8.0 could mount up to 254 <-- yes we did!

			even thought we mounted 254 different exported
drives the performance was sluggish and crappy, but hey, 254 drives!! who
the hell needs that many!

<WWW>Hi,
<WWW>
<WWW>I successfully installed netatalk 1.4b2 a couple days ago and I really like
<WWW>it. There's still one thing I don't like, but I don't know how to change
<WWW>it, or whether it is possibly to change at all...
<WWW>
<WWW>I need to mount several accounts from one mac, i.e. my own account, the
<WWW>html-directory and the ftp-directory, all with full read and write
<WWW>permissions.
<WWW>But once I am in the chooser,I can only select one login, not several
<WWW>different ones...
<WWW>
<WWW>Any ideas?
<WWW>
<WWW>Thanks in advance,
<WWW>
<WWW>Nico
<WWW>
<WWW>"Even though Mac Users may be only 10% of the market, always remember that
<WWW>we are the top 10%" 	- Douglas Adams
<WWW>
<WWW>

+--------
| Jon Torrez
| Systems Administrator - WWWebServers, Inc. 
| http://www.wwwebservers.com / [email-masked]
+----------------------------------------------------------------------

---

From: Bill Studenmund <[email-masked]>
Date: Mon, 23 Feb 1998 13:47:48 -0800 (PST)

> sys/netatalk/ddp_usrreq.c to a higher value, so I changed it to 50 * 600.

Doh! That kills my favorite suggestion!

> tcp wrapper stuff properly (I think).

Then just turn off the tcprapper support. :-)

Take care,

Bill

---

From: Bill Studenmund <[email-masked]>
Date: Mon, 23 Feb 1998 14:01:24 -0800 (PST)

> belongs to the groups that have read / write access to these last two.

Another option, if you REALLY need the different logins (you need to
create files with different owners on the UNIX machine), is to run
multiple afpd servers. I think the asun patches permit this cleanly.

Basically log into one server as "nico", another as html-source, etc.

Though if you can do it as Dave suggested, with group permissions, etc.,
I'd suggest that. It's easier.

Take care,

Bill

---

From: "Paul M. Fleming" <[email-masked]>
Date: Mon, 23 Feb 1998 16:03:18 -0600 (CST)

I have a question about resource forks. In our lab we share out a public 
volume on which executable programs are not allowed. I would like to write
a program ( and run it via cron) which scans the afp shared portions of the
file system for macintosh applications (APPL file type) and deletes them.
Any suggestions where to begin in the Netatalk source code. (I've started 
looking at the AppleDouble routines. Is this the right place are there 
easier ways?)

Thanks in advance.

Paul Fleming
Unix Administrator
New Media Center
SIUC

---

From: [email-masked]
Date: Tue, 24 Feb 1998 07:04:39 +0200 (SAT)

recursively scan the folders with find, and use the -exec rm option. also
bear in mind that desk accessories and control panels count as well
('dfil' and 'cdev').

____________________________________________________________
John Ostrowick
[email-masked], +27 11 716-3783
Computer Science Department, University of the Witwatersrand   
Web site, ftp site and listserv all available at: 
http://macaroni.cs.wits.ac.za/

---

From: Edan Idzerda <[email-masked]>
Date: Tue, 24 Feb 1998 00:24:46 -0500 (EST)

> bear in mind that desk accessories and control panels count as well

Even better, and slightly lesser known is to use xargs.

% find . -name evil.executables -print | xargs rm

xargs takes a list of strings as input, breaks up the list into
big pieces and feeds it to the command you specify.  That way you
don't waste time starting up 'rm' for every single file.

Your unix tip o' the day.

- edan

---

From: "Paul M. Fleming" <[email-masked]>
Date: Mon, 23 Feb 1998 23:48:51 -0600 (CST)

Netatalk doesn't mark binaries as executable in Unix. a find whould not check
the AppleDouble file type or am I missing something..

Paul

---

From: [email-masked]
Date: Tue, 24 Feb 1998 00:58:32 -0500

> From:    Bill Studenmund <[email-masked]>
> To:      Gary Teter <[email-masked]>

> Doh! That kills my favorite suggestion!

The normal value of ddp_recvspace, 10 * X, is enough for the eight
packets you'll get back from an ATP transaction, plus a couple more for
extra space.  Each time this buffer is overflowed, there's a statistics
block that gets updated, ddps_nosockspace, which your favorite BSD unix
ought to return as output of netstat -s.

Generally speaking, you should never see this...

When your network performance is "really, really, slow", it's usually a
bad network.  AppleTalk tolerates a *very* low network error rate.  In
particular, write performance suffers because of the dual-ATP
transactions used to "turn" the 8 packet response into a write.  If
you're getting, write, write, write, long ... pause ... write, write,
etc, then it's almost certainly a bad network.

The good news is that TCP is a non-sucking protocol, and can deal quite
well with lossy networks.

:wes

---

From: [email-masked]
Date: Tue, 24 Feb 1998 08:40:59 +0200 (SAT)

maybe a grep for 'APPL' in the file.

---

From: Bill Studenmund <[email-masked]>
Date: Tue, 24 Feb 1998 11:57:27 -0800 (PST)

> etc, then it's almost certainly a bad network.

Wes,

Though you know the protocol better than I, I've had users clear up slow
write problems by upping ddp_recvspace to about 25 * X. I agree it
_shouldn't_ matter, but it has helped. I don't understand why (my
supposed reason doesn't jibe with your description above). I doubt going
to 50 would help much.

Take care,

Bill

---

From: [email-masked]
Date: Tue, 24 Feb 1998 18:31:10 -0500

> To:      [email-masked]

> supposed reason doesn't jibe with your description above). I doubt going

If it will help, you'd see ddps_nosockspace, in the ddp stats structure
growing.  It may well be growing, but that probably indicates a
different problem than the one I was describing, perhaps a kernel bug.

:wes

---

From: Bill Studenmund <[email-masked]>
Date: Tue, 24 Feb 1998 18:04:34 -0800 (PST)

> different problem than the one I was describing, perhaps a kernel bug.

I'll have them check it next time it comes up. Now if I can only get
someone to try this. :-)

Take care,

Bill