Tuesday, October 17, 2017

Oversubscription (Network)

Oversubscription rates:
  1. Access Layer to Distribution Layer => 20:1
  2. Distribution Layer to Core Layer => 4:1
  3. Data Center links => 1:1
How to count oversubscription rates:
for example you have 48 1Gb/s ports Access Layer switch with one uplink to the Distribution Layer, so your rate is 47*1Gb/s:1*1Gb/s => 47:1 it can be ok, but recommendation is to have 20:1, so you can achieve this by lowering speed of Access Layer ports to 100Mb/s:
47*100Mb/s:1*1Gb/s => 4700Mb/s:1000Mb/s => 4,7:1 this rate is much better.
Also, you can utilize extra port for uplink (LAG=Etherchannel):
46*1Gb/s:2*1Gb/s => 4600:2000 => 23:1
Oversubscription with incorrect rates (given rates are just recommendations and you can calculate your own rates using ports load and dropped packets counters). Using proper oversubscription rates don't supplace QoS it just ensures (theoretically) that devices buffer will not be overloaded and that all packets will be delivered.

Monday, October 2, 2017

Start Android notes

AndroidStudio Project consists of Modules, every project can have 1 or more modules. When you "Run" you run needed module not project.

An app consists of a window - an Activity. Each activity consists of one or several elements (buttons, check-boxes, radio buttons etc.), the Android name for this element is View (Button, TextView, ImageView etc.). To collect views into a group of views we use ViewGroup (LenearLayout, RelativeLayout etc.).

To create activity file for the other screen orientation:
left click on res => right click on res => New => Adnroid resource file => Available qualifiers => Orientation

Size of views in the ViewGroup:
  1. actual size in dp/dpi (dot in one inch)
  2. constant values - match_parent / wrap_content
  3. weight: 
    1. weight=0 equals to wrap_content
    2. weight is the proportion of the view in the 100% of the overall parent ViewGroup. e.g.: button1 has weight=2, button2 has weight=3, button3 has weight=5. so 2+3+5=10 10=100% and 1=10% of the parent ViewGroup actual size.
ViewGroups:
  1. LinearLayout can be horizontally or vertically oriented
  2. RelativeLayout child views are organized relatively to parent or to each other
  3. FrameLayout - reservers space needed to show a single view (useful with Fragments)