Info Security Memo
  • Blog
  • Sitemap
    • Categories
  • Contact
  • About
  • Resources
  • Tools
  • 51sec.org

Build Confidence

Focusing on Information Security 

Info Security Notes

Oracle Cloud Cleaning Up Idle Compute Instances & How to Keep it

2/5/2023

0 Comments

 
Oracle Cloud Cleaning Up Idle Compute Instances & How to Keep it

Recently some Oracle Cloud Free Tier users received a email regarding their compute instances identified as idle. And the those identified idle instances will be stopped in one week. Also Orcle Cloud Infrastructure (OCI) suggested to convert the account to Pay As You Go (PAYG) to avoid stopping. 



Here is the email content from Reddit

Oracle Cloud Infrastructure Customer,

Oracle Cloud Infrastructure (OCI) will be reclaiming idle Always Free compute resources from Always Free customers. Reclaiming idle resources allows OCI to efficiently provide services to Always Free customers. Your account has been identified as having one or more compute instances that have been idle for the past 7 days. These idle instances will be stopped one week from today, January 30,2023. If your idle Always Free compute instance is stopped, you can restart it as long as the associated compute shape is available in your region. You can keep idle compute instances from being stopped by converting your account to Pay As You Go (PAYG). With PAYG, you will not be charged as long as your usage for all OCI resources remains within the Always Free limits.


History

Nov 15 2022, a new announcement regarding idle resources might subject stopping were added into OCI website. 

从 2022 年 11 月 24 日开始,您闲置的 Always Free 计算实例可能会停止。 详细了解此过程以及如何重启您的实例。 您还可以随时升级您的帐户以避免中断。

仅限未付费的免费套餐帐户。Idle Always未付费免费套餐帐户的免费资源可以随时回收,恕不另行通知。回收包括停止或终止等操作。


Nov 19 2022, this announcement disappeared

End of Jan 2023, this announcement came back again at https://docs.oracle.com/en-us/iaas/Content/FreeTier/freetier_topic-Always_Free_Resources.htm

Idle Compute Instances

 Important

Reclamation of Idle Compute Instances

Idle Always Free compute instances may be reclaimed by Oracle. Oracle will deem virtual machine and bare metal compute instances as idle if, during a 7-day period, the following are true:

  • CPU utilization for the 95th percentile is less than 10%
  • Network utilization is less than 10%
  • Memory utilization is less than 10% (applies to A1 shapes only)

Based on what I am reading, it will need all those conditions met to make your free tier instances subject to be stopped. Unfortunately, there are no more details or explaination coming out. Strongly suggest free tier users to upgrade to Pay As You Go plan since all free tier resources will not be charged after you upgraded, but your idle resources will not subject to this stopping. 

Here are some methods found online which might help to keep your idle computing resources in Oracle Cloud. But there is no guarantee those will work. I will keep an eye on the Internet regarding how effective they are. 

NeverIdle Github Project Method to Keep it

 
NeverIdle - Github project: https://github.com/layou233/NeverIdle


Steps:

1 install dependencies

You might need to install wget and screen those two applications:

Based on your OS ,  this is command

  • yum install -y wget screen
  • apt install -y wget screen


2 Download script

# AMD Server

  • wget https://github.com/layou233/NeverIdle/releases/download/0.1/NeverIdle-linux-amd64 -O NeverIdle

# ARM Server

  • wget https://github.com/layou233/NeverIdle/releases/download/0.1/NeverIdle-linux-arm64 -O NeverIdle

3 Change file permission

  • chmod 777 NeverIdle

4 Run Command

  • screen -R baohuo
Command Explaination:

./NeverIdle -c 2h1m2s -m 2 -n 4h

-c : for cpu consumption. every 2 hour 1 minute 2 second (format is 2h1m2s), it will waste CPU once

-m : enable memory occupation. 2 means 2GB

-n : execute once to waste network for Ookla Speed Test. It will show the output on your screen.


5 Detaching and Reattaching screen session

To detach from screen and leave the window running in the background, use the keystroke:

Detach: Ctrl + a + d

Reattach: screen -r


Other screen commands:

  • Ctrl + a and c â€“ Open a new screen window.
  • Ctrl + a and " â€“ List all open windows.
  • Ctrl + a and 0 â€“ Switch to window 0 (or any other numbered window).
  • Ctrl + a and A â€“ Rename the current window.
  • Ctrl + a and S - Split the screen horizontally, with the current window on top.
  • Ctrl + a and | - Split the screen vertically, with the current window on the left.
  • Ctrl + a and tab â€“ Switch focus between areas of the split screen.
  • Ctrl + a and Ctrl + a â€“ Switch between current and previous windows.
  • Ctrl + a and n â€“ Switch to the next window.
  • Ctrl + a and p â€“ Switch to the previous window.
  • Ctrl + a and Q â€“ Quit all other windows except the current one..
  • Ctrl + a and X â€“ Lock the current window.
  • Ctrl + a and H â€“ Create a running log of the session.
  • Ctrl + a and M â€“ Monitor a window for output (a notification pops up when that window has activity).
  • Ctrl + a and _ - Watch a window for absence of output (such as when a file finishes downloading or a compiler finishes).


Other Methods to Keep Your Idle Resources

 

Shell Scripts



  • curl https://keeporacle.pages.dev/ -o keeporacle.sh && chmod +x keeporacle.sh && ./keeporacle.sh
  • or
  • wget https://keeporacle.pages.dev/ -O keeporacle.sh && chmod +x keeporacle.sh && ./keeporacle.sh

Source:https://hostloc.com/thread-1131732-1-1.html



lookbusy



  • lookbusy -c 50 # 占用所有 CPU 核心各 50%
  • lookbusy -c 50 -n 2 # 占用两个 CPU 核心各 50%
  • lookbusy -c 50-80 -r curve # 占用所有 CPU 核心在 50%-80% 左右浮动
  • lookbusy -c 0 -m 128MB -M 1000 # 每 1000 毫秒,循环释放并分配 128MB 内存
  • lookbusy -c 0 -d 1GB -b 1MB -D 10 # 每 10 毫秒,循环进行 1MB 磁盘写入,临时文件不超过 1GB

 


Calculate Pi



  • nohup echo "scale=99999999;4*a(1)" | bc -lq > /dev/null &
  • nohup cpulimit -l 30 -p 22489 >/dev/null &
  • scale那个代表小数点后的位数,数越大计算时间越长
  • -l 那里可以控制cpu使用率0-200
  • -p 那里写程序的PID,通过top命令查找,或者 ps -aux | grep bc

Source:https://hostloc.com/thread-1131769-1-1.html



References

  • 甲骨文云(Oracle Cloud)要清理闲置实例资源,附保活教程










via Blogger http://blog.51sec.org/2023/02/oracle-cloud-cleaning-up-idle-compute.html
February 05, 2023 at 02:24PM Cloud
0 Comments



Leave a Reply.

    Categories

    All
    Architecture
    Blog
    Checkpoint
    Cisco
    Cloud
    CyberArk
    F5
    Fortigate
    Guardium
    Juniper
    Linux
    Network
    Others
    Palo Alto
    Qualys
    Raspberry Pi
    Security
    SIEM
    Software
    Vmware
    VPN
    Wireless

    Archives

    March 2024
    February 2024
    January 2024
    December 2023
    November 2023
    October 2023
    September 2023
    August 2023
    July 2023
    June 2023
    May 2023
    April 2023
    March 2023
    February 2023
    January 2023
    December 2022
    November 2022
    October 2022
    September 2022
    August 2022
    July 2022
    June 2022
    May 2022
    April 2022
    March 2022
    February 2022
    January 2022
    December 2021
    November 2021
    October 2021
    September 2021
    August 2021
    July 2021
    June 2021
    May 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    October 2019
    September 2019
    June 2019
    July 2018
    May 2018
    December 2017
    August 2017
    April 2017
    March 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015
    September 2015
    August 2015
    July 2015
    June 2015
    May 2015
    April 2015
    March 2015

    Print Page:

    RSS Feed

    Email Subscribe
Powered by Create your own unique website with customizable templates.
  • Blog
  • Sitemap
    • Categories
  • Contact
  • About
  • Resources
  • Tools
  • 51sec.org