dtaht / sch_cake

Out of tree build for the new cake qdisc
100 stars 35 forks source link

Question about memory #118

Closed ZacWolf closed 5 years ago

ZacWolf commented 5 years ago

I've set up a custom router running on an old Intel pc. It has a lot of memory (16Gb).

Are there settings I can make to the config/scripts to take advantage of the extra memory? Or is that all done at the tc-adv level?

tohojo commented 5 years ago

Zac Morris notifications@github.com writes:

I've set up a custom router running on an old Intel pc. It has a lot of memory (16Gb).

Are there settings I can make to the config/scripts to take advantage of the extra memory? Or is that all done at the tc-adv level?

CAKE self-tunes its memory limit from the configured rate. You can limit it further, but in normal operation it is quite rare to hit the memory limit. You want to start dropping packets way before that; and you certainly don't want to queue up gigabytes of packets :)

ZacWolf commented 5 years ago

That's what I had thought I understood, but I just wanted to confirm that I was understanding that correctly. THANKS!!!

One last question, for both a 1Gb fiber connection and a 300Mb cable connection, is there a typical "minimum amount of memory" needed to run cake most efficiently? I was looking at one of the computer-on-a-board solutions, but those seem to come with either 1GB or 2GB of RAM.

tohojo commented 5 years ago

Zac Morris notifications@github.com writes:

That's what I had thought I understood, but I just wanted to confirm that I was understanding that correctly. THANKS!!!

One last question, for both a 1Gb fiber connection and a 300Mb cable connection, is there a typical "minimum amount of memory" needed to run cake most efficiently? I was looking at one of the computer-on-a-board solutions, but those seem to come with either 1GB or 2GB of RAM.

That should be plenty. In most cases CAKE will eat up at most a few dozens of megabytes of memory. With OpenWrt, we can run this on very small boards.

The limiting factor on small boards is usually the CPU speed; the shaper may not be able to keep up. I don't think this is a huge concern on the espressobin, though...

ZacWolf commented 5 years ago

Thanks so much for the detailed explanation!
So for the connection speeds I mentioned, def over the 1Ghz CPU clock speeds then?

Any what about cores/threads? Does the shaper take advantage of multiple cores?

tohojo commented 5 years ago

Zac Morris notifications@github.com writes:

Thanks so much for the detailed explanation!
So for the connection speeds I mentioned, def over the 1Ghz CPU clock speeds then?

Hmm, hard to set a general number for clock speed, as it really depends on other aspects of the CPU as well (basically, how much work it can do on each clock cycle). But I think you should be fine with the espressobin; certainly for 300 Mbps, and I think for 1Gbps as well...

ZacWolf commented 5 years ago

Excellent! Thanks, I think I'm gonna give it a try. I've had some folks express interest in my router build, so if I could package it as a full plug-n-play device, I think that would work well.