iPhone 3GS 要如何設定網路共享, 於外出時, 3.5G 可以透過 iPhone 分享到 Notebook 上.
分類: My_Note-App-Setting
GoDaddy 內部網址轉移、遷移 步驟
GoDaddy 的 Domain name 要遷移, 要由 A帳號 轉換到 B帳號下, 要怎麼做?
Android 關閉通知音效
Android 會突然發出個聲音, 來通知說有新信 ... 等等的訊息.
不過, 我的使用有遇到下述幾種狀況:
- 通知聲音 很難聽 (可以換聲音, 但是我懶得去試哪個聲音好聽)
- 信件太多, 如果每次叫都去看, 會叫個不停
- 通常信件都不是急件, 不需要即時通知 (急件都直接打電話了)
Memcached 預設 單筆資料儲存最大容量為 1M
Memcached 是業界非常常用到的 cache system, 儲存格式是 key-value.
官方網站: Memcached: Free & open source, high-performance, distributed memory object caching system.
註:查看設定可用:$ echo "stats settings" | nc localhost 11211 # 看目前在跑得設定值
但是 Memcached 要知道的兩點:
- Ram 要夠大, 因為 Memcached 的資料都塞在 Ram 裡面, Ram 不夠大, 新的資料就寫不進去.
- Memcached 預設 單筆 資料儲存最大容量是 1M byte, 詳見 FAQ. (下述轉載此問題的問答)
Q: What is the maximum data size you can store? (1 megabyte)
- The maximum size of a value you can store in memcached is 1 megabyte. If your data is larger, consider clientside compression or splitting the value up into multiple keys.
為何是 1M, 是否可以增加, FAQ 也有答案:
- Memcached 最小值是 400 bytes, 最大值是 1M byte.
- 如果要超過 1M 也可以, 只是需要重新 compile memcached, 並且去修改 POWER_BLOCK 的值 或 使用 inefficient malloc/free 當 backend.
下述轉載此問題的問答:
Q: Why are items limited to 1 megabyte in size?
- Ahh, this is a popular question!
- Short answer: Because of how the memory allocator's algorithm works.
- Long answer: Memcached's memory storage engine (which will be pluggable/adjusted in the future...), uses a slabs approach to memory management. Memory is broken up into slabs chunks of varying sizes, starting at a minimum number and ascending by a factorial up to the largest possible value.
- Say the minimum value is 400 bytes, and the maximum value is 1 megabyte, and the factorial is 1.20:
- slab 1 - 400 bytes slab 2 - 480 bytes slab 3 - 576 bytes ... etc.
- The larger the slab, the more of a gap there is between it and the previous slab. So the larger the maximum value the less efficient the memory storage is. Memcached also has to pre-allocate some memory for every slab that exists, so setting a smaller factorial with a larger max value will require even more overhead.
- There're other reason why you wouldn't want to do that... If we're talking about a web page and you're attempting to store/load values that large, you're probably doing something wrong. At that size it'll take a noticeable amount of time to load and unpack the data structure into memory, and your site will likely not perform very well.
- If you really do want to store items larger than 1MB, you can recompile memcached with an edited slabs.c:POWER_BLOCK value, or use the inefficient malloc/free backend. Other suggestions include a database, MogileFS, etc.
註:2015/8 更新:Memcached 可以用 -I 5m 調整最大值。-I 5m 就是設定最大可以塞 5M 的資料。
相關網頁
Open Office 簡報 母片設定
投影片只要將母片做好, 後面要製作簡報就輕鬆了. (可將母片想像成是背景圖案.)
將 Google App Engine 網址加入 Google Apps 管理
Google App Engine 寫好的網站, 要綁定自己的 Domain name, 且要在 Google Apps 統一管理, 要如何設定?
關閉 Plurk 的 音效
打開 Plurk 後, 就會一直聽到叮、叮的聲音, 這聲音跟不小心開到會自動播音樂的網站差不多狀況.
在設定翻來翻去就是找不到怎麼關, 最後找到的地方, 跟設定一點關係都沒有. Q_Q
Windows XP 於 登入畫面 自動啟動 Num Lock 按鍵
Windows XP 於 登入畫面, Num Lock 按鍵預設是關閉的, 要如何讓 Num Lock 鍵 預設開啟?
Google Chrome(Chromium) 關閉自動翻譯
Google Chrome 前幾天開始, 在每個頁面都會出現是否要自動翻譯的訊息, 視窗都已經不夠用, 還一直跳出來佔位置, 連繁體中文也跳出來問, 實在很煩~ 於是來找如何關掉的方法.
Ubuntu Linux 的 Google Chrome(Chromium) 修改預設字型
於 Ubuntu Linux 的 Google Chrome, 每天固定自動升級, 這幾天在使用時, 發現字型變的超級醜, 網頁看起來都很有壓力.