View previous topic :: View next topic |
Author |
Message |
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Tue May 07, 2002 11:57 pm Post subject: Best way to set /proc values at boot time. |
|
|
There are four values that I need to set in /proc at boot time. What are people's opinions on the best way to do this:
Code: | # echo 262144 > /proc/sys/net/core/rmem_default
# echo 262144 > /proc/sys/net/core/rmem_max
# echo 262144 > /proc/sys/net/core/wmem_default
# echo 262144 > /proc/sys/net/core/wmem_max |
I would normally just throw them in a script and be done with it, but I'd be curious to hear what other folks would do. (I'm also looking at using sysctl, btw)
--kurt _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
Nitro Bodhisattva
Joined: 08 Apr 2002 Posts: 661 Location: San Francisco
|
Posted: Wed May 08, 2002 1:55 am Post subject: |
|
|
I was going to say just use sysctl, but I see you are already looking at that. _________________ - Kyle Manna
Please, please SEARCH before posting.
There are three kinds of people in the world: those who can count, and those who can't. |
|
Back to top |
|
|
Guest
|
Posted: Wed May 08, 2002 10:15 pm Post subject: |
|
|
"echo ..." is pretty common among a lot of people
If you don't want to mess up your local rc boot scripts you can, as you were thinking, go with sysctl and /etc/sysctl.conf which is run by /init.d/bootmisc. Some people prefer echo while others prefer sysctl.
>= 2.4.x kernels should (read: are supposed to) autotune those parameters and you might also look into /proc/sys/net/ipv4/tcp_rmem and /proc/sys/net/ipv4/tcp_wmem - depending on why you're increasing the queue/buffer sizes.
Remember that large buffers can chew serious amounts of memory, don't exaggerate |
|
Back to top |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Wed May 08, 2002 10:23 pm Post subject: |
|
|
Anonymous wrote: | Remember that large buffers can chew serious amounts of memory, don't exaggerate |
Thanks for the feedback. I'm adjusting the parameters to increase the effeciency of my broadband connection. In my ultra-informal tests, bumping up those four parameters gave me a ~300Kbps increase in speed. (on a ~5.5Mbps/1Mbps cable connection) Not earth-shattering, but nothing to sneeze at, either.
I realize it will chew up memory, but I've got gobs to start with, so I don't mind losing a few extra MB -- it's a worthwhile trade-offf IMO.
--kurt _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
Guest
|
Posted: Thu May 09, 2002 9:31 pm Post subject: |
|
|
Yes, those buffer/queue parameters are good starters for optimizing your throughput. If memory is not a concern, you can increse the sizes until you don't see any furhter improvements.
I wasn't sure what kind of machine you were building, if it's a fully loaded machine then there are no problems but if you're building an ultra-slim firewall/router from spare parts with only XX amounts of memory ... |
|
Back to top |
|
|
|