Week 4 – Managing Resources

1. How can you profile an entire Python application?

Answers

·        Use an @profile label

·        Use the guppy module

·        Use Memory Profiler

·        Use a decorator

Explanation: It is possible to profile the execution of certain functions or methods inside your application by applying decorators to those functions or methods themselves. Through the use of a profiling tool like cProfile or line_profiler, it is possible to develop a personalized decorator that provides integration. It is possible for you to selectively profile various components of your application using this system.

2. Your application is having difficulty sending and receiving large packets of data, which are also delaying other processes when connected to remote computers. Which of the following will be most effective in improving network traffic for the application?

Answers

·        Running the iftop program

·        Increase storage capacity

·        Increase memory capacity

·        Use traffic shaping

Explanation: You are able to regulate the flow of network traffic, prioritize specific kinds of traffic, and distribute bandwidth resources in a more effective manner via the use of traffic shaping, which is also known as bandwidth management. You are able to alleviate difficulties such as delays caused by huge packets of data and guarantee that key operations are not delayed by excessive network traffic by employing methods that are known as traffic shaping.

Running the iftop application, despite the fact that it is helpful for monitoring network traffic in real time, does not actively manage or regulate the flow of traffic. There is a possibility that increasing the capacity of the application's storage or memory would enhance its performance in other areas; however, this option will not immediately solve the problems with network traffic. To optimize network traffic and improve overall application performance in this case, the most suitable option is to use traffic shaping. This is because traffic shaping is the most appropriate approach.

3. What is the term referring to the amount of time it takes for a request to reach its destination, usually measured in milliseconds (ms)?

Answers

·        Bandwidth

·        Latency

·        Number of connections

·        Traffic shaping

Explanation: The term "latency" refers to the amount of time that passes between the beginning of a request and the arrival of a response from the destination. It takes into account things like the amount of time it takes for data to move across the network, the amount of time it takes for there to be processing at intermediate nodes, and any other delays that may occur during transmission. In most cases, there is a correlation between lower latency and improved network performance and responsiveness.

4. If your computer is slowing down, what Linux program might we use to determine if we have a memory leak and what process might be causing it?

Answers

·        top

·        gparted

·        iftop

·        cron 

Explanation: Providing real-time information on system activities, including the use of the central processing unit (CPU) and memory, Top is a command-line program. To discover any strange activity, such as a continuously growing memory consumption that is suggestive of a memory leak, you may monitor the memory usage of individual processes by using the top command. This will allow you to spot any abnormal behavior.

5. Some programs open a temporary file, and immediately _____ the file before the process finishes, then the file continues to grow, which can cause slowdown.

Answers

·        open

·        close

·        delete

·        write to

Explanation: Some applications may open a temporary file, then instantly destroy the file before the procedure is complete. This causes the file to continue to expand, which might result in a decrease in performance.

6. Using the Eisenhower Decision Matrix, which of the following is an example of an event or task that is both Important, and Urgent?

Answers

·        Office gossip

·        Replying to emails

·        Internet connection is down

·        Follow-up to a recently resolved issue

7. You’re working on a web server issue that’s preventing all users from accessing the site. You then receive a call from user to reset their user account password. Which appropriate action should you take when prioritizing your tasks?

Answers

·        Reset the user’s password

·        Create a script to automate password resets

·        Ask the user to open a support ticket.

·        Ignore the user, and troubleshoot web server.

 

Explanation: In addition to resolving an immediate user problem, resetting the user's password has the ability to restore the user's access to the system. This might possibly reduce the amount of stress that the support team is under and reduce the amount of interruptions that the user experiences. However, it is essential to be certain that the process of resetting the password does not substantially contribute to the delay in fixing the problem with the web server. If it is at all feasible, the most effective strategy would be to change the password in a rapid and efficient manner while continuing to investigate the issue with the web server.

8. What is it called when we make more work for ourselves later by taking shortcuts now?

Answers

·        Technical debt

·        Ticket tracking

·        Eisenhower Decision Matrix

·        Automation

Explanation: Within the realm of software development, the phrase "technical debt" refers to the notion of making compromises, either intentionally or unintentionally, throughout the development process. These compromises lead to solutions that are only effective for a limited period of time and may need more labor or resources to solve in the future. Because of the accumulation of these shortcuts or compromises over time, which is analogous to the accumulation of financial debt, a software project may see a reduction in its efficiency, scalability, and maintainability. When it comes to addressing technical debt, it is frequently necessary to spend time and resources in order to rework code, upgrade infrastructure, or apply better practices in order to decrease cost and risk associated with future maintenance.

9. What is the first step of prioritizing our time properly?

Answers

·        Work on urgent tasks first

·        Assess the importance of each issue

·        Make a list of all tasks

·        Estimate the time each task will take

Explanation: It is vital to evaluate the significance of each problem or job at hand before beginning to work on chores or making a list of things to accomplish. You will need to evaluate the relevance, effect, and alignment with your aims or objectives in order to do this. You will be able to prioritize activities more efficiently and concentrate your time and attention on those that will have the potential to have the most significant influence on your overall aims or goals if you have a thorough awareness of the significance of each problem.

10. If an issue isn't solved within the time estimate that you provided, what should you do? (Select all that apply)

Answers

·        Explain why

·        Drop everything and perform that task immediately

·        Give an updated time estimate

·        Put the task at the end of the list

11. Which proactive practice can you implement to make troubleshooting issues in a program easier when they happen again, or face other similar issues?

Answers

·        Create and update documentation

·        Use a test environment.

·        Automate rollbacks.

·        Set up Unit tests.

12. Which of the following is a good example of mixing and matching resources on a single server so that the running services make the best possible use of all resources?

Answers

·        Run two applications that are CPU intensive between two servers.

·        Run a CPU intensive application on one server, and an I/O intensive application on another server.

·        Run a RAM intensive application and a CPU intensive application on a server.

·        Run two applications that are RAM and I/O intensive on a server.

Explanation: If you run two programs on the same server that have distinct resource needs but compliment each other, you will be able to optimize the use of the resources that are available to you. In this scenario, combining an application that requires a lot of random access memory (RAM) with an application that requires a lot of input/output (I/O) lets both programs to make optimal use of the server's RAM and I/O capabilities without needing to compete for the same resources. This strategy has the potential to provide assistance in optimizing the overall performance and throughput of the server, which will ultimately result in increased resource usage and efficiency.

13. One strategy for debugging involves explaining the problem to yourself out loud. What is this technique known as?

Answers

·        Monitoring

·        Rubber Ducking

·        Testing

·        Ticketing

Explanation: When it comes to finding solutions to code issues, programmers often use a technique known as rubber duck debugging. The objective is to articulate or explain the code or issue to an inanimate object, such as a rubber duck, in the same manner as you would explain it to a human. By expressing the problem in a step-by-step manner, the programmer often acquires fresh insights and is able to see possible problems or solutions that were not previously obvious. Programmers are able to better organize their ideas and break down difficult issues into more manageable components with the use of this method, which eventually helps in the process of debugging.

14. When deploying software, what is a canary?

Answers

·        A test for how components of a program interact with each other

·        A test of a program’s components

·        A test deployment to a subset of production hosts

·        A small section of code

15. It is advisable to collect monitoring information into a central location. Given the importance of the server handling the centralized collecting, when assessing risks from outages, this server could be described as what?

Answers

·        A failure domain

·        A problem domain

·        CPU intensive

·        I/O intensive

Explanation: Failure domains are certain areas or components within a system that are prone to failure or downtime. Failure domains are also known as failure domains. In this scenario, the server that is accountable for the centralized collection of monitoring information is considered to be a single point of failure. This is due to the fact that its failure might possibly disturb the existence of the whole monitoring infrastructure. As a result, while evaluating the potential threats to the whole system's dependability and availability, it is very necessary to take into account the effect that outages will have on this server. 

Post a Comment

Previous Post Next Post