前言: 話說前陣子爸爸家陽台不斷出現米奇老鼠,立刻清理陽台所有東西,然後又跟市政部門反映問題,可是情況還沒有好轉,米老鼠來完一隻又一隻,我爸陽台在老鼠界應該是網紅打卡聖地(誤),要不然就是米奇老鼠版米奇林三星餐廳(?) 雖然我們抓到了三隻,到上兩個禮拜為止還有至少一隻一直抓不到,每天淩晨還會來吃事後煙留下老鼠屎,真_北。 這隻老鼠對傳統攻擊有抗性,有IT9朋友前陣子用Raspberry pi自製了一台electric mouse trap ,用pi的超聲波雷達放在鞋盒裡,鞋盒裡有一堆食物,底部佈了鐵網,偵測到有老鼠進去以後立即關門通9V電,通個1分鐘再放牠離開,大推我自己也造一台 (Youtube片搜尋一大堆,人類真變態啊,朋友好變態啊)。可是我覺得這樣又好像有點太殘忍,不如先偵測牠們什麼時候來,嚇嚇牠們看看有沒有效果再說吧。 目的: 用Raspberry pi及手上有的感測器弄一隻放陽台用來偵測和嚇嚇老鼠的東西,並把紀錄圖像化到雲端給老爸使用。 邏輯及設計: 當老鼠進入偵測範圍,Motion Sensor偵測到生物活動Raspberry pi 處理來自Motion Sensor的訊號,如果夠強的話開始準備作出回應 Raspberry pi在Angry cats sounds中隨機選出叫聲,再經由Speaker輸出貓叫聲 Raspberry pi指示強光元件發出強光束照射目標 把偵測計數上傳到雲端圖表 材料: Sensor 在網路上看了一些Raspberry pi wild animal camera ,很多也是用Motion Sensor先偵測動物再來,我用的是PIR Motion Sensor被動式紅外線感測器,有低耗電成本便宜的好處。[1],而且可手動調整靈敏度及反應時間。 PIR Motion Sensor就是下面這個 圖片來源: learn.adafruit.com 可手動調整敏感度還有反應時間,這個有點不好調,要試好多遍才找到最佳位置。 可以在Raspbian中輸入pinout查詢GPIO避免插錯 圖片來源: learn.adafruit.com . 一台Raspberry pi 這次使用較舊的Raspberry pi model B+ 萬一老鼠生氣被咬爛錢包也不太痛 . 一張
如果今天老闆要你對某系統提出改善方案, 很多工程師包括我也不知道從那裡著手開始寫. 剛好遇到這次機會花掉了我畢生腦 精 力寫好一份SQL Server改善方案, 把小弟的文章部分內容分享一下希望對各位同業有幫助. 部分內容因為公司機密有所刪減, 請見諒 (公司要用英文寫, 抱歉沒中文版本= =")
------
Introduction:
This study will focus on how can we improve existing SQL Server to provide more reliable, more secure and improve capacity in order to fulfill future usage.
Current Status overview:
Operation System: windows Server 2003 SP2 32bits with 3.75 GB ram.
SQL Server version: SQL Server 2005 standard edition.
numbers of databases: 18.
Performance evaluation:
We capture the sample data from 23/07/2012 to 27/07/2012. evaluating 8 indicators[1] covering memery, CPU, and harddisk performance. here is the result:
Existing issues:
Security:
Propose improvements:
Security level:
[2] Microsoft security guideline [3] Oracle依舊領跑關系型數據庫市場
[4] Windows Server 2008 wiki
[5] Why you really do Performance Management in production.
------
Introduction:
This study will focus on how can we improve existing SQL Server to provide more reliable, more secure and improve capacity in order to fulfill future usage.
Current Status overview:
Operation System: windows Server 2003 SP2 32bits with 3.75 GB ram.
SQL Server version: SQL Server 2005 standard edition.
numbers of databases: 18.
Performance evaluation:
We capture the sample data from 23/07/2012 to 27/07/2012. evaluating 8 indicators[1] covering memery, CPU, and harddisk performance. here is the result:
Existing issues:
Security:
- Accounts level:
- XX% databases using administrator as its login account. That's mean using one account can access several databases.
- All developers known SQL Server admin username and password.
- Operating system level:
According to Microsoft security guideline, the highest risk of infection servers generally meet one or more of the following criteria. Conditions 1, 3, 5 are ture in our environment - Server can access to the internet.
- The servers have open ports to servers that are not behind a firewall.
- The servers read or execute files from other servers.
- The servers run HTTP servers, such as Internet Information Services (IIS) or Apache. (For example: SQL XML for SQL Server 2000.)
- The servers are also hosting file shares.
- The servers use SQL Mail to handle incoming or outgoing email messages.
- The effectiveness of existing backup solution is unknown.
- Some databases do not accepted of any system failure or abnormal termination in office hour(ex, dms). Existing SQL Server can not provide any failover capability.
- 32-bit Operating system means only 4GB ram can be used on the SQL server, no matter how much really it is or what platform it is using(ex. Virtual machine). In other words, the capacity of SQL server is pretty tight.
- The SQL server is multi-functional.
- Lack of developmen environment. Developers always do development in production server directly.
Propose improvements:
Security level:
- Create independent account for each databases.
- Using independent account for SQL server administration. Reduced the power in a single account(domain admin).
- SQL Server admin password can be only known by SQL Server administrator and associated members, not for all developers.
- isolated to external environment. Block SQL Server connect to internet, whether incoming or out going.
- Simplified server function only for database system. Migrate other programs to another server. It is because execute, read or exchange files can increase the risk of infection.
- Disabled all share folder in the server.
- re-Formulate clear backup plan.
- Periodically do backup restore drill. Let infra team-mates do it faster and more accurate.
- Reconsider the necessity of failover plan. If yes, details planning in hardware, software, network, infrastructure.
- As quick as possible to build up development environment. To prevent excess modification in production server.
- 32bit to 64 bit:
More and more systems choose SQL Server as their final database solution in our department. Moreover, according to a report from Gartner, a company which delivers technology research, said SQL Server holding the third in global database market share, about 17% [3]. So we can estimate that the usage of SQL Server will increase inevitably. More usage means more RAM would be spent in the future. Unfortunately, 32bits SQL Server maximum support ram size are only 3.99GB, but 64 bits almost no limitation. The higher the memory, the larger is the buffer pool and less time is spent on accessing the data from the physical disk, reading cache, make connections, etc. - Physical to Virtualization:
Since SQL Server usage is unpredictable, Virtualization technology can dynamically increase or decrease resources to the SQL Server according to the usage. No need to open the hardware server and plug more ram or CPU physically. More flexible. - Windows Server 2003 to 2008:
I have read many articles the differences between version 2003 and 2008. The main benefits upgrade 2003 to 2008 are [4] - Increase server efficiency. Reduce the power consumption of server.
- more features on management and virtualization.
- Monitor performance regularly.[5]
[2] Microsoft security guideline [3] Oracle依舊領跑關系型數據庫市場
[4] Windows Server 2008 wiki
[5] Why you really do Performance Management in production.
Comments
Post a Comment