Is it possible to access MemoryStore Fragmentation Ratio e.g in Cloud Monitoring? - google-cloud-platform

The title pretty much says it all, but just to clarify:
Redis afaik has a performance metric mem_fragmentation_ratio, giving the ratio of memory used as seen by the OS (used_memory_rss) to memory allocated by Redis (used_memory).
Is it possible to find this metric (or calculate it using other existing metrics) in Cloud Monitoring?

Unfortunately the answer is no. Only the GCP support team is able to verify this metric with their internal tools :(, nevertheless, I found this Public Issue tracker that is requesting to add this metric to monitor the instance. I suggest you do a comment and start the issue so you can get notifications about this :)
on the other hand, about the calculation, I found this link. It seems that the formula is:
MemoryFragmentationRatio= Used_Memory_RSS / Used_Memory
With the command "info all" you can get these values.
I really hope that the aforementioned information helps you.

Related

Google cloud platform, no quota "GPUs (all regions)"

I want to increase the "GPUs (all regions)", or GPUS_ALL_REGIONS, for a project on Google Cloud.
However, the option is not in the "Metric" list on the "Quotas" page of the project.
Does anyone of you know how this can happen? For other projects I have on the same Billing Account, the option is present in the list:
Present: https://i.stack.imgur.com/6iQaJ.png
Not present: https://i.stack.imgur.com/FAhJ9.png
Please keep in mind that the Compute Engine is enabled on both.
Thank you very much for your help!
Regarding your concern, quota is based on reputation. You may find some project which has this metric “GPUs (all regions)”and some other does not. The old project might have this metric but most of the time new projects does not have.
Besides this, you can submit a quota increase request for each region and dedicated team can assist you for your concern.Also, please make sure GPU type is available in the requested region. Please use this link to submit your request

not have enough resources available to fulfil the request try a different zone

not have enough resources available to fulfill the request try a different zone
All of my machines in the different zone
have the same issue and can not run.
"Starting VM instance "home-1" failed.
Error:
The zone 'projects/extreme-pixel-208800/zones/us-west1-b' does not have enough resources available to fulfill the request. Try a different zone, or try again later."
I am having the same issue. I emailed google and figured out this has nothing to do with quota. However, you can try to decrease the need of your instance (eg. decrease RAM, CPUs, GPUs). It might work if you are lucky.
Secondly, if you want to email google again, you will get the message sent from the following template.
Good day! This is XX from Google Cloud Platform Support and I'll be
glad to help you from here. First, my apologies that you’re
experiencing this issue. Rest assured that the team is working hard to
resolve it.
Our goal is to make sure that there are available resources in all
zones. This type of issue is rare, when a situation like this occurs
or is about to occur, our team is notified immediately and the issue
is investigated.
We recommend deploying and balancing your workload across multiple
zones or regions to reduce the likelihood of an outage. Please review
our documentation [1] which outlines how to build resilient and
scalable architectures on Google Cloud Platform.
Again, we want to offer our sincerest apologies. We are working hard
to resolve this and make this an exceptionally rare event. I'll be
keeping this case open for one (1) business day in case you have
additional question related to this matter, otherwise you may
disregard this email for this ticket to automatically close.
All the best,
XXXX Google Cloud Platform Support
[1] https://cloud.google.com/solutions/scalable-and-resilient-apps
So, if you ask me how long you are expected to wait and when this issue is likely to happen:
I waited for an average of 1.5-3 days.
During the weekend (like from Friday to Sunday) daytime EST, GCP has a high probability of unavailable resources.
Usually when you have one instance that has this issue, others too. For me, keep trying in different region waste my time. (But, maybe it just that I don't have any luck)
The error message "The zone 'projects/[...]' does not have enough resources available to fulfill the request. Try a different zone, or try again later." is always in reference to a shortage of resources in a zone.
Google recommends spreading your workload across different zones to reduce the impact of these issues on your workload. Otherwise, there isn't much else to do other than wait or try another zone/region
Faced this Issue yesterday [01/Aug/2020] when GCP free credit was over and below steps helped to workaround this.
I was on asia-south-c zone and moved to us zone
Going to my Google Cloud Platform >>> Compute Engine
Went to Snapshots >>> created a snapshot >>> Select your Compute Engine instance
Once snapshot was completed I clicked on my snapshot.
Ended up under "snapshot details". There, on the top, just click create instance. Here you are basically creating an instance with a copy of your disk.
Select your new zone, don't forget to attach GPUs, all previous setting, create new name.
Click create, that's it, your image should now be running in your new zone
No worry of losting configuration as well.

Google Cloud Platform: reserved address disassociated without reason

Today (15/06/2018) we found two reserved addresses were disassociated from two GCE instances.
Nobody ordered this disassociation, in fact in the activity logs we do not found any activity on this two reserved addresses.
We manually re-associate the two reserved addresses to our machines to solve the problem.
Is it possible to know what happened?
Good sources to see what happened are the "Activity" tab in the Cloud Console as well as the AuditLog entries in Stackdriver Logging. If it is still not clear what happened based on that, please file a support case for further investigation.
If your instances were in the stopped state at the time it may be related to this incident:
https://status.cloud.google.com/incident/compute/18005
By reading this link I ran the following advanced filter from Stackdriver:
resource.type="gce_instance"
jsonPayload.event_subtype="compute.instances.deleteAccessConfig"
This filter shows the actor (user or a service account) and the event type (how it happened).
If you need further information, I would suggest filling an issue here.

Estimate AWS cost

The company which I work right now planning to use AWS to host a new website for a client. Their old website had roughly 75,000 sessions and 250,000 page views per year. We haven't used AWS before and I need to give a rough cost estimate to my project manager.
This new website is going to be mostly content-driven with a cms backend (probably WordPress) + a cost calculator for their services. Can anyone give me a rough idea about the cost to host such kind of a website in aws?
I have used simple monthly calculator with a single Linux t2.small 3 Year upfront which gave me around 470$.
(forgive my English)
The only way to know the cost is to know the actual services you will consume (Amazon EC2, Amazon EBS, database, etc). It is not possible to give an accurate "guess" of these requirements because it really does depend upon the application and usage patterns.
It is normally recommended that you implement the system and run it for a while before committing to Reserved Instances so that you have a chance to measure performance and test a few different instance types.
Be careful using T2 instances for production workloads. They are very powerful instances, but if the CPU Credits run out, the amount of CPU is limited.
Bottom line: Implement, measure, test. Then you'll know what is right for your needs.
Take Note
When you are new in AWS you have a 1 year free tier on a single t2.micro
Just pulled it out, looking into your requirement you may not need this
One load balancer and App server should be fine (Just use route53 to serve some static pages from s3 while upgrading or scalling )
Use of email subscription and processing of Some document can be handled with AWS Lambda, SNS and SWQ which may further reduce the cost ( you may reduce the server size and do all the hevay lifting from Lambda)
A simple webpage with 3000 request/monthly can be handled by T2 micro which is almost free for one year as mentioned above in the note
You don't have a lot of details in your question. AWS has a wide variety of services that you could be using in that scenario. To accurately estimate costs, you should gather these details:
What will the AWS storage be used for? A database, applications, file storage?
How big will the objects be? Each type of storage has different limits on individual file size, estimate your largest object size.
How long will you store these objects? This will help you determine static, persistent or container storage.
What is the total size of the storage you need? Again, different products have different limits.
How often do you need to do backup snapshots? Where will you store them?
Every cloud vendor has a detailed calculator to help you determine costs. However, to use them effectively you need to have all of these questions answered and you need to understand what each product is used for. If you would like to get a quick estimate of costs, you can use this calculator by NetApp.

How does Google Compute Recommend Memory Upgrades on vms

Often Google Compute recommends upgrading cpu/memory of the vms I am using. I can see the cpu graph of the instance so I can imagine where it gets the idea I should upgrade the CPU, but there is no such thing for ram so How does it know when to upgrade the ram?
You can use the companion Google Stackdriver app which by default collects more metrics for all your instances. The URL for the metrics for a single instance is
https://app.google.stackdriver.com/instances/<INSTANCE_ID>?project=<PROJECT_ID>
The hypervisor gives us some idea of the number of RAM pages that have been used, and we can make a recommendation based on that. However, since in any case Google does not inspect the RAM, we don't actually know what the purpose of pages are, merely how many are backed by physical RAM. Installing the StackDriver agent allows us to get better information from the guest OS about what is considered to be in use by the OS, and we can actually recommend better discounts in that case. The docs page [1] talks about this a little, although it could probably go into more detail about the memory usage signals.
[1] https://cloud.google.com/compute/docs/instances/viewing-sizing-recommendations-for-instances