Lecture02(Desktop).
Download
Report
Transcript Lecture02(Desktop).
UNIX 系統安裝
(Desktop vs Server)
http://linux.vbird.org/linux_basic/0110whatislinux.php
2016/4/9
1
如何學 Unix?
http://linux.vbird.org/linux_basic/0110whatislinux.php
•
•
•
•
•
•
•
2016/4/9
計算機概論與硬體知識
網路基礎知識
安裝與指令
作業系統的基礎技能
vi文書編輯器
Shell與Shell Script
軟體管理 (安裝 & 維護)
2
進度
• 計算機概論與硬體知識
• 網路基礎知識
• 安裝與指令
• 作業系統的基礎技能
• vi文書編輯器
• Shell與Shell Script
• 軟體管理 (安裝 & 維護)
2016/4/9
3
課程目標 (提醒…)
• Unix as Desktop
• Unix as Server
2016/4/9
4
Download required files
(資管三同學)
• VirtualBox
– ftp://120.107.152.252/Public/VirtualBox5.0.14-105127-Win.exe
• Ubuntu Desktop
– ftp://120.107.152.252/Public/ubuntu-15.10desktop-amd64.iso
• Ubuntu Server
– ftp://120.107.152.252/Public/ubuntu-14.04.3server-amd64.iso
Ubuntu 版本之選擇…
Server or Desktop?
From:
http://www.serverwatch.com/tutorials/article.php/3715071
(OLD but still got some info …)
問題
• Desktop 與 Server 安裝後的差別?
• 安裝 Desktop 版本作為 Server 用可
以嗎?
• 反之呢?
2016/4/9
7
Desktop 與 Server 安裝後的差別?
2016/4/9
8
Desktop 與 Server 安裝後的差別?
2016/4/9
9
Server or Desktop?
只有介面的差異?
• http://www.serverwatch.com/tutorials/article.php/
3715071 (OLD but still got some info …)
(過程省略, refer to the original post for
details)
• Two kernels with Ubuntu-server & desktop
are compared
– /boot/config-2.6.22-14-server
– /boot/config-2.6.22-14-generic
Conclusions
• Differences in
–
–
–
–
I/O Scheduler
Preemption
Memory
Ticks and HZ
I/O Scheduler - 1
• CFQ
– tries to balance all read/write requests equally.
• Deadline
– gives a higher priority to read requests, and will
re-order read/write requests aggressively to
meet the goal of completing read requests
within a specified time, without "starving"
write requests, which are not given deadlines.
I/O Scheduler - 2
• Anticipatory
– aims to reduce latency by giving priority to
already-running applications. It is supposed to
be suitable for smaller systems with one or two
hard disks, and single or dual-core CPUs.
• NOOP
– is a minimal scheduler for systems with
hardware that handles I/O scheduling, like large
SCSI RAID arrays.
Which for which?
• Ubuntu makes CFQ the default for desktop
kernels
• Deadline for server kernels.
• The goal is the same for all of them: to
optimize hard disk bandwidth for different
classes of workloads.
Preemption
• Preemption works along with scheduling to
fine-tune …
– Performance
– Efficiency
– Responsiveness.
Non-preemptive
• Non-preemptive multitasking is a style
of computer multitasking in which the
operating system never initiates a context
switch from a running process to another
process.
Preemptive
• Preemptive multitasking involves the use of
an interrupt mechanism which suspends the
currently executing process and invokes a
scheduler to determine which process
should execute next.
Preemption
• The server kernel has kernel preemption
turned off
• The desktop kernel has it enabled
Desktop : Preemption ON
• For desktop systems users typically have several
things going at once: writing documents, playing
music, Web surfing, downloading and so on.
• Users don't care how responsive background
applications are; they care only about the ones
they're actively using.
– So if loading a Web page takes a little longer while the
user is writing an e-mail, it's an acceptable trade-off.
– Overall efficiency and performance are actually
reduced but not in a way that annoys the user.
Server : Preemption OFF
• On servers you want to minimize any and
all performance hits, so turning off
preemption is usually the best practice.
Memory
• The 32-bit server kernel supports up to 64
GB of memory;
• The desktop kernel, a mere 4 GB
• You'll only see these options in 32-bit
kernels because the 32-bit address space is
big enough to support only 4 GB without
trickery
Memory
• On a 64-bit system you won't see any
memory options because it doesn't need
hacks to overcome a lack of memory
addressing space
– You should be fine until your needs exceed 16
60
exabytes (2 ) of RAM.
Ticks and HZ
• Server : 100 Hz
– The server kernel looks up and peers around
100 times per second for something to do.
• Desktop : 250 Hz
– The desktop kernel looks up and peers around
250 times per second for something to do
Ticks and HZ
• Lower ticks/Hz numbers equal lower
overhead and higher latency
• Higher numbers equal higher overhead and
lower latency.
– generally mean the system feels more
responsive, at the price of higher CPU usage.
– Some processes require more interrupts; for
example, video processing and VoIP servers
need 1000 Hz.
問題 (again)
• Desktop 與 Server 安裝後的差別?
• 安裝 Desktop 版本作為 Server 用可
以嗎?
• 反之呢?
• 您的答案?
2016/4/9
25
i386 or AMD64?
Take a break & download
required files
(其他同學)
• VirtualBox
– ftp://120.107.152.252/Public/VirtualBox5.0.14-105127-Win.exe
• Ubuntu Desktop
– ftp://120.107.152.252/Public/ubuntu-15.10desktop-amd64.iso
• Ubuntu Server
– ftp://120.107.152.252/Public/ubuntu-14.04.3server-amd64.iso
Ubuntu Desktop Installation
• VirtualBox 設定
• 安裝
2016/4/9
28
VirtualBox 設定 (Desktop)
2016/4/9
29
VirtualBox 設定 (Desktop)
Q&A
1. 12 MB 的視訊記憶體可以支援怎樣的解析度?
2. 您的 PC 的視訊記憶體有多大?
2016/4/9
30
VirtualBox 設定 (Desktop)
2016/4/9
31
VirtualBox 設定 (Desktop)
2016/4/9
32
VirtualBox 設定 (Server)
2016/4/9
33
Types of Network (VirtualBox)
NAT
http://download.ithome.com.tw/article/index/id/996
橋接 (Bridged)
http://download.ithome.com.tw/article/index/id/996
內部網路 (Internal Network)
主機 (host) 抓不到內部虛擬機
(guests) 的通訊
http://download.ithome.com.tw/article/index/id/996
NAT 網路 (NAT Services)
類似在 Internal network 裡建構一個具 NAT
的環境
Each virtual machine guest configured for the same
NAT Networking network can see the other guests
configured to be on that network.
http://download.ithome.com.tw/article/index/id/996
僅限主機 (Host only)
• Used to create a network containing the host and
a set of virtual machines, without the need for the
host's physical network interface.
• Instead, a virtual network interface (similar to a
loopback interface) is created on the host,
providing connectivity among virtual machines
and the host.
開始安裝 Desktop …
(Your Turn)