8/23/2010

電端運算(Cloud Computing)何其多?

資料來源:
乒乓王 Blog

David Akka Blog


SaaS - Software-as-a-Service
is a model of software deployment whereby a provider licenses an application to customers for use as a service on demand. One example of SaaS is the Salesforce.com CRM application.
IaaS - Infrastructure-as-a-Service is the delivery of computer infrastructure (typically a platform virtualization environment) as a service. Rather than purchasing servers, software, data center space or network equipment, clients instead buy those resources as a fully outsourced service. One such example of this is the Amazon web services.
PaaS - Platform-as a-Service is the delivery of a computing platform and solution stack as a service. It facilitates the deployment of applications without the cost and complexity of buying and managing the underlying hardware and software layers. PaaS provides the facilities required to support the complete lifecycle of building and delivering web applications and services. An example of this would the GoogleApps.
DaaS - Desktop-as-a-Service enables users to use their desktops virtually from anywhere. Commonly known as "Desktop Virtualization", this concept separates personal computer desktop environments from the physical machine through a client-server computing model. Nowadays, with the rise of SaaS and RIA (Rich Internet Applications) this method of usage is becoming obsolete.

3/31/2010

Oracle Create User & Grant user

建立使用者帳號
CREATE USER usernmae IDENTIFIED BY password ; #username 加雙引號;登入認大小寫亦需加雙引號
GRANT CREATE SESSION TO username;

授予權限
Grant select, insert, update, delete ON tabename TO username;

收回權限
REVOKE select ON tabename FROM username;

更改使用者帳號
UPDATE USER$ SET NAME='new_username' WHERE NAME='old_username';
ALTER SYSTEM CHECKPOINT;
ALTER SYSTEM FLUSH SHARED_POOL;
ALTER USER username IDENTIFIED BY newpassword;

3/11/2010

Oracle與異質DB建立DBLINK

Oracle Database Gateways 提供下列四項模組
Transparent Gateway for Sybase
Transparent Gateway for SQL Server
Transparent Gateway for Teradata
Transparent Gateway for Informix
Generic Connectivity (ODBC免費版本)

You can install Oracle Database Gateway in either of the following configurations:
* On the same computer as an existing Oracle database but in a different Oracle home.(不同目錄,可安裝不同版本)
* On a system with no Oracle database.(愛裝那一套請自便)
* On the same computer as the Oracle database, and in the same Oracle home directory. Note that in this case,the Oracle database and the gateway must be at the same release level.(需配合原有版本)

1/17/2010

主機效能分析

近來有使用者反應系統緩慢
但網路流量MRTG未異常,使用者個人電腦CPU亦未超載
那只有主機效能問題了

下列指令可觀查主機之效能及分析

linux#vmstat 3 | (while read -r line; do echo "$(date +'%Y%m%d %T'): $line"; done)
20080730 23:07:23: procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
20080730 23:07:23: r b swpd free buff cache si so bi bo in cs us sy id wa st
20080730 23:07:23: 1 0 112 17284 136136 1537224 0 0 17 10 61 40 1 0 99 0 0
20080730 23:07:26: 0 0 112 17252 136140 1537224 0 0 0 28 1019 310 0 0 100 0 0
20080730 23:07:29: 0 0 112 17248 136148 1537220 0 0 0 37 1016 300 0 0 100 0 0
20080730 23:07:32: 0 0 112 17252 136148 1537224 0 0 0 0 1015 299 0 0 100 0 0
20080730 23:07:35: 0 0 112 17244 136152 1537224 0 0 0 19 1011 297 0 0 100 0 0

放在背景行

linux#nohup ./vmstat.sh > /var/log/vmstat.log &

1/15/2010

負載平衡演算法則

1. Round Robin:依輪流的方式詢問底下的每台伺服器
2. Least Connections:將使用者的連線需求,導到最少連線數目伺服器上
3. Weighted Distributions:依設定之權重比例,分配使用者的連線需求
4. Response Time:依Health check的回應時間
5. Affinity:依照網站連線需求客製化